|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectSimulation
DESimulation
public class DESimulation
DSSimulation is a Discrete Event Simulation Instead of asking each agent to act(), we simply process events from a queue.
| Constructor Summary | |
|---|---|
DESimulation()
No argument constructor |
|
DESimulation(Picture bg)
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. |
void |
log(String msg)
Log something -- write to the 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, 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 |
| Constructor Detail |
|---|
public DESimulation()
public DESimulation(Picture bg)
| Method Detail |
|---|
public double getTime()
public void addEvent(SimEvent newEvent)
newEvent - the event to addpublic void log(String msg)
msg - the message to writepublic void run(double stopTime)
stopTime - the time to stop
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||