|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSimulation
DESimulation
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 | |
DESimulation()
|
Method Summary | |
void |
addEvent(SimEvent newEvent)
addEvent -- add an event to the queue |
double |
getTime()
getTime -- return what time it is now. |
void |
log(String msg)
Log something -- write to console or interactions pane, And to the output file, if it exists. |
void |
run(double stopTime)
Run until a certain time step is reached, by calling setUp (which we hope creates the base agents and schedules the first round of events), then repeatedly processing an event from the eventQueue. |
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 |
protected EventQueue events
public double now
Constructor Detail |
public DESimulation()
Method Detail |
public double getTime()
public void addEvent(SimEvent newEvent)
public void log(String msg)
public void run(double stopTime)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |