fr.lifl.jedi.model.interactionDeclaration
Class MultipleTargetAssignationElement

java.lang.Object
  extended by fr.lifl.jedi.model.interactionDeclaration.AbstractAssignationElement<MultipleTargetInteraction>
      extended by fr.lifl.jedi.model.interactionDeclaration.MultipleTargetAssignationElement

public class MultipleTargetAssignationElement
extends AbstractAssignationElement<MultipleTargetInteraction>

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 interactions that involves a number of target agents that depends on the situation in which the source agent is.

For instance, an ill agent can be the source of an Infect interaction, which effect is to transmit the disease to all healthy agents that share its position.

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 4th may 2009
Author:
Yoann Kubera
SMAC Team (Systèmes Multi-Agents et Comportement)
LIFL (Laboratoire d'Informatique Fondamentale de Lille)
University of Lille, France

Constructor Summary
MultipleTargetAssignationElement(MultipleTargetInteraction interaction, java.lang.Class<?> target, double limitDistance)
          Constructor of an assignation element that represents an interaction that can occur between a source agent and a number of target agents that depends on the situation in which the source agent is.
 
Method Summary
 AbstractAssignationElement<MultipleTargetInteraction> 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

MultipleTargetAssignationElement

public MultipleTargetAssignationElement(MultipleTargetInteraction interaction,
                                        java.lang.Class<?> target,
                                        double limitDistance)
Constructor of an assignation element that represents an interaction that can occur between a source agent and a number of target agents that depends on the situation in which the source agent is.

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 family of target agents.
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<MultipleTargetInteraction>
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<MultipleTargetInteraction> clone()
Specified by:
clone in class AbstractAssignationElement<MultipleTargetInteraction>
See Also:
AbstractAssignationElement.clone()

toString

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