net.sourceforge.jabm
Class RepeatedInteractionSimulation

java.lang.Object
  extended by net.sourceforge.jabm.AbstractSimulation
      extended by net.sourceforge.jabm.SimpleSimulation
          extended by net.sourceforge.jabm.RepeatedInteractionSimulation
All Implemented Interfaces:
java.io.Serializable, java.lang.Runnable, Simulation

public class RepeatedInteractionSimulation
extends SimpleSimulation
implements java.io.Serializable

A simulation in which agents repeatedly arrive at the simulation in multiple rounds.

See Also:
Serialized Form
 

Field Summary
protected  int maximumRounds
          The maximum number of rounds.
protected  int round
          The current round a.k.a.
 
Fields inherited from class net.sourceforge.jabm.AbstractSimulation
agentInitialiser, agentMixer, isPaused, isRunning, PAUSE_SLEEP_INTERVAL_MS, population, simulationController, slowSleepInterval
 
Constructor Summary
RepeatedInteractionSimulation()
           
RepeatedInteractionSimulation(SimulationController simulationController)
           
 
Method Summary
 int getMaximumRounds()
           
 SimulationTime getSimulationTime()
          Query the current simulation time.
 void run()
           
 void setMaximumRounds(int maximumRounds)
          Configure the maximum number of rounds this simulation will run before being automatically terminated.
 
Methods inherited from class net.sourceforge.jabm.SimpleSimulation
begin, end, step
 
Methods inherited from class net.sourceforge.jabm.AbstractSimulation
addListener, fireEvent, getAgentInitialiser, getAgentMixer, getPopulation, getSimulationController, getSlowSleepInterval, initialiseAgents, invokeAgentInteractions, pause, resume, setAgentInitialiser, setAgentMixer, setPopulation, setSimulationController, setSlowSleepInterval, slow, terminate, waitIfPaused, waitIfSlowed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

round

protected int round
The current round a.k.a. tick.


maximumRounds

protected int maximumRounds
The maximum number of rounds.

Constructor Detail

RepeatedInteractionSimulation

public RepeatedInteractionSimulation(SimulationController simulationController)

RepeatedInteractionSimulation

public RepeatedInteractionSimulation()
Method Detail

getSimulationTime

public SimulationTime getSimulationTime()
Description copied from interface: Simulation
Query the current simulation time.

Specified by:
getSimulationTime in interface Simulation
Overrides:
getSimulationTime in class SimpleSimulation

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class SimpleSimulation

getMaximumRounds

public int getMaximumRounds()

setMaximumRounds

public void setMaximumRounds(int maximumRounds)
Configure the maximum number of rounds this simulation will run before being automatically terminated.

Parameters:
maximumRounds -