Documentation of 'umontreal.iro.lecuyer.simprocs.ThreadProcessSimulator' Java class
ThreadProcessSimulator
umontreal.iro.lecuyer.simprocs

Class ThreadProcessSimulator



  • public class ThreadProcessSimulator
    extends ProcessSimulator
    Represents a process simulator using Java threads for process synchronization. The simulation process threads are synchronized so only one process runs at a time.
    • Constructor Detail

    • Method Detail

      • init

        public void init()
        Initializes the thread process-driven simulation using SplayTree algorithm as EventList. This kills all processes already associated with the current variable.
        Overrides:
        init in class Simulator
      • init

        public void init(EventList evlist)
        Initializes the thread process-driven simulation using evlist variable as EventList. This kills all processes already associated with the current variable.
        Overrides:
        init in class Simulator
        Parameters:
        evlist - EventList assigned to the current variable eventlist field
      • createControlEvent

        public umontreal.iro.lecuyer.simprocs.SimThread 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()
        Kills all threads linked to the current variable.
        Specified by:
        killAll in class ProcessSimulator

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.