jildt
Class setContext
java.lang.Object
jason.asSemantics.DefaultInternalAction
jildt.setContext
- All Implemented Interfaces:
- jason.asSemantics.InternalAction, java.io.Serializable
public class setContext
- extends jason.asSemantics.DefaultInternalAction
Internal action to set the context of a plan to a new learned context. Agents of the classLearner
are enabled to redefine the reasons for adopting a plan (Context), whenever a
new context has been learned.
Use:
jildt.setContext(P,LC)
Parameters:
- + plan label (Literal): the label of the plan which will be changed the context.
- + learned context (List): the learned context after the induction algorithm.
Examples:
-
jildt.setContext(put_label,[clear(X), clear(Y)])
: Changes the context of the plan
labeled as @put_label for the conjunction clear(X) & clear(Y).
-
jildt.setContext(put_label,clear(X))
: Throws an exception because the second argument
must be a list.
-
jildt.setContext(put_label, clear(X), clear(Y))
: Throws an exception due to only two
arguments are allowed for executing the internal action.
- Author:
- Carlos Alberto González-Alarcón, Alejandro Guerra-Hernández, Francisco Grimaldo-Moreno
- See Also:
- Serialized Form
Methods inherited from class jason.asSemantics.DefaultInternalAction |
prepareArguments, suspendIntention |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
setContext
public setContext()
execute
public java.lang.Object execute(jason.asSemantics.TransitionSystem ts,
jason.asSemantics.Unifier un,
jason.asSyntax.Term[] args)
throws java.lang.Exception
- Specified by:
execute
in interface jason.asSemantics.InternalAction
- Overrides:
execute
in class jason.asSemantics.DefaultInternalAction
- Throws:
java.lang.Exception
getMinArgs
public int getMinArgs()
- Overrides:
getMinArgs
in class jason.asSemantics.DefaultInternalAction
getMaxArgs
public int getMaxArgs()
- Overrides:
getMaxArgs
in class jason.asSemantics.DefaultInternalAction
canBeUsedInContext
public boolean canBeUsedInContext()
- Specified by:
canBeUsedInContext
in interface jason.asSemantics.InternalAction
- Overrides:
canBeUsedInContext
in class jason.asSemantics.DefaultInternalAction