Class PADispatcherThread

java.lang.Object
java.lang.Thread
common.controller.PADispatcherThread
All Implemented Interfaces:
AbortMeasure, Runnable

public class PADispatcherThread extends Thread implements AbortMeasure

Title: PADispatcherThread

Description: This thread is responsible for dispatching several simulations. If a simulation max time has been specified, an inner thread will be used to stop simulation after that time. We do not rely on engine method as it does not appear to work properly.

The step loop itself lives in ParametricAnalysisRunner, which has no Swing dependency; this class adds the progress window, the results window and the toolbar state that only make sense with a GUI attached.

Author:
Francesco D'Aquino Date: 29-dic-2005 Time: 9.58.49 Fixed by Bertoli Marco
  • Constructor Details

    • PADispatcherThread

      public PADispatcherThread(GuiInterface gui, SimulationDefinition simd, PAProgressWindow papw)
      Construct a new Parametric Analysis Dispatcher Thread
      Parameters:
      gui - reference to current gui object (can be JSIMMain or Mediator)
      simd - Reference to the simulation definition
  • Method Details

    • pauseSimulation

      public void pauseSimulation()
      Pauses current simulation only if it was already started
    • stopSimulation

      public void stopSimulation()
      Stops current simulation, forcing abort of all measures, only if it was already started
    • restartSimulation

      public void restartSimulation()
      Restarts current simulation, forcing abort of all measures, only if it was already started
    • abortMeasure

      public void abortMeasure(int index)
      Aborts a measure, given its index
      Specified by:
      abortMeasure in interface AbortMeasure
      Parameters:
      index - index of the measure to be aborted
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread