Package jason.stdlib
Class drop_intention
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.drop_intention
- All Implemented Interfaces:
InternalAction
,Serializable
- Direct Known Subclasses:
drop_desire
@Manual(literal=".drop_intention(goal)",
hint="removes intentions to achieve the referred goal",
argsHint="the goal the intentions achieve",
argsType="literal",
examples=".drop_intention(go(1,3)): removes intentions having a plan with triggering event +!go(1,3) in the agent\'s current circumstance.",
seeAlso={"jason.stdlib.intend","jason.stdlib.desire","jason.stdlib.drop_all_desires","jason.stdlib.drop_all_events","jason.stdlib.drop_intention","jason.stdlib.drop_desire","jason.stdlib.succeed_goal","jason.stdlib.fail_goal","jason.stdlib.intention","jason.stdlib.resume","jason.stdlib.suspend","jason.stdlib.suspended"})
public class drop_intention
extends DefaultInternalAction
Internal action: .drop_intention(I)
.
Description: removes intentions to achieve goal I from the set of intentions of the agent (suspended intentions are also considered). No event is produced.
Parameters:
- - goal (literal): the goal the intentions achieve.
Example:
-
.drop_intention(go(1,3))
: removes intentions having a plan with triggering event+!go(1,3)
in the agent's current circumstance. -
.drop_intention
: removes the current intention.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkArguments
(Term[] args) boolean
dropInt
(Circumstance C, Literal goal, Unifier un) Drops an intention based on a goal argument returns true if the current intention is droppedexecute
(TransitionSystem ts, Unifier un, Term[] args) Executes the internal action.int
int
boolean
Returns true if the internal action (IA) should suspend the intention where the IA is calledMethods inherited from class jason.asSemantics.DefaultInternalAction
canBeUsedInContext, destroy, prepareArguments
-
Constructor Details
-
drop_intention
public drop_intention()
-
-
Method Details
-
getMinArgs
public int getMinArgs()- Overrides:
getMinArgs
in classDefaultInternalAction
-
getMaxArgs
public int getMaxArgs()- Overrides:
getMaxArgs
in classDefaultInternalAction
-
checkArguments
- Overrides:
checkArguments
in classDefaultInternalAction
- Throws:
JasonException
-
suspendIntention
public boolean suspendIntention()Description copied from interface:InternalAction
Returns true if the internal action (IA) should suspend the intention where the IA is called- Specified by:
suspendIntention
in interfaceInternalAction
- Overrides:
suspendIntention
in classDefaultInternalAction
-
execute
Description copied from interface:InternalAction
Executes the internal action. It should return a Boolean or an Iterator. A true boolean return means that the IA was successfully executed. An Iterator result means that there is more than one answer for this IA (e.g. see member internal action). - Specified by:
execute
in interfaceInternalAction
- Overrides:
execute
in classDefaultInternalAction
- Throws:
Exception
-
dropInt
Drops an intention based on a goal argument returns true if the current intention is dropped
-