Package jason.stdlib
Class desire
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.intend
jason.stdlib.desire
- All Implemented Interfaces:
InternalAction,Serializable
@Manual(literal=".desire(desire)",
hint="checks whether the argument is a desire",
argsHint="the desire to be checked if it is present",
argsType="literal",
examples=".desire(go(1,3)): true if go(1,3) is a desire of the agent",
seeAlso={"jason.stdlib.intend","jason.stdlib.drop_all_desires","jason.stdlib.drop_all_events","jason.stdlib.drop_all_intentions","jason.stdlib.drop_event","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 desire
extends intend
Internal action: .desire(D, [ I ]).
Description: checks whether D is a desire: D is a desire
either if there is an event with +!D as triggering
event or it is a goal in one of the agent's intentions I.
Example:
-
.desire(go(1,3)): true ifgo(1,3)is a desire of the agent. -
.desire(go(1,3), I): as above andIunifies with the intention that contains the desire.Iis the identification of the intention. The internal action .intention can be used to further inspect the state of the intention.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallDesires(Circumstance C, Literal l, Term intID, Unifier un) execute(TransitionSystem ts, Unifier un, Term[] args) Executes the internal action.Methods inherited from class jason.stdlib.intend
allIntentions, checkArguments, getMaxArgs, getMinArgsMethods inherited from class jason.asSemantics.DefaultInternalAction
canBeUsedInContext, destroy, prepareArguments, suspendIntention
-
Constructor Details
-
desire
public desire()
-
-
Method Details
-
execute
Description copied from interface:InternalActionExecutes 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:
executein interfaceInternalAction- Overrides:
executein classintend- Throws:
Exception
-
allDesires
-