Class Sequencer

java.lang.Object
org.oristool.simulator.Sequencer

public class Sequencer extends Object
  • Constructor Details

    • Sequencer

      public Sequencer(PetriNet net, Marking initialMarking, SimulatorComponentsFactory<PetriNet,Transition> componentsFactory, AnalysisLogger logger)
      Builds a new instance for a given Petri net and initial marking.
      Parameters:
      net - Petri net
      initialMarking - initial marking for the simulation runs
      componentsFactory - helper components driving the simulation
      logger - logger used during the simulation
  • Method Details

    • simulate

      public void simulate()
      Starts the simulation, running until all observers have completed.
    • addObserver

      public void addObserver(SequencerObserver observer)
      Adds an observer of the simulation.
      Parameters:
      observer - simulation observer
    • removeObserver

      public void removeObserver(SequencerObserver observer)
      Removes an observer of the simulation.
      Parameters:
      observer - simulation observer
    • addCurrentRunObserver

      public void addCurrentRunObserver(SequencerObserver observer)
      Adds an observer of the current simulation run.
      Parameters:
      observer - simulation observer
    • removeCurrentRunObserver

      public void removeCurrentRunObserver(SequencerObserver observer)
      Removes an observer of the current simulation run.
      Parameters:
      observer - simulation observer
    • getCurrentRunElapsedTime

      public BigDecimal getCurrentRunElapsedTime()
    • getCurrentRunFirings

      public long getCurrentRunFirings()
    • getCurrentRunNumber

      public long getCurrentRunNumber()
    • getLastSuccession

      public Succession getLastSuccession()
    • getInitialMarking

      public Marking getInitialMarking()