Class TreeTransient

java.lang.Object
org.oristool.models.stpn.trans.TreeTransient
All Implemented Interfaces:
Engine<PetriNet,Marking,TransientSolution<Marking,Marking>>

public abstract class TreeTransient extends Object implements Engine<PetriNet,Marking,TransientSolution<Marking,Marking>>
Transient analysis of STPNs using a single tree of stochastic state classes.
  • Method Details

    • timeBound

      public abstract BigDecimal timeBound()
      Returns the maximum time bound for the analysis.

      This parameter has no default value; it must be specified by the user.

      Returns:
      time bound of transient probabilities
    • timeStep

      public abstract BigDecimal timeStep()
      Returns the step used to compute transient probabilities from 0 to this.timeBound().

      This parameter has no default value; it must be specified by the user.

      Returns:
      step of transient probabilities
    • policy

      public abstract Supplier<EnumerationPolicy> policy()
      Returns the supplier of enumeration policies used by this analysis.

      A new policy instance is generated for each run.

      By default, a FIFO policy is used.

      The builder method greedyPolicy(timeBound, error) can be used to set a TruncationPolicy, a given timeBound, and the allowed error.

      Returns:
      the supplier of state class expansion policies
    • stopOn

      public abstract Supplier<StopCriterion> stopOn()
      Returns the supplier of local stop criterion instances used by this analysis. It can be used to avoid the expansion of some state classes, as if their states were absorbing.

      A stop criterion instance is generated for each run.

      By default, an always-false local stop criterion is used.

      Returns:
      the supplier of local stop criterion
    • markingFilter

      public abstract MarkingCondition markingFilter()
      Returns the predicate used to select markings for which transient probabilities are computed by this analysis.

      By default, transient probabilities are computed for all markings.

      Returns:
      the filter used for markings
    • evaluateByClass

      public abstract boolean evaluateByClass()
      Whether transient probabilities should be evaluated by stochastic state class (for each time tick until the time bound).

      By default, transient probabilities are evaluated by time tick.

      Returns:
      true if probabilities are evaluated by class
    • monitor

      public abstract AnalysisMonitor monitor()
      Returns the monitor used by this analysis. It is used to stop the analysis early and to notify messages to the user.

      By default, an always-false, message-discarding monitor is used.

      Returns:
      the monitor used by this analysis
    • logger

      public abstract AnalysisLogger logger()
      Returns the logger used by this analysis. It is used to print progress information.

      By default, logs are discarded.

      Returns:
      the logger used by this analysis
    • builder

      public static TreeTransient.Builder builder()
      Creates a builder for analysis configurations (with default values).
      Returns:
      a builder of TimedAnalysis instances.
    • compute

      public TransientSolution<Marking,Marking> compute(PetriNet pn, Marking m)
      Runs this analysis on a given Petri net from an initial marking.
      Specified by:
      compute in interface Engine<PetriNet,Marking,TransientSolution<Marking,Marking>>
      Parameters:
      pn - the input Petri net
      m - the initial marking
      Returns:
      transient probabilities from the initial marking
      Throws:
      IllegalArgumentException - if the analysis is not applicable to the input Petri net
    • canAnalyze

      public boolean canAnalyze(PetriNet pn, ValidationMessageCollector c)
      Description copied from interface: Engine
      Checks if the analysis can be applied to the given model.

      Problems are collected in a ValidationMessageCollector.

      Specified by:
      canAnalyze in interface Engine<PetriNet,Marking,TransientSolution<Marking,Marking>>
      Parameters:
      pn - input model (such as a Petri net)
      c - collector of error messages
      Returns:
      true if the analysis can be applied to the given model