public class suspend extends DefaultInternalAction
Internal action:
.suspend(G)
.
Description: suspend goals G, i.e., all intentions trying to achieve G will stop
running until the internal action .resume
change the state of those intentions.
A literal G
is a goal if there is a triggering event +!G
in any plan within
any intention in I, E, PI, or PA.
Examples:
.suspend(go(1,3))
: suspends intentions to go to the location 1,3.
.suspend
: suspends the current intention.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SELF_SUSPENDED_INT |
static java.lang.String |
SUSPENDED_INT |
Constructor and Description |
---|
suspend() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkArguments(Term[] args) |
java.lang.Object |
execute(TransitionSystem ts,
Unifier un,
Term[] args)
Executes the internal action.
|
int |
getMaxArgs() |
int |
getMinArgs() |
boolean |
suspendIntention()
Returns true if the internal action (IA) should suspend the
intention where the IA is called
|
canBeUsedInContext, destroy, prepareArguments
public static final java.lang.String SUSPENDED_INT
public static final java.lang.String SELF_SUSPENDED_INT
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 boolean suspendIntention()
InternalAction
suspendIntention
in interface InternalAction
suspendIntention
in class DefaultInternalAction