Class DSSimulation

java.lang.Object
  extended by Simulation
      extended by DSSimulation

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.

Author:
Mark Guzdial, Barb Ericson

Field Summary
protected  EventQueue events
          Queue for Events
 
Constructor Summary
DSSimulation()
          No argument constructor
 
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, getOutput, getWorld, openFile, openFrames, remove, run, run, setUp, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

events

protected EventQueue events
Queue for Events

Constructor Detail

DSSimulation

public DSSimulation()
No argument constructor

Method Detail

getTime

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

Returns:
the time

addEvent

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

Parameters:
newEvent - the event to add