Class TreeTransient.Builder
- Enclosing class:
- TreeTransient
-
Method Summary
Modifier and TypeMethodDescriptionabstract TreeTransient
build()
Builds a new instance with the provided configurations.abstract TreeTransient.Builder
evaluateByClass
(boolean value) Whether transient probabilities should be evaluated by stochastic state class (for each time tick until the time bound).greedyPolicy
(BigDecimal timeBound, BigDecimal error) Sets the time bound for the analysis (similarly totimeBound(BigDecimal)
) and a greedy policy controlling the enumeration of nodes.abstract TreeTransient.Builder
logger
(AnalysisLogger value) Sets the logger used by this analysis.abstract TreeTransient.Builder
markingFilter
(MarkingCondition value) Uses a marking condition to select markings for which transient probabilities are computed by this analysis.abstract TreeTransient.Builder
monitor
(AnalysisMonitor value) Sets the monitor used by this analysis.abstract TreeTransient.Builder
policy
(Supplier<EnumerationPolicy> value) Sets the supplier of enumeration policies used by this analysis.abstract TreeTransient.Builder
stopOn
(Supplier<StopCriterion> value) Sets the supplier of local stop criterion instances used by this analysis.stopOn
(MarkingCondition value) Uses a marking condition to create local stop criterion instances used by this analysis.abstract TreeTransient.Builder
timeBound
(BigDecimal value) Sets the maximum time bound for the analysis.abstract TreeTransient.Builder
timeStep
(BigDecimal value) Sets the step used to compute transient probabilities from 0 tothis.timeBound()
.
-
Method Details
-
timeBound
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
Sets the step used to compute transient probabilities from 0 tothis.timeBound()
.This parameter has no default value; it must be specified by the user.
- Parameters:
value
- of transient probabilities- Returns:
- this builder instance
-
policy
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 aTruncationPolicy
, a given timeBound, and the allowed error.- Parameters:
value
- the supplier of state class expansion policies- Returns:
- this builder instance
-
greedyPolicy
Sets the time bound for the analysis (similarly totimeBound(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 probabilitieserror
- the allowed error at each time before the time bound- Returns:
- this builder instance
-
stopOn
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
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
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
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
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
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
Builds a new instance with the provided configurations.- Returns:
- a new
TimedAnalysis
instance
-