fr.lifl.jedi.model.interactionDeclaration
Class DegenerateInteraction

java.lang.Object
  extended by fr.lifl.jedi.model.interactionDeclaration.AbstractInteraction<Agent>
      extended by fr.lifl.jedi.model.interactionDeclaration.DegenerateInteraction

public abstract class DegenerateInteraction
extends AbstractInteraction<Agent>

This class represents an interaction that occurs only with single source agent.

Degenerate interactions are particular interaction, which have an implicit target. This target is either the agent itself (reflexive interaction), or the environment. Thus, such an interaction does not specify any kind of target agent class.

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

Constructor Summary
DegenerateInteraction()
           
 
Method Summary
abstract  void perform(Environment environment, Agent source)
          Describes the action sequence of this interaction.
 void perform(Environment environment, Agent source, Agent target)
          Describes the action sequence of this interaction.
abstract  boolean preconditions(Environment environment, Agent source)
          Physical or logical possibility to perform the interaction.
 boolean preconditions(Environment environment, Agent source, Agent target)
          Physical or logical possibility to perform the interaction.
abstract  boolean trigger(Environment environment, Agent source)
          Implicit or explicit motivation to perform the interaction.
 boolean trigger(Environment environment, Agent source, Agent target)
          Implicit or explicit motivation to perform the interaction.
 
Methods inherited from class fr.lifl.jedi.model.interactionDeclaration.AbstractInteraction
canPerform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DegenerateInteraction

public DegenerateInteraction()
Method Detail

trigger

public abstract boolean trigger(Environment environment,
                                Agent source)
Implicit or explicit motivation to perform the interaction.

See Also:
AbstractInteraction.trigger(Environment, Agent, Object)

preconditions

public abstract boolean preconditions(Environment environment,
                                      Agent source)
Physical or logical possibility to perform the interaction.

See Also:
AbstractInteraction.preconditions(Environment, Agent, Object)

perform

public abstract void perform(Environment environment,
                             Agent source)
Describes the action sequence of this interaction.

See Also:
AbstractInteraction.perform(Environment, Agent, Object)

trigger

public boolean trigger(Environment environment,
                       Agent source,
                       Agent target)
Description copied from class: AbstractInteraction
Implicit or explicit motivation to perform the interaction.

Thus, the actions of the interaction will achieve or reduce this motivation.

For instance "To be hungry" is the trigger of an "Eat" interaction.

Specified by:
trigger in class AbstractInteraction<Agent>
Parameters:
environment - The environment where the interaction occurs.
source - The source agent that initiates the interaction.
target - The target agent that undergoes the interaction
Returns:
true if the triggering conditions are met.
See Also:
AbstractInteraction.trigger(fr.lifl.jedi.model.Environment, fr.lifl.jedi.model.Agent, java.lang.Object)

preconditions

public boolean preconditions(Environment environment,
                             Agent source,
                             Agent target)
Description copied from class: AbstractInteraction
Physical or logical possibility to perform the interaction.

For instance : "To have a key" is a precondition of an "Unlock" interaction.

Specified by:
preconditions in class AbstractInteraction<Agent>
Parameters:
environment - The environment where the interaction occurs.
source - The source agent that initiates the interaction.
target - The target agent that undergoes the interaction
Returns:
true if the conditions are met.
See Also:
AbstractInteraction.preconditions(fr.lifl.jedi.model.Environment, fr.lifl.jedi.model.Agent, java.lang.Object)

perform

public void perform(Environment environment,
                    Agent source,
                    Agent target)
Description copied from class: AbstractInteraction
Describes the action sequence of this interaction.

Specified by:
perform in class AbstractInteraction<Agent>
Parameters:
environment - The environment where the interaction occurs.
source - The source agent that initiates the interaction.
target - The target agent that undergoes the interaction.
See Also:
AbstractInteraction.perform(fr.lifl.jedi.model.Environment, fr.lifl.jedi.model.Agent, java.lang.Object)