Package jason.stdlib
Class succeed_goal
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.succeed_goal
- All Implemented Interfaces:
InternalAction,Serializable
@Manual(literal=".succeed_goal(goal)",
hint="remove goals from the agent circumstance as if a plan for such goal had successfully finished",
argsHint="the goals to be removed",
argsType="literal",
examples=".succeed_goal(go(X,3)): stops any attempt to achieve goals such as !go(1,3) as if it had already been achieved",
seeAlso={"jason.stdlib.intend","jason.stdlib.desire","jason.stdlib.drop_all_desires","jason.stdlib.drop_all_events","jason.stdlib.drop_all_intentions","jason.stdlib.drop_intention","jason.stdlib.drop_desire","jason.stdlib.fail_goal","jason.stdlib.intention","jason.stdlib.suspend","jason.stdlib.suspended","jason.stdlib.resume"})
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.
The meta-event ^!G[state(finished)] is produced.
Example:
-
.succeed_goal(go(X,3)): stops any attempt to achieve goals such as!go(1,3)as if it had already been achieved.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckArguments(Term[] args) voiddrop(TransitionSystem ts, IMCondition c, Unifier un) voiddrop(TransitionSystem ts, Literal l, Unifier un) intdropIntention(Intention i, IMCondition c, TransitionSystem ts, Unifier un) execute(TransitionSystem ts, Unifier un, Term[] args) Executes the internal action.intintMethods inherited from class jason.asSemantics.DefaultInternalAction
canBeUsedInContext, destroy, prepareArguments, suspendIntention
-
Constructor Details
-
succeed_goal
public succeed_goal()
-
-
Method Details
-
getMinArgs
public int getMinArgs()- Overrides:
getMinArgsin classDefaultInternalAction
-
getMaxArgs
public int getMaxArgs()- Overrides:
getMaxArgsin classDefaultInternalAction
-
checkArguments
- Overrides:
checkArgumentsin classDefaultInternalAction- Throws:
JasonException
-
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 classDefaultInternalAction- Throws:
Exception
-
drop
- Throws:
Exception
-
drop
- Throws:
Exception
-
dropIntention
public int dropIntention(Intention i, IMCondition c, TransitionSystem ts, Unifier un) throws JasonException - Throws:
JasonException
-