up_SMT_engine.fluents.BaseFluent

Classes

BaseFluent(name, API_fluent)

Custom fluent object used to generate Frame Axiom constraints, value bound constraints and to handle variables and chained variables for Fluents.

class up_SMT_engine.fluents.BaseFluent.BaseFluent(name, API_fluent)[source]

Bases: object

Custom fluent object used to generate Frame Axiom constraints, value bound constraints and to handle variables and chained variables for Fluents. Able to handle all methods for sequential, and therefore most parallel plans

check_name_match(name)[source]

Return true/false if name matches this fluent’s base name

Args:

name (String): name to match

Returns:

Bool: True if match, False otherwise

__get_predicate_at_t(timestep)

Method used to generate this fluent’s Bool representing its state at t = ‘timestep’

Args:

timestep (int): Timestep value for the variable

Returns:

z3.Real or z3.Int or z3.Bool: Variable expression of value of Fluent at timestep t

get_fluents_up_to_t(timestep)[source]

Method for finding the list of state predicates corresponding to this fluent’s variables in each state from t = 0, to t = timestep

Args:

timestep (int): Last timestep

Returns:

List: List of variables expressing this fluent’s values from timestep 0 to timestep

add_action_condition(action, condition)[source]

Used by actions to register as effecting this fluent

Args:

action (BaseAction or BaseAction subclass): Action which may affect this fluent when executed condition (FNODE): FNODE expression for action’s effect condition affecting this fluent

get_action_conditions()[source]

Return set of actions that may affect this fluent, with their conditions

Returns:

List: List of (BaseAction or BaseAction subclass, FNODE) pairs. The Action is an action which affects this fluent as part of its effects. The FNODE is the condition of the effect, if it has one

__get_bound_constraints_at_t(timestep, is_lower)

Method used to generate bound constraints for either upper, or lower bound at timestep t

Args:

timestep (int): Timestep value bound (Numeric type): upper or lower bound value is_lower (bool): True if is lower, False if is upper bound

Returns:

_type_: _description_

get_bound_constraints_up_to_t(timestep)[source]

Method used to generate all bound constraints up to timestep t, can be called if no constraints are needed

Args:

timestep (int): Last timestep value

Returns:

List: List of bound constraints up to t

get_bound_constraints_at_t(timestep)[source]

Returns bound constraints at t. Used for incremental solving.

Args:

timestep (int): current timestep

Returns:

z3 expression: z3 expression for bound constraints at timestep t

__generate_frame_axiom_constraints_at_t(timestep)

Method used internally to generate the frame axiom constraints for this fluent at time timestep

Args:

timestep (int): current timestep

Returns:

z3 expression: z3 expression for Frame axiom constraints at timestep t

generate_frame_axiom_constraints_up_to_t(timestep)[source]

Generate frame axiom constraints for each timestep point up to t

Args:

timestep (int): final timestep

Returns:

List(z3 expression): List of z3 expressions for frame axiom constraints up to timestep t

generate_frame_axiom_constraints_at_t(timestep)[source]

Returns frame axioms at t. Used for incremental solving.

Args:

timestep (int): current timestep

Returns:

z3 expression: z3 expressions for frame axiom constraints at timestep t