Package jason.stdlib

Class relevant_plans

All Implemented Interfaces:
InternalAction, Serializable

@Manual(literal=".relevant_plans(trigger,plans[,labels])", hint="gets all relevant plans for some triggering event", argsHint={"the triggering event, enclosed by { and }","the list of plan terms corresponding to the code of the relevant plans","the list of labels of the plans [optional]"}, argsType={"trigger","list of plan terms","list"}, examples={".relevant_plans({+!go(X,Y)},LP): unifies LP with all plans in the agent\'s plan library that are relevant for the triggering event +!go(X,Y)",".relevant_plans({+!go(X,Y)},LP, LL): same as above but also unifies LL with a list of labels of plans in LP",".relevant_plans({+!_},_,LL): gets the labels of all plans for achievement goals"}, seeAlso={"jason.stdlib.add_plan","jason.stdlib.plan_label","jason.stdlib.remove_plan"}) public class relevant_plans extends DefaultInternalAction

Internal action: .relevant_plans.

Description: gets all relevant plans for some triggering event. This internal action is used, for example, to answer "askHow" messages.

Parameters:

  • + trigger (trigger): the triggering event, enclosed by { and }.
  • - plans (list of plan terms): the list of plan terms corresponding to the code of the relevant plans.
  • - labels (list, optional): the list of labels of the plans.

Example:

  • .relevant_plans({+!go(X,Y)},LP): unifies LP with a list of all plans in the agent's plan library that are relevant for the triggering event +!go(X,Y).
  • .relevant_plans({+!go(X,Y)},LP, LL): same as above but also unifies LL with a list of labels of plans in LP.
  • .relevant_plans({+!_},_,LL): gets the labels of all plans for achievement goals.
See Also: