Class TreeTransient.Builder

java.lang.Object
org.oristool.models.stpn.trans.TreeTransient.Builder
Enclosing class:
TreeTransient

public abstract static class TreeTransient.Builder extends Object
  • Method Details

    • timeBound

      public abstract TreeTransient.Builder timeBound(BigDecimal value)
      Sets the maximum time bound for the analysis.

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

      Parameters:
      value - bound of transient probabilities
      Returns:
      this builder instance
    • timeStep

      public abstract TreeTransient.Builder timeStep(BigDecimal value)
      Sets 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.

      Parameters:
      value - of transient probabilities
      Returns:
      this builder instance
    • policy

      public abstract TreeTransient.Builder policy(Supplier<EnumerationPolicy> value)
      Sets 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.

      Parameters:
      value - the supplier of state class expansion policies
      Returns:
      this builder instance
    • greedyPolicy

      public TreeTransient.Builder greedyPolicy(BigDecimal timeBound, BigDecimal error)
      Sets the time bound for the analysis (similarly to timeBound(BigDecimal)) and a greedy policy controlling the enumeration of nodes.

      The node with largest reaching probability is expanded first. The enumeration is halted if the probability of finding the STPN in a state of the frontier set at the time bound (and thus at any time before that) is lower than error.

      A new policy instance is generated for each run.

      Parameters:
      timeBound - bound of transient probabilities
      error - the allowed error at each time before the time bound
      Returns:
      this builder instance
    • stopOn

      public TreeTransient.Builder stopOn(MarkingCondition value)
      Uses a marking condition to create 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.
      Parameters:
      value - the supplier of local stop criterion
      Returns:
      this builder instance
    • stopOn

      public abstract TreeTransient.Builder stopOn(Supplier<StopCriterion> value)
      Sets 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.

      Parameters:
      value - the supplier of local stop criterion
      Returns:
      this builder instance
    • markingFilter

      public abstract TreeTransient.Builder markingFilter(MarkingCondition value)
      Uses a marking condition to select markings for which transient probabilities are computed by this analysis.

      By default, transient probabilities are computed for all markings.

      Parameters:
      value - the filter selecting markings for transient analysis
      Returns:
      this builder instance
    • evaluateByClass

      public abstract TreeTransient.Builder evaluateByClass(boolean value)
      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.

      Parameters:
      value - true if probabilities should be evaluated by class
      Returns:
      this builder instance
    • monitor

      public abstract TreeTransient.Builder monitor(AnalysisMonitor value)
      Sets 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.

      Parameters:
      value - the monitor used by this analysis
      Returns:
      this builder instance
    • logger

      public abstract TreeTransient.Builder logger(AnalysisLogger value)
      Sets the logger used by this analysis. It is used to print progress information.

      By default, logs are discarded.

      Parameters:
      value - the logger used by this analysis
      Returns:
      this builder instance
    • build

      public abstract TreeTransient build()
      Builds a new instance with the provided configurations.
      Returns:
      a new TimedAnalysis instance