public class Plan extends MoiseElement implements ToXML, ToProlog
Modifier and Type | Class and Description |
---|---|
static class |
Plan.PlanOpType |
Modifier and Type | Field and Description |
---|---|
protected Plan.PlanOpType |
op |
protected Scheme |
sch |
protected java.util.List<Goal> |
subGoals |
protected double |
successRate |
protected Goal |
target |
debug
Constructor and Description |
---|
Plan(Plan.PlanOpType op,
Scheme sch,
java.lang.String targetGoalId) |
Plan(Scheme sch) |
Modifier and Type | Method and Description |
---|---|
void |
addSubGoal(java.lang.String goalId) |
Goal |
containsSubGoals(java.lang.String goalId)
Looks into the subgoals of the plan to find out a Goal like goalId
|
org.w3c.dom.Element |
getAsDOM(org.w3c.dom.Document document) |
java.lang.String |
getAsProlog()
returns a string representing the plan in Prolog syntax, format:
plan(operator,list of goals)
|
Plan.PlanOpType |
getOp() |
Goal |
getPreviousSubGoals(java.lang.String goalId)
Looks into the subgoals of the plan to find out the previous Goal of goalId.
|
java.util.List<Goal> |
getSubGoals() |
double |
getSuccessRate() |
Goal |
getTargetGoal() |
static java.lang.String |
getXMLTag() |
void |
setFromDOM(org.w3c.dom.Element ele,
Goal targetGoal) |
void |
setOp(Plan.PlanOpType op) |
void |
setSuccessRate(double d) |
java.lang.String |
toString() |
compareTo, equals, getBoolProperty, getBoolProperty, getCreationDate, getFullId, getId, getId, getOwner, getPrefix, getPrefix, getProperties, getPropertiesAsDOM, getPropertiesAsProlog, getProperty, getStrProperty, hashCode, setId, setOwner, setPrefix, setPropertiesFromDOM, setProperty
protected java.util.List<Goal> subGoals
protected Plan.PlanOpType op
protected double successRate
protected Goal target
protected Scheme sch
public Plan(Scheme sch)
public Plan(Plan.PlanOpType op, Scheme sch, java.lang.String targetGoalId) throws MoiseConsistencyException
MoiseConsistencyException
public void setOp(Plan.PlanOpType op) throws MoiseConsistencyException
MoiseConsistencyException
public Plan.PlanOpType getOp()
public Goal getTargetGoal()
public void addSubGoal(java.lang.String goalId) throws MoiseConsistencyException
MoiseConsistencyException
public java.util.List<Goal> getSubGoals()
public Goal containsSubGoals(java.lang.String goalId)
public Goal getPreviousSubGoals(java.lang.String goalId)
public void setSuccessRate(double d)
public double getSuccessRate()
public java.lang.String toString()
toString
in class MoiseElement
public java.lang.String getAsProlog()
getAsProlog
in interface ToProlog
public static java.lang.String getXMLTag()
public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)
public void setFromDOM(org.w3c.dom.Element ele, Goal targetGoal) throws MoiseException
MoiseException