SSJ
V. 1.2.5.

umontreal.iro.lecuyer.simprocs.dsol
Class SimProcess

java.lang.Object
  extended by umontreal.iro.lecuyer.simprocs.AbstractSimProcess
      extended by umontreal.iro.lecuyer.simprocs.dsol.SimProcess

public abstract class SimProcess
extends AbstractSimProcess

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. To use this implementation in a program instead of the thread-based implementation provides in the standard SimProcess class, it suffices to replace the import statement

import umontreal.iro.lecuyer.simprocs.SimProcess;
by
import umontreal.iro.lecuyer.simprocs.dsol.SimProcess;


Field Summary
 
Fields inherited from class umontreal.iro.lecuyer.simprocs.AbstractSimProcess
DEAD, DELAYED, EXECUTING, INITIAL, SUSPENDED
 
Constructor Summary
SimProcess()
          Constructs a new process without scheduling it.
 
Method Summary
 void delay(double delay)
          Suspends the execution of the currently executing process and schedules it to resume its execution in delay units of simulation time.
static void init()
          Initializes the process-driven simulation.
static void init(EventList evlist)
          Initializes the simulation and sets the given event list evlist to be used by the simulation executive.
 void kill()
          Terminates the life of this process and sets its state to DEAD, after canceling its activating event if there is one.
 void suspend()
          This method can only be invoked for the EXECUTING or a DELAYED process.
 
Methods inherited from class umontreal.iro.lecuyer.simprocs.AbstractSimProcess
actions, cancel, currentProcess, getDelay, getState, isAlive, reschedule, resume, schedule, scheduleNext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimProcess

public SimProcess()
Constructs a new process without scheduling it. It will have to be scheduled later on. The process is in the INITIAL state.

Method Detail

init

public static void init()
Initializes the process-driven simulation. This kills all processes and calls Sim.init.


init

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

Parameters:
evlist - selected event list implementation

delay

public void delay(double delay)
Description copied from class: AbstractSimProcess
Suspends the execution of the currently executing process and schedules it to resume its execution in delay units of simulation time. It becomes in the DELAYED state. Only the process in the EXECUTING state can call this method.

Specified by:
delay in class AbstractSimProcess
Parameters:
delay - delay, in simulation time, before the process is resumed

suspend

public void suspend()
Description copied from class: AbstractSimProcess
This method can only be invoked for the EXECUTING or a DELAYED process. If the process is EXECUTING, suspends execution. If the process is DELAYED, cancels its activating event. This places the process in the SUSPENDED state.

Specified by:
suspend in class AbstractSimProcess

kill

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

Specified by:
kill in class AbstractSimProcess

SSJ
V. 1.2.5.

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