Package jadex.bdi.annotation
Annotation Interface Goal
Let a class be used to represent goals of a BDI agent.
Can be annotated to inner classes of an agent or in a
Goals
annotation to refer to external classes.
Settings of this annotation give detailed control over the means-end reasoning
and goal deliberation processes (see Deliberation
) with regard to the annotated goal.
The means-end reasoning is the process of plan selection and execution and is based
on the notion of an "applicable plans list" (APL). When the goal needs processing,
the agent determines the applicable plans and stores them in the APL.
By default the plans are tried sequentially in the given order.
Several goal flags like randomselection
and posttoall
allow changing this behavior.-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass
<?> The goal class, when used inside aGoals
annotation.The deliberation settings.When to exclude a plan from the APL after it has been executed.boolean
Should a procedural goal succeed when first plan executed successfully or after all plans have been executed (with at least one passed plan).boolean
Post the goal to all plans of the APL in parallel.The publication settings can be used to export goal as a component service.boolean
Select a plan randomly.boolean
Rebuild the APL on each retry;boolean
If true (defaults to false), a new round of means-end reasoning is started after each plan execution.long
The delay (default 0 for no delay) before restarting goal processing if recur is set to true (in milliseconds).boolean
If true (default) means-end reasoning is allowed to select another plan after a plan has already been executed.long
The delay between two plan executions (in milliseconds).Class<?>[]
The goal trigger is used in case the goal should be considered as plan for another goal.boolean
Should the goal be unique (no other goal is allowed that is the same).
-
Element Details
-
clazz
Class<?> clazzThe goal class, when used inside aGoals
annotation.- Default:
java.lang.Object.class
-
posttoall
boolean posttoallPost the goal to all plans of the APL in parallel.- Default:
false
-
randomselection
boolean randomselectionSelect a plan randomly.- Default:
false
-
rebuild
boolean rebuildRebuild the APL on each retry;- Default:
false
-
excludemode
ExcludeMode excludemodeWhen to exclude a plan from the APL after it has been executed. Default is to execute it after it has been tried without consideration of its success state.- Default:
WhenTried
-
retry
boolean retryIf true (default) means-end reasoning is allowed to select another plan after a plan has already been executed.- Default:
true
-
recur
boolean recurIf true (defaults to false), a new round of means-end reasoning is started after each plan execution. As a result, the APL is rebuild and the exclude set is cleared.- Default:
false
-
retrydelay
long retrydelayThe delay between two plan executions (in milliseconds).- Default:
-1L
-
recurdelay
long recurdelayThe delay (default 0 for no delay) before restarting goal processing if recur is set to true (in milliseconds).- Default:
0L
-
orsuccess
boolean orsuccessShould a procedural goal succeed when first plan executed successfully or after all plans have been executed (with at least one passed plan). Plan success flag. Determines when a goal is succeeded depending on plan success. Default a procedural goal has succeeded when the first plan has passed. If not 'or' but 'and' mode is used the goal will only succeed after execution of the last plan from the APL.- Default:
true
-
unique
boolean uniqueShould the goal be unique (no other goal is allowed that is the same).- Default:
false
-
deliberation
Deliberation deliberationThe deliberation settings.- Default:
@jadex.bdi.annotation.Deliberation
-
publish
Publish publishThe publication settings can be used to export goal as a component service.- Default:
@jadex.bdi.annotation.Publish(type=java.lang.Object.class)
-
triggergoals
Class<?>[] triggergoalsThe goal trigger is used in case the goal should be considered as plan for another goal.- Default:
{}
-