com.irs.jam
Class GoalAction
java.lang.Object
|
+--com.irs.jam.Action
|
+--com.irs.jam.GoalAction
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- AchieveGoalAction, MaintainGoalAction, PerformGoalAction, QueryGoalAction
- public abstract class GoalAction
- extends Action
- implements java.io.Serializable
A subgoal action within a plan.
- See Also:
- Serialized Form
Fields inherited from class com.irs.jam.Action |
_actType, ACT_ACHIEVE, ACT_ASSERT, ACT_ASSIGN, ACT_CANNOT_EXECUTE, ACT_FACT, ACT_FAIL, ACT_FAILED, ACT_GOAL_ACTION, ACT_LOAD, ACT_MAINTAIN, ACT_OBJECT, ACT_PARSE, ACT_PERFORM, ACT_POST, ACT_PRIMITIVE, ACT_QUERY, ACT_RETRACT, ACT_RETRIEVE, ACT_SUCCEEDED, ACT_TEST, ACT_UNDEFINED, ACT_UNPOST, ACT_UPDATE, ACT_WAIT |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_goal
protected Relation _goal
_utility
protected Expression _utility
_by
protected ExpList _by
_notBy
protected ExpList _notBy
_interpreter
protected Interpreter _interpreter
getGoal
public Relation getGoal()
getRelation
public Relation getRelation()
- Overrides:
getRelation
in class Action
setRelation
public Relation setRelation(Relation r)
getUtility
public Expression getUtility()
setUtility
public Expression setUtility(Expression utility)
setBy
public ExpList setBy(ExpList by)
getBy
public ExpList getBy()
setNotBy
public ExpList setNotBy(ExpList notBy)
getNotBy
public ExpList getNotBy()
isExecutableAction
public boolean isExecutableAction()
- Overrides:
isExecutableAction
in class Action
execute
public int execute(Binding b,
Goal currentGoal)
- Description copied from class:
Action
- Perform the action's functionality
- Overrides:
execute
in class Action
isEligible
public boolean isEligible(Plan plan,
Binding binding)
- Check to see if the goal is applicable to the specified plan
print
public void print(java.io.PrintStream s,
Binding b,
java.lang.String head,
java.lang.String tail)
- Format the output and don't worry about being being printed out
in-line with other information.
formatArgs
public void formatArgs(java.io.PrintStream s,
Binding b,
java.lang.String head,
java.lang.String tail)
- Format the output so that it's conducive to being printed out
in-line with other information.
evalUtility
public double evalUtility(Binding binding)
format
public abstract void format(java.io.PrintStream s,
Binding b)
- Overrides:
format
in class Action