OMTPlan: Optimal Planning Modulo Theories
Public Member Functions | Public Attributes | Private Member Functions | List of all members
planner.plan.Plan Class Reference

Public Member Functions

def __init__ (self, model, encoder, objective=None)
 
def validate (self, val, domain, problem)
 Validates plan (when one is found). More...
 
def pprint (self, dest)
 Prints plan to file. More...
 

Public Attributes

 plan
 
 cost
 

Private Member Functions

def _extractPlan (self, model, encoder)
 Extracts plan from model of the formula. More...
 
def _extractCost (self, objective=None)
 Extracts cost of plan. More...
 

Detailed Description

Plan objects are instances of this class.
Defines methods to extract, validate and print plans.

Member Function Documentation

def planner.plan.Plan._extractCost (   self,
  objective = None 
)
private

Extracts cost of plan.

Parameters
objectiveZ3 object that contains objective function (default None).
Returns
cost: plan cost (metric value if problem is metric, plan length otherwise)
def planner.plan.Plan._extractPlan (   self,
  model,
  encoder 
)
private

Extracts plan from model of the formula.

Plan returned is linearized.

Parameters
modelZ3 model of the planning formula.
encoderencoder object, contains maps variable/variable names.
Returns
plan: dictionary containing plan. Keys are steps, values are actions.
def planner.plan.Plan.pprint (   self,
  dest 
)

Prints plan to file.

Parameters
destpath to destination folder.
def planner.plan.Plan.validate (   self,
  val,
  domain,
  problem 
)

Validates plan (when one is found).

Parameters
valpath to VAL executable.
domainpath to PDDL domain file.
problempath to PDDL problem file.
Returns
plan: string containing plan if plan found is valid, None otherwise.

The documentation for this class was generated from the following file: