Package jason.stdlib
Class relevant_plan
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.relevant_plan
- All Implemented Interfaces:
InternalAction
,Serializable
Internal action: .relevant_plan
.
Description: gets relevant plans for some triggering event. This is a backtracking based version of .relevant_plans.
Parameters:
- +/- trigger (trigger): the triggering event, enclosed by { and }.
- +/- plan (plan as term): a relevant plan for the trigger.
Example:
-
.relevant_plan({+!go(X,Y)},P)
: unifies P with all plans that are relevant for the triggering event+!go(X,Y)
. To find all plans the internal action .findall can be used to backtrack on all solutions:.findall(P, .relevant_plan({+!go(X,Y)},P), ListOfPlans)
. To find all plans from file source "a.asl":.findall(P, .relevant_plan({+!go(X,Y)},P]) invalid input: '&' .plan_label(P,L[file("a.asl")), ListPlans)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionexecute
(TransitionSystem ts, Unifier un, Term[] args) Executes the internal action.int
int
Methods inherited from class jason.asSemantics.DefaultInternalAction
canBeUsedInContext, checkArguments, destroy, prepareArguments, suspendIntention
-
Constructor Details
-
relevant_plan
public relevant_plan()
-
-
Method Details
-
getMinArgs
public int getMinArgs()- Overrides:
getMinArgs
in classDefaultInternalAction
-
getMaxArgs
public int getMaxArgs()- Overrides:
getMaxArgs
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
-