Class CTMCTransient<M,S extends CTMCState<M>>

java.lang.Object
org.oristool.models.gspn.chains.CTMCTransient<M,S>
Type Parameters:
M - type of logic state
S - type of CTMC states (including a logic state and an exit rate)
All Implemented Interfaces:
BiFunction<DTMC<S>,double[],Pair<Map<M,Integer>,double[][]>>

public abstract class CTMCTransient<M,S extends CTMCState<M>> extends Object implements BiFunction<DTMC<S>,double[],Pair<Map<M,Integer>,double[][]>>
Computation of the transient probabilities of a CTMC.

Uniformization is used to compute transient probabilities for each input time point. Poisson probabilities are computed using Fox-Glynn algorithm, while transition probabilities of the uniformized DTMC are computed through successive matrix multiplications.

A sparse matrix is used for the transition matrix of the embedded DTMC.

  • Method Details

    • error

      public abstract double error()
      Returns the allowed error in the computation of Poisson probabilities with Fox-Glynn algorithm (for each time point).

      By default, it is equal to 1e-6.

      Returns:
      allowed error in Poisson probabilities
    • epsilon

      public abstract double epsilon()
      Returns the threshold used to decide whether a probability value should be considered equal to 0.0.

      By default, it is equal to 1e-9.

      Returns:
      the threshold used in comparisons to 0.0
    • 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 <M, S extends CTMCState<M>> CTMCTransient.Builder<M,S> builder()
      Creates a builder for analysis configurations (with default values).
      Type Parameters:
      M - type of logic state
      S - type of CTMC states (including a logic state and an exit rate)
      Returns:
      a builder of TimedAnalysis instances.
    • apply

      public Pair<Map<M,Integer>,double[][]> apply(DTMC<S> dtmc, double[] timePoints)
      Runs this analysis on an input CTMC.
      Specified by:
      apply in interface BiFunction<DTMC<S extends CTMCState<M>>,double[],Pair<Map<M,Integer>,double[][]>>
      Parameters:
      dtmc - the embedded DTMC of the input CTMC
      timePoints - an ordered list of time points
      Returns:
      transient probabilities for each time-point and state