public class succeed_goal extends DefaultInternalAction
Internal action:
.succeed_goal(G)
.
Description: remove goals G from the agent circumstance as if a plan
for such goal had successfully finished. G
is a goal if there is a triggering event +!G
in any plan within any
intention; also note that intentions can be suspended hence appearing
in E, PA, or PI as well.
Example:
.succeed_goal(go(X,3))
: stops any attempt to achieve goals such as
!go(1,3)
as if it had already been achieved.
Constructor and Description |
---|
succeed_goal() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkArguments(Term[] args) |
void |
drop(TransitionSystem ts,
Literal l,
Unifier un) |
int |
dropIntention(Intention i,
Trigger g,
TransitionSystem ts,
Unifier un) |
java.lang.Object |
execute(TransitionSystem ts,
Unifier un,
Term[] args)
Executes the internal action.
|
int |
getMaxArgs() |
int |
getMinArgs() |
canBeUsedInContext, destroy, prepareArguments, suspendIntention
public int getMinArgs()
getMinArgs
in class DefaultInternalAction
public int getMaxArgs()
getMaxArgs
in class DefaultInternalAction
protected void checkArguments(Term[] args) throws JasonException
checkArguments
in class DefaultInternalAction
JasonException
public java.lang.Object execute(TransitionSystem ts, Unifier un, Term[] args) throws java.lang.Exception
InternalAction
execute
in interface InternalAction
execute
in class DefaultInternalAction
java.lang.Exception
public void drop(TransitionSystem ts, Literal l, Unifier un) throws java.lang.Exception
java.lang.Exception
public int dropIntention(Intention i, Trigger g, TransitionSystem ts, Unifier un) throws JasonException
JasonException