up_SMT_engine.actions.ForAllAction¶
Classes
|
Extension of BaseAction to support ForAll parallelism, allowing all non-interfering actions to be executed within a timestep |
- class up_SMT_engine.actions.ForAllAction.ForAllAction(grounded_action)[source]¶
Bases:
BaseAction
Extension of BaseAction to support ForAll parallelism, allowing all non-interfering actions to be executed within a timestep
- __get_matching_fluent_set(fluents_list, name_set)¶
Method used to find the set of fluents matching a set of basenames
- Args:
fluents_list (List(BaseFluent or BaseFluent subclass)): List of fluents name_set (Set(String)): Set of basenames
- Returns:
Set(BaseFluent or BaseFluent subclass): Set of fluents matching the basenames
- __get_precondition_fluent_names()¶
Method used to find all fluents mentioned in preconditions. This is a coarse grained approach because each fluent’s semantics are discarded Used with __get_matching_fluent_set to get matching fluent objects
- Returns:
Set(String): Set of fluent basenames
- __get_effect_precondition_fluent_names()¶
Method used to find all fluents mentioned in effect preconditions. This is a coarse grained approach because each fluent’s semantics are discarded. Effects without preconditions are skipped. Used with __get_matching_fluent_set to get matching fluent objects
- Returns:
Set(String): Set of fluent basenames
- __get_effect_fluent_names()¶
Method used to find all fluents affected by an effect, including conditional effects This is also a coarse grained approach. Used with __get_matching_fluent_set to get matching fluent objects
- Returns:
Set(String): Set of fluent basenames
- populate_all_fluents_set(fluents_list)[source]¶
Method used to populate the all_fluents set for an action
- Args:
fluents_list (List(BaseFluent or BaseFluent subclass)): List of all fluents
- __get_ForAll_constraints_at_time_t(timestep)¶
Method used to generate all parallelism constraints for this action for a ForAll encoding Affecting actions are found by finding affecting actions of fluents in all_fluents set
- Args:
timestep (int): Current timestep
- Returns:
List(z3 expression): List of constraints expressing the ForAll parallelism constraints over simultaneous actions
- get_ForAll_constraints_up_to_t(timestep)[source]¶
Method used to get all ForAll parallelism constraints over simultaneous actions up to timestep t
- Args:
timestep (int): Final timestep
- Returns:
List(z3 expression): List of constraints expressing the ForAll parallelism constraints over simultaneous actions