fr.lifl.jedi.model.interactionDeclaration
Class SingleTargetAssignationElement

java.lang.Object
  extended by fr.lifl.jedi.model.interactionDeclaration.AbstractAssignationElement<SingleTargetInteraction>
      extended by fr.lifl.jedi.model.interactionDeclaration.SingleTargetAssignationElement

public class SingleTargetAssignationElement
extends AbstractAssignationElement<SingleTargetInteraction>

Class representing an element of a cell of the interaction matrix -- i.e. an interaction that a particular source agent has the ability to initiate.

This assignation element is designed for regular interactions -- i.e. interactions that occur between a source agent and a target agent.

Such interactions can be performed only if the distance separating source and target agent is under a limit distance.

Version:
JEDI V 2.2
Created the 5th nov. 2008
Modified the 4th may 2008
Author:
Yoann Kubera
SMAC Team (Systèmes Multi-Agents et Comportement)
LIFL (Laboratoire d'Informatique Fondamentale de Lille)
University of Lille, France

Constructor Summary
SingleTargetAssignationElement(SingleTargetInteraction interaction, java.lang.Class<?> target, double limitDistance)
          Constructor of an assignation element that represents an interaction that can occur between a source and a target agent.
 
Method Summary
 AbstractAssignationElement<SingleTargetInteraction> clone()
           
 double getLimitDistance()
          Gets the limit distance of this assignation element.
 java.lang.Class<?> getTargetAgentFamily()
          Gets the class of the agent family used as the target of the interaction.
 void listAllRealizableTuples(Environment e, Agent source, java.util.Set<Agent> neighbors, java.util.List<AbstractRealizableTuple<?>> tuples)
          Adds to the list tuples all realizable tuples that can be built for the source agent, which has a set of neighbors neighbors.
 java.lang.String toString()
           
 
Methods inherited from class fr.lifl.jedi.model.interactionDeclaration.AbstractAssignationElement
getInteraction
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SingleTargetAssignationElement

public SingleTargetAssignationElement(SingleTargetInteraction interaction,
                                      java.lang.Class<?> target,
                                      double limitDistance)
Constructor of an assignation element that represents an interaction that can occur between a source and a target agent.

The limit distance corresponds to the distance under which source and target agent can perform the interaction.

Parameters:
interaction - The interaction associated with this assignation element.
target - The class of the target agent family.
limitDistance - The limit distance of this assignation element
Method Detail

getTargetAgentFamily

public java.lang.Class<?> getTargetAgentFamily()
Gets the class of the agent family used as the target of the interaction.

Returns:
the class of the agent family used as the target of the interaction.

getLimitDistance

public double getLimitDistance()
Gets the limit distance of this assignation element.

It corresponds to the maximal distance separating source and target agent so that the interaction can occur between them.

Returns:
the limit distance of this assignation element.

listAllRealizableTuples

public void listAllRealizableTuples(Environment e,
                                    Agent source,
                                    java.util.Set<Agent> neighbors,
                                    java.util.List<AbstractRealizableTuple<?>> tuples)
Description copied from class: AbstractAssignationElement
Adds to the list tuples all realizable tuples that can be built for the source agent, which has a set of neighbors neighbors.

Specified by:
listAllRealizableTuples in class AbstractAssignationElement<SingleTargetInteraction>
Parameters:
e - The environment where the interaction takes place.
source - The source agent for which realizable tuples are listed.
neighbors - The set of neighbors of the source agent.
tuples - The list where the realizable tuples are added.
See Also:
AbstractAssignationElement.listAllRealizableTuples(fr.lifl.jedi.model.Environment, fr.lifl.jedi.model.Agent, java.util.Set, java.util.List)

clone

public AbstractAssignationElement<SingleTargetInteraction> clone()
Specified by:
clone in class AbstractAssignationElement<SingleTargetInteraction>
See Also:
AbstractAssignationElement.clone()

toString

public java.lang.String toString()
Specified by:
toString in class AbstractAssignationElement<SingleTargetInteraction>
See Also:
AbstractAssignationElement.toString()