net.sourceforge.jabm.event
Class AgentArrivalEvent

java.lang.Object
  extended by net.sourceforge.jabm.event.SimEvent
      extended by net.sourceforge.jabm.event.SimulationControllerEvent
          extended by net.sourceforge.jabm.event.AgentArrivalEvent
All Implemented Interfaces:
java.io.Serializable

public class AgentArrivalEvent
extends SimulationControllerEvent
implements java.io.Serializable

An event that is fired whenever an agent arrives at the simulation. Typically, but not always, this will be at the start of a simulation tick.

See Also:
Serialized Form
 

Field Summary
protected  java.util.ArrayList<Agent> objects
          An optional list of agents that have arrived at the same time as the main agent.
protected  Agent subject
          The main agent that has arrived at the simulation.
 
Fields inherited from class net.sourceforge.jabm.event.SimulationControllerEvent
simulationController
 
Constructor Summary
AgentArrivalEvent(SimulationController controller, Agent subject, java.util.ArrayList<Agent> objects)
           
 
Method Summary
 java.util.ArrayList<Agent> getObjects()
           
 Agent getSubject()
           
 void setObjects(java.util.ArrayList<Agent> objects)
           
 void setSubject(Agent subject)
           
 
Methods inherited from class net.sourceforge.jabm.event.SimulationControllerEvent
getSimulationController
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

subject

protected Agent subject
The main agent that has arrived at the simulation.


objects

protected java.util.ArrayList<Agent> objects
An optional list of agents that have arrived at the same time as the main agent. This is used to implement mixing models in which, for example, agents are randomly paired with one another in some interaction.

Constructor Detail

AgentArrivalEvent

public AgentArrivalEvent(SimulationController controller,
                         Agent subject,
                         java.util.ArrayList<Agent> objects)
Method Detail

getSubject

public Agent getSubject()

setSubject

public void setSubject(Agent subject)

getObjects

public java.util.ArrayList<Agent> getObjects()

setObjects

public void setObjects(java.util.ArrayList<Agent> objects)