visidia.simulation.process.agent
Class SynchronousAgent

java.lang.Object
  extended by visidia.misc.property.PropertyTable
      extended by visidia.simulation.process.agent.Agent
          extended by visidia.simulation.process.agent.SynchronousAgent
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Runnable
Direct Known Subclasses:
AgentRules

public abstract class SynchronousAgent
extends Agent

Extend this class to implement Synchronized Agents.

See Also:
Agent, Serialized Form

Field Summary
 
Fields inherited from class visidia.simulation.process.agent.Agent
agentMover, proc
 
Constructor Summary
SynchronousAgent()
           
 
Method Summary
 int getPulse()
          Gets the current pulse.
 void nextPulse()
          Call this method when you want synchronization between agents.
protected  void planning(SynchronousAgent agent)
          Defines what two agents (current agent and the one given in parameter) do when they meet.
 
Methods inherited from class visidia.simulation.process.agent.Agent
agentsOnVertex, clone, entryDoor, getArity, getDestinationVertex, getEdgeProperty, getNetSize, getProperty, getVertexIdentity, getVertexLabel, getVertexProperty, init, lockVertexIfPossible, lockVertexProperties, move, moveBack, moveToDoor, run, setAgentMover, setAgentProcess, setDoorState, setEdgeProperty, setProperty, setProperty, setVertexLabel, setVertexProperty, setVertexProperty, sleep, toString, unlockVertexProperties, vertexPropertiesLocked
 
Methods inherited from class visidia.misc.property.PropertyTable
containsElement, entrySet, getLockOwner, getPropertyKeys, getVisidiaProperty, isPersistentProperty, locked, lockProperties, removeProperty, resetProperties, setProperties, setVisidiaProperty, unlockProperties
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SynchronousAgent

public SynchronousAgent()
Method Detail

planning

protected void planning(SynchronousAgent agent)
Defines what two agents (current agent and the one given in parameter) do when they meet.

Parameters:
agent - the agent

getPulse

public final int getPulse()
Gets the current pulse.

Returns:
the pulse

nextPulse

public final void nextPulse()
Call this method when you want synchronization between agents. Every synchronized agent will wait until the last has finished.