fr.lifl.jedi.model.interactionDeclaration
Class MultipleTargetInteraction

java.lang.Object
  extended by fr.lifl.jedi.model.interactionDeclaration.AbstractInteraction<java.util.List<Agent>>
      extended by fr.lifl.jedi.model.interactionDeclaration.MultipleTargetInteraction

public abstract class MultipleTargetInteraction
extends AbstractInteraction<java.util.List<Agent>>

This class corresponds to a knowledge unit of agents : an interaction that involves a number of target that depends on the situation in which the source agent is (it is a multicast interaction).

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.

Getting the set of targets of this interaction is done by applying a filter to the neighborhood of the source agent. The set of targets of the interaction correspond to the set of neighbors that respond to a particular criterion, defined by the method

When participating in such an interaction, the source agent becomes not activable until the end of the time step.

In addition, the target agents that can participate in the interaction can be restricted:

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
MultipleTargetInteraction()
           
 
Method Summary
abstract  boolean isNeighborMeetingCriterion(Environment e, Agent source, Agent neighbor)
          Criterion that returns true if the neighbor of the source agent fits the filtering criterion.
 boolean requiresActivableTarget()
          Checks if the target of this interaction has to be activable in order to be able to participate in it.
 void setRequiresActivableTarget(boolean value)
          Sets if the targets of this interaction have to be activable in order to be able to participate in it.
 void setTargetBecomesNotActivable(boolean value)
          Sets if the target of the interaction becomes not activable after participating in this interaction.
 boolean targetBecomesNotActivable()
          Checks if the target of the interaction becomes not activable after participating in this interaction.
 
Methods inherited from class fr.lifl.jedi.model.interactionDeclaration.AbstractInteraction
canPerform, perform, preconditions, trigger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultipleTargetInteraction

public MultipleTargetInteraction()
Method Detail

isNeighborMeetingCriterion

public abstract boolean isNeighborMeetingCriterion(Environment e,
                                                   Agent source,
                                                   Agent neighbor)
Criterion that returns true if the neighbor of the source agent fits the filtering criterion. If true, this agent is one of the targets of the interaction.

Parameters:
e - The environment where the simulation takes place.
source - The source of the interaction.
neighbor - The neighbor for which the criterion is checked.
Returns:
true if the neighbor meets the criterion.

targetBecomesNotActivable

public boolean targetBecomesNotActivable()
Checks if the target of the interaction becomes not activable after participating in this interaction.

Returns:
true if the target of the interaction becomes not activable after participating in this interaction.

setTargetBecomesNotActivable

public void setTargetBecomesNotActivable(boolean value)
Sets if the target of the interaction becomes not activable after participating in this interaction.

Parameters:
value - true if the target of the interaction becomes not activable after participating in this interaction.

requiresActivableTarget

public boolean requiresActivableTarget()
Checks if the target of this interaction has to be activable in order to be able to participate in it.

Returns:
true if the target of this interaction has to be activable in order to be able to participate in it.

setRequiresActivableTarget

public void setRequiresActivableTarget(boolean value)
Sets if the targets of this interaction have to be activable in order to be able to participate in it.

Parameters:
value - true if the targets of this interaction have to be activable in order to be able to participate in it. false if the targets can be activable or not activable to participate in the interaction as target.