|
||||||||||
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.FirstInteractionThenTargetSelectionPolicy
public class FirstInteractionThenTargetSelectionPolicy
An interaction selection policy that performs selection first on interactions then on agents.
This selection first lists all interactions that are present in source agents realizable tuples -- 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 interaction that will be performed.
If an interaction was selected, then it will select a target for that interaction, given a second selection nature. Selecting a target for that interaction is the same than selecting a realizable tuple containing the interaction.
This selection nature can :
setDefaultTargetSelectionNature(ElementSelectionNature)
method;
setTargetSelectionNature(AbstractInteraction, ElementSelectionNature)
method.
JEDI V 2.2 |
Created the 7th nov. 2008 |
Modified the 5th 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 | |
---|---|
FirstInteractionThenTargetSelectionPolicy(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 |
setDefaultTargetSelectionNature(ElementSelectionNature<AbstractRealizableTuple<?>> e)
Sets the nature used to select the target of an initiated interaction. |
void |
setInteractionSelectionNature(ElementSelectionNature<AbstractInteraction<?>> n)
Sets the nature used to select the interaction. |
void |
setTargetSelectionNature(AbstractInteraction<?> i,
ElementSelectionNature<AbstractRealizableTuple<?>> e)
Sets the nature used to select the target of an initiated interaction. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FirstInteractionThenTargetSelectionPolicy(java.lang.String label)
label
- A label used to name this policy.
This label is mainly used for debug purpose.Method Detail |
---|
public void setInteractionSelectionNature(ElementSelectionNature<AbstractInteraction<?>> n)
n
- The nature of interaction selection.public void setDefaultTargetSelectionNature(ElementSelectionNature<AbstractRealizableTuple<?>> e)
This method is used when every interaction select their target the same way.
e
- The nature of the target selectionpublic void setTargetSelectionNature(AbstractInteraction<?> i, ElementSelectionNature<AbstractRealizableTuple<?>> e)
This method is used when interactions select their target differently.
i
- The interaction for which the target selection nature is defined.e
- The nature of the target selection.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 |