|
SSJ V. 1.2.5. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.simevents.Sim
public final class Sim
This static class contains the executive of a discrete-event simulation. It maintains the simulation clock and starts executing the events in the appropriate order. Its methods permit one to start, stop, and (re)initialize the simulation, and read the simulation clock.
Method Summary | |
---|---|
static EventList |
getEventList()
Gets the currently used event list. |
static void |
init()
Reinitializes the simulation executive by clearing up the event list, and resetting the simulation clock to zero. |
static void |
init(EventList evlist)
Same as init , but also chooses evlist as the
event list to be used. |
static Event |
removeFirstEvent()
This method is used by the package simprocs ;
it should not be used directly by a simulation program. |
static void |
start()
Starts the simulation executive. |
static void |
stop()
Tells the simulation executive to stop as soon as it takes control, and to return control to the program that called start . |
static double |
time()
Returns the current value of the simulation clock. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static double time()
public static void init()
SimProcess.init
must be used instead.
public static void init(EventList evlist)
init
, but also chooses evlist as the
event list to be used.
For example, init (new DoublyLinked()) initializes the simulation
with a doubly linked linear structure for the event list.
This method must not be used to initialize process-driven
simulation; SimProcess.init
must be used instead.
evlist
- selected event list implementationpublic static EventList getEventList()
public static Event removeFirstEvent()
simprocs
;
it should not be used directly by a simulation program.
It removes the first event from the event list and sets the simulation
clock to its event time.
public static void start()
public static void stop()
start
.
This program will then continue
executing from the instructions right after its call to Sim.start.
If an Event
is currently executing (and this event has just called
Sim.stop), the executive will take
control when the event terminates its execution.
|
SSJ V. 1.2.5. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |