|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.lifl.jedi.model.interactionSelection.reactiveSelection.InteractionSelectionPolicy
fr.lifl.jedi.model.interactionSelection.reactiveSelection.FirstTargetThenInteractionSelectionPolicy
public class FirstTargetThenInteractionSelectionPolicy
An interaction selection policy that performs selection first on target agents then on interaction.
This selection can only take place on interactions that have one single target.
This selection first lists all target agents that are present in source agents affordances -- i.e. all interactions it may initiate in this particular context. Then it performs a selection of a particular nature in order to choose the target agent with whom an interaction will be initiated.
If an agent was selected, then it will select an interaction to initiate with that agent, given a second selection nature. Selecting an interaction for that agent is the same than selecting a realizable tuple containing the target agent.
This selection nature can :
setDefaultInteractionSelectionNature(ElementSelectionNature)
method;
setInteractionSelectionNature(Class, ElementSelectionNature)
method.
JEDI V 2.2 |
Created the 7th nov. 2008 |
Modified the 4th may 2009 |
Yoann Kubera |
SMAC Team (Systèmes Multi-Agents et Comportement) |
LIFL (Laboratoire d'Informatique Fondamentale de Lille) |
University of Lille, France |
Field Summary |
---|
Fields inherited from class fr.lifl.jedi.model.interactionSelection.reactiveSelection.InteractionSelectionPolicy |
---|
DEFAULT_POLICY |
Constructor Summary | |
---|---|
FirstTargetThenInteractionSelectionPolicy(java.lang.String label)
Constructor of the interaction selection policy that first select an interaction, and then a target. |
Method Summary | |
---|---|
InteractionSelectionPolicy |
clone()
|
AbstractRealizableTuple<?> |
performSelection(java.util.List<AbstractRealizableTuple<?>> affordances)
Asks the policy to perform a selection among the realizable tuples list provided in parameter. |
void |
setDefaultInteractionSelectionNature(ElementSelectionNature<AbstractRealizableTuple<?>> e)
Sets the nature used to select the interaction that the source agent will initiate. |
void |
setInteractionSelectionNature(java.lang.Class<? extends Agent> a,
ElementSelectionNature<AbstractRealizableTuple<?>> e)
Sets the nature used to select the interaction that the source agent will initiate. |
void |
setTargetSelectionNature(ElementSelectionNature<Agent> n)
Sets the nature used to select the target agent. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FirstTargetThenInteractionSelectionPolicy(java.lang.String label)
label
- A label used to name this policy.
This label is mainly used for debug purpose.Method Detail |
---|
public void setTargetSelectionNature(ElementSelectionNature<Agent> n)
n
- The nature of target agent selection.public void setDefaultInteractionSelectionNature(ElementSelectionNature<AbstractRealizableTuple<?>> e)
This attribute is used if the same nature is used to select an interaction, independently from which agent was selected.
e
- The nature used to select the interaction that the source agent will initiate.public void setInteractionSelectionNature(java.lang.Class<? extends Agent> a, ElementSelectionNature<AbstractRealizableTuple<?>> e)
This attribute is used if different natures are used to select an interaction, independently from which agent was selected.
a
- The target agent class for which the interaction selection nature is defined.e
- The nature used to select the interaction that the source agent will initiate.public AbstractRealizableTuple<?> performSelection(java.util.List<AbstractRealizableTuple<?>> affordances)
InteractionSelectionPolicy
performSelection
in class InteractionSelectionPolicy
affordances
- The realizable tuples list among which selection is made.
Returns null
if no tuple was selected.
InteractionSelectionPolicy.performSelection(java.util.List)
public InteractionSelectionPolicy clone()
clone
in class InteractionSelectionPolicy
InteractionSelectionPolicy.clone()
public java.lang.String toString()
toString
in class InteractionSelectionPolicy
InteractionSelectionPolicy.toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |