up_SMT_engine.SMTPlanner¶
Functions
|
Function used to ground a Unified Planning API based problem, reformat into SMT friendly classes, use class methods to generate clauses necessary for SMT and then check for satisfiability |
Classes
|
Main engine class, used to handle user options and to call run_smt_planner. |
- up_SMT_engine.SMTPlanner.run_smt_planner(problem, smt_planner, return_queue)[source]¶
Function used to ground a Unified Planning API based problem, reformat into SMT friendly classes, use class methods to generate clauses necessary for SMT and then check for satisfiability
- Args:
problem (up.model.Problem): The API based model of the current planning problem smt_planner (SMTPlanner): The SMTPlanner object holding user options, and shared-memory objects for returning values return_queue (multiprocessing.Queue): Shared memory queue, used to return a satisfying plan, or if one cannot be found: None
- Returns:
unified_planning.plans.sequential_plan.SequentialPlan or unified_planning.plans.PartialorderPlan or None: Satisfying plan. When executed without a timeout this normally returns a SequentialPlan object containing the satisfying series of actions, but if one cannot be found then return None. If the ForAll_get_sets option is chosen then returns a PartialOrderPlan containing the sets of actions which may be executed in parallel to satisfy the problem.
- class up_SMT_engine.SMTPlanner.SMTPlanner(**options)[source]¶
Bases:
Engine
,OneshotPlannerMixin
Main engine class, used to handle user options and to call run_smt_planner.
- property name: str¶
Returns the engine name.
- static supports(problem_kind)[source]¶
If an unsupported Problem is given to this Engine, an exception is raised, unless the
skip_checks
orerror_on_failed_checks
prevent this from happening.NOTE that deactivating the checks might result in an Internal Error of the Engine or in a wrong result.
- solve(problem: Problem, callback: Optional[Callable[[PlanGenerationResult], None]] = None, timeout: Optional[float] = -1, output_stream: Optional[IO[str]] = None) PlanGenerationResult [source]¶
_summary_
- Args:
problem (up.model.Problem): A unified-planning API based problem to solve callback (Optional[Callable[["up.engines.PlanGenerationResult"], None]], optional): Not currently implemented. timeout (Optional[float], optional): Timeout in seconds for the solver. Defaults to -1, representing no timeout. output_stream (Optional[IO[str]], optional): New output stream. Defaults to None.
- Returns:
up.engines.results.PlanGenerationResult: Represents either a TIMEOUT, or a satisfying plan
- is_compiler()¶
- is_plan_validator()¶
- is_replanner()¶
- is_simulator()¶