Class DSSimulation

java.lang.Object
  extended bySimulation
      extended byDSSimulation

public class DSSimulation
extends Simulation

DSSimulation is a Discrete Event Simulation Instead of asking each agent to act(), we simply process events from a queue.


Field Summary
protected  EventQueue events
          Queue for Events
 double now
          current time
 
Fields inherited from class Simulation
agents, frames, output, world
 
Constructor Summary
DSSimulation()
           
 
Method Summary
 void addEvent(SimEvent newEvent)
          addEvent -- add an event to the queue
 double getTime()
          getTime -- return what time it is now.
 
Methods inherited from class Simulation
add, closeFile, endStep, getAgents, lineForFile, openFile, openFrames, remove, run, run, setUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

events

protected EventQueue events
Queue for Events


now

public double now
current time

Constructor Detail

DSSimulation

public DSSimulation()
Method Detail

getTime

public double getTime()
getTime -- return what time it is now.


addEvent

public void addEvent(SimEvent newEvent)
addEvent -- add an event to the queue