|
SSJ V. 2.6.2. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectumontreal.iro.lecuyer.simevents.Simulator
umontreal.iro.lecuyer.simprocs.ProcessSimulator
umontreal.iro.lecuyer.simprocs.ThreadProcessSimulator
public class ThreadProcessSimulator
Represents a process simulator using Java threads for process synchronization. The simulation process threads are synchronized so only one process runs at a time.
| Field Summary |
|---|
| Fields inherited from class umontreal.iro.lecuyer.simevents.Simulator |
|---|
defaultSimulator |
| Constructor Summary | |
|---|---|
ThreadProcessSimulator()
Creates a new ThreadProcessSimulator variable. |
|
| Method Summary | |
|---|---|
umontreal.iro.lecuyer.simprocs.SimThread |
createControlEvent(SimProcess process)
Constructs and returns a new Event object used for synchronization. |
void |
delay(SimProcess process,
double delay)
Suspends the execution of process and schedules it to resume its execution in delay units of simulation time. |
void |
init()
Initializes the thread process-driven simulation using SplayTree algorithm
as EventList. |
void |
init(EventList evlist)
Initializes the thread process-driven simulation using evlist variable as EventList. |
void |
kill(SimProcess process)
Terminates the life of process and sets its state to DEAD, after canceling its control event if there is one. |
void |
killAll()
Kills all threads linked to the current variable. |
void |
suspend(SimProcess process)
Suspends process. |
| Methods inherited from class umontreal.iro.lecuyer.simprocs.ProcessSimulator |
|---|
currentProcess, initDefault, newInstance |
| Methods inherited from class umontreal.iro.lecuyer.simevents.Simulator |
|---|
continuousState, getDefaultSimulator, getEventList, isSimulating, isStopped, start, stop, time |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThreadProcessSimulator()
ThreadProcessSimulator variable.
| Method Detail |
|---|
public void init()
SplayTree algorithm
as EventList.
This kills all processes already associated with the current variable.
init in class Simulatorpublic void init(EventList evlist)
EventList.
This kills all processes already associated with the current variable.
init in class Simulatorevlist - EventList assigned to the current variable eventlist fieldpublic umontreal.iro.lecuyer.simprocs.SimThread createControlEvent(SimProcess process)
ProcessSimulatorEvent object used for synchronization.
Such control events are used by process simulator to start a process or to resume it if it is already
started.
createControlEvent in class ProcessSimulator
public void delay(SimProcess process,
double delay)
ProcessSimulator
delay in class ProcessSimulatorprocess - SimProcess variable to delay.delay - delay value, in simulation time units.public void suspend(SimProcess process)
ProcessSimulator
suspend in class ProcessSimulatorprocess - SimProcess variable to suspend.public void kill(SimProcess process)
ProcessSimulator
kill in class ProcessSimulatorpublic void killAll()
killAll in class ProcessSimulator
|
SSJ V. 2.6.2. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||