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

Field Summary
protected  ExpList _by
           
protected  Relation _goal
           
protected  Interpreter _interpreter
           
protected  ExpList _notBy
           
protected  Expression _utility
           
 
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
 
Method Summary
 double evalUtility(Binding binding)
           
 int execute(Binding b, Goal currentGoal)
          Perform the action's functionality
abstract  void format(java.io.PrintStream s, Binding b)
           
 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.
 ExpList getBy()
           
 Relation getGoal()
           
 ExpList getNotBy()
           
 Relation getRelation()
           
 Expression getUtility()
           
 boolean isEligible(Plan plan, Binding binding)
          Check to see if the goal is applicable to the specified plan
 boolean isExecutableAction()
           
 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.
 ExpList setBy(ExpList by)
           
 ExpList setNotBy(ExpList notBy)
           
 Relation setRelation(Relation r)
           
 Expression setUtility(Expression utility)
           
 
Methods inherited from class com.irs.jam.Action
getName, getTraceFile, getTraceLine, getType, setTrace, setTraceFile, setTraceLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_goal

protected Relation _goal

_utility

protected Expression _utility

_by

protected ExpList _by

_notBy

protected ExpList _notBy

_interpreter

protected Interpreter _interpreter
Method Detail

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