SSJ
V. 2.6.

umontreal.iro.lecuyer.simprocs
Class DSOLProcessSimulator

java.lang.Object
  extended by umontreal.iro.lecuyer.simevents.Simulator
      extended by umontreal.iro.lecuyer.simprocs.ProcessSimulator
          extended by umontreal.iro.lecuyer.simprocs.DSOLProcessSimulator

public class DSOLProcessSimulator
extends ProcessSimulator

Represents a simulation process whose actions method is interpreted by the DSOL interpreter, written by Peter Jacobs (http://www.tbm.tudelft.nl/webstaf/peterja/index.htm). When a process executes, a virtual machine implemented in Java is invoked to interpret the byte-code. The processes are then simulated in a single Java thread, which allows a much larger number of threads than when each process has its own native thread, at the expense of a slower execution time.


Field Summary
 
Fields inherited from class umontreal.iro.lecuyer.simevents.Simulator
defaultSimulator
 
Constructor Summary
DSOLProcessSimulator()
          Constructs a new DSOLProcessSimulator variable without initialization.
 
Method Summary
 umontreal.iro.lecuyer.simprocs.ResumeEvent 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 process-driven simulation.
 void init(EventList evlist)
          Initializes the simulation and sets the given event list evlist to be used by the simulation executive.
 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 currently living (active, delayed, or suspended) processes managed by this simulator.
 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

DSOLProcessSimulator

public DSOLProcessSimulator()
Constructs a new DSOLProcessSimulator variable without initialization.

Method Detail

init

public void init()
Initializes the process-driven simulation. Calls super.init().

Overrides:
init in class Simulator

init

public void init(EventList evlist)
Initializes the simulation and sets the given event list evlist to be used by the simulation executive. Calls super.init(evlist).

Overrides:
init in class Simulator
Parameters:
evlist - selected event list implementation

createControlEvent

public umontreal.iro.lecuyer.simprocs.ResumeEvent createControlEvent(SimProcess process)
Description copied from class: ProcessSimulator
Constructs and returns a new Event 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.

Specified by:
createControlEvent in class ProcessSimulator

delay

public void delay(SimProcess process,
                  double delay)
Description copied from class: ProcessSimulator
Suspends the execution of process and schedules it to resume its execution in delay units of simulation time. The state of the process also changes to DELAYED.

Specified by:
delay in class ProcessSimulator
Parameters:
process - SimProcess variable to delay.
delay - delay value, in simulation time units.

suspend

public void suspend(SimProcess process)
Description copied from class: ProcessSimulator
Suspends process. If the process is EXECUTING, this suspends its execution. If the process is DELAYED, this cancels its control event. This method also places the process in the SUSPENDED state.

Specified by:
suspend in class ProcessSimulator
Parameters:
process - SimProcess variable to suspend.

kill

public void kill(SimProcess process)
Description copied from class: ProcessSimulator
Terminates the life of process and sets its state to DEAD, after canceling its control event if there is one.

Specified by:
kill in class ProcessSimulator

killAll

public void killAll()
Description copied from class: ProcessSimulator
Kills all currently living (active, delayed, or suspended) processes managed by this simulator.

Specified by:
killAll in class ProcessSimulator

SSJ
V. 2.6.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.