edu.cmu.cs.coral.icf.plan_based.planners.pip
Class PIPPlan

java.lang.Object
  |
  +--edu.cmu.cs.coral.icf.plan_based.planners.Plan
        |
        +--edu.cmu.cs.coral.icf.plan_based.planners.pip.PIPPlan

public class PIPPlan
extends Plan

Represents a plan in the process of being generated.

Since:
ICF 0.0
Version:
$Id$

Field Summary
private  HeadPlan headPlan
          the head plan, i.e.
private  TailPlan tailPlan
          the tail plan, i.e.
 
Fields inherited from class edu.cmu.cs.coral.icf.plan_based.planners.Plan
actions
 
Constructor Summary
PIPPlan()
          Constructs an empty plan.
 
Method Summary
 java.util.Set getApplicableOps()
          Gets the set of applicable ops.
 void initialize(PlannerDomain domain, PlannerProblem problem)
          Initializes the plan with a single goal consiting of the given literal.
 boolean tryGoalNodeExpansion(GoalNode goal_node, PlannerActionSchema op, ChangeTracker change_tracker)
          Expands the goal node given using the op provided if possible.
 boolean tryOpNodeExpansion(OpNode op_node, Binding binding, ChangeTracker change_tracker)
          Expands the op node given using the supplied binding if possible.
 boolean tryToApplyOp(ActionNode op, ChangeTracker change_tracker)
          Tries to apply the specified op in the plan
 void updateState(PlannerState state, PlannerAction action)
          Update the state by executing the action.
 
Methods inherited from class edu.cmu.cs.coral.icf.plan_based.planners.Plan
accessActions, getActions
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

headPlan

private HeadPlan headPlan
the head plan, i.e. the sequence of actions applied so far
Since:
ICF 0.0

tailPlan

private TailPlan tailPlan
the tail plan, i.e. candidate actions to achieve goals
Since:
ICF 0.0
Constructor Detail

PIPPlan

public PIPPlan()
Constructs an empty plan.
Since:
ICF 0.0
Method Detail

initialize

public void initialize(PlannerDomain domain,
                       PlannerProblem problem)
Initializes the plan with a single goal consiting of the given literal.
Parameters:
done_literal - the single goal to achieve
Since:
ICF 0.0

tryToApplyOp

public boolean tryToApplyOp(ActionNode op,
                            ChangeTracker change_tracker)
Tries to apply the specified op in the plan
Parameters:
op - the applicable operator to try to apply
change_tracker - the change tracker to track changes to the plan with
Returns:
true on success, false on failure (state loop)
Since:
ICF 0.0

tryGoalNodeExpansion

public boolean tryGoalNodeExpansion(GoalNode goal_node,
                                    PlannerActionSchema op,
                                    ChangeTracker change_tracker)
Expands the goal node given using the op provided if possible.
Parameters:
goal_node - the node to expand
op - the operator to use or null to use the current state
change_tracker - the change tracker to track changes to the plan with
Returns:
true if node could be expanded, false otherwise
Since:
ICF 0.0

tryOpNodeExpansion

public boolean tryOpNodeExpansion(OpNode op_node,
                                  Binding binding,
                                  ChangeTracker change_tracker)
Expands the op node given using the supplied binding if possible.
Parameters:
op_node - the op node to expand
binding - the binding to use
change_tracker - the change tracker to track changes to the plan with
Returns:
true if node could be expanded, false otherwise
Since:
ICF 0.0

updateState

public void updateState(PlannerState state,
                        PlannerAction action)
Update the state by executing the action.
Parameters:
state - the state to update
action - the action to apply in the given state
Since:
ICF 0.0

getApplicableOps

public java.util.Set getApplicableOps()
Gets the set of applicable ops.
Returns:
the set of applicable ops
Since:
ICF 0.0