up_SMT_engine.ProblemManager.ProblemManager

Classes

ProblemManager(grounded_problem[, ...])

Class used to handle Action and Fluent classes used to generate the clauses describing the problem for a SMT solver

class up_SMT_engine.ProblemManager.ProblemManager.ProblemManager(grounded_problem, parallel_choice='sequential', run_incremental=True)[source]

Bases: object

Class used to handle Action and Fluent classes used to generate the clauses describing the problem for a SMT solver

get_ordered_actions()[source]

The ThereExists implementation uses an arbitrary total ordering over all actions. The ordering used is the index of each action in smt_action

Returns:

List: Ordered list of actions

is_solved()[source]

Check if a satisfying model has been found

Returns:

Boolean: True if found, False otherwise

print_results()[source]

Print the satisfying model if one exists

get_results()[source]

Return the satisfying model if one exists

Returns:

z3.Model: The satisfying model

get_formula_data(formula_data)[source]

Save the formula data (part of the performance statistics) for the most recent step to a dictionary

Args:

formula_data (Dictionary): The dictionary of lists for formula data

get_eval_data(eval_data)[source]

Save the evaluation data (part of the performance statistics) for the most recent step to a dictionary

Args:

eval_data (List): The evaluation data list

__initialise_fluents()

For each ungrounded fluent create a grounded fluent, using either the BaseFluent or R2ExistsFluent class

__initialise_actions()

Converts grounded unified-planning actions into BaseAction, ForAllAction, ThereExistsAction or R2ExistsAction objects, depending on the parallel choice

__share_effect_info()

Handles sharing effect info from actions to fluents to enable fluents generating frame axiom constraitns

__populate_all_fluents_sets()

Handles creating the set of fluents relevant to each action. This is only used for parallel encodings

__populate_affecting_fluents_sets()

Handles creating the set of fluents affected by each action. This is only used for ThereExists encodings

__initialise_chained_variables()

Initialise chained variables for all fluents. This is only used for relaxed relaxed ThereExists encodings

__create_initial_values()

Handles initial values, initial_values does computation so only call once

__create_goals(final_timestep)

Handles goals, time must be equal to the final state considered for the current problem

Args:

final_timestep (int): Final timestep of the problem

Returns:

Clause: Clause repreesnting all goals

check_sat(final_timestep)[source]

Populates SMT problem instance and checks if the instance is satisfiable

Args:

time (int): Plan length