public class Goal extends MoiseElement implements ToXML, ToProlog
Modifier and Type | Class and Description |
---|---|
static class |
Goal.GoalType |
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.lang.Object> |
args |
protected java.lang.String |
desc |
protected Plan |
inPlan |
protected int |
minAgToSat |
protected Plan |
plan |
protected Scheme |
sch |
protected java.lang.String |
ttf |
protected Goal.GoalType |
type |
debug
Constructor and Description |
---|
Goal(java.lang.String goal) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.Object> |
getArguments()
returns a map of the goal's arguments (key is the argument, value is the default value)
|
org.w3c.dom.Element |
getAsDOM(org.w3c.dom.Document document) |
java.lang.String |
getAsProlog()
returns a string representing the goal in Prolog syntax, format:
goal(id,type,description,#ags to satisfy,time to fulfill,list of arguments, plan)
|
java.lang.String |
getDescription() |
Plan |
getInPlan() |
int |
getMinAgToSatisfy()
gets the minimum number of committed agents that should satify the goal for the goal to be considered globaly satisfied
|
Plan |
getPlan()
gets the plan to achieve this goal (in case the goal is the head of a plan)
|
java.util.List<Goal> |
getPreConditionGoals() |
Scheme |
getScheme() |
java.lang.String |
getTTF() |
Goal.GoalType |
getType() |
static java.lang.String |
getXMLTag() |
boolean |
hasArguments() |
boolean |
hasPlan() |
void |
setDescription(java.lang.String s) |
void |
setFromDOM(org.w3c.dom.Element ele,
Scheme sch) |
void |
setInPlan(Plan p) |
void |
setMinAgToSatisfy(int n)
sets the minimum number of committed agents that should satify the goal for the goal to be considered globaly satisfied
|
void |
setPlan(Plan p) |
void |
setScheme(Scheme sch) |
void |
setTTF(java.lang.String ttf) |
void |
setType(Goal.GoalType t) |
compareTo, equals, getBoolProperty, getBoolProperty, getCreationDate, getFullId, getId, getId, getOwner, getPrefix, getPrefix, getProperties, getPropertiesAsDOM, getPropertiesAsProlog, getProperty, getStrProperty, hashCode, setId, setOwner, setPrefix, setPropertiesFromDOM, setProperty, toString
protected Plan plan
protected Plan inPlan
protected Scheme sch
protected java.lang.String desc
protected Goal.GoalType type
protected int minAgToSat
protected java.util.Map<java.lang.String,java.lang.Object> args
protected java.lang.String ttf
public boolean hasArguments()
public void setScheme(Scheme sch)
public Scheme getScheme()
public void setInPlan(Plan p)
public Plan getInPlan()
public java.util.Map<java.lang.String,java.lang.Object> getArguments()
public void setPlan(Plan p)
public Plan getPlan()
public boolean hasPlan()
public void setDescription(java.lang.String s)
public java.lang.String getDescription()
public java.util.List<Goal> getPreConditionGoals()
public void setMinAgToSatisfy(int n)
public int getMinAgToSatisfy()
public Goal.GoalType getType()
public void setType(Goal.GoalType t)
public java.lang.String getTTF()
public void setTTF(java.lang.String ttf)
public static java.lang.String getXMLTag()
public java.lang.String getAsProlog()
getAsProlog
in interface ToProlog
public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)
public void setFromDOM(org.w3c.dom.Element ele, Scheme sch) throws MoiseException
MoiseException