Package org.oristool.models.stpn.trees
Class StochasticStateFeature
java.lang.Object
org.oristool.models.stpn.trees.StochasticStateFeature
- All Implemented Interfaces:
StateFeature
,Feature
A state feature encoding the support and PDF of enabled timers.
-
Constructor Summary
ConstructorDescriptionStochasticStateFeature
(BigDecimal epsilon, int numSamples) Builds an empty stochastic state feature.Builds the copy of a stochastic state feature. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an age variable.void
addAgeVariable
(Variable v, BigDecimal value) Adds a deterministic age variable.void
addExpVariable
(Variable v, BigDecimal rate) Adds an exponentially-distributed variable.void
addTruncatedExp
(Variable v, BigDecimal rate, OmegaBigDecimal lft) Adds a truncated EXP [0, lft] to the state density.void
Adds a variable with the given PDF.void
addVariableReduced
(Variable v, PartitionedFunction f, BigDecimal amount) Adds a variable with the input PDF, reduced of given amount.Computes the mean value of a variable.Conditions this PDF to the event where the input variable is minimum.boolean
Returns the set of age variables.Returns the set of general, non-age variables.Returns the sum of rates of all exponential variables.getTotalExpRate
(Set<Variable> expVariables) Returns the sum of rates of a subset of exponential variables.int
hashCode()
boolean
boolean
void
void
setAbsorbing
(boolean isAbsorbing) void
setEXPRate
(Variable v, BigDecimal rate) void
setStateDensity
(StateDensityFunction stateDensity) void
setVanishing
(boolean isVanishing) toString()
-
Constructor Details
-
StochasticStateFeature
Builds an empty stochastic state feature.With epsilon == null, no approximated comparison is performed (e.g. in transient analysis).
- Parameters:
epsilon
- allowed error in comparisons between statesnumSamples
- samples used to compare states
-
StochasticStateFeature
Builds the copy of a stochastic state feature.- Parameters:
other
- another stochastic state feature
-
-
Method Details
-
getAgeVariables
Returns the set of age variables.- Returns:
- age variables
-
getFiringVariables
Returns the set of general, non-age variables.- Returns:
- set of general, non-age variables
-
addAgeVariable
Adds an age variable.- Parameters:
v
- input variable
-
addAgeVariable
Adds a deterministic age variable.- Parameters:
v
- variablevalue
- value of the variable
-
addVariableReduced
Adds a variable with the input PDF, reduced of given amount.- Parameters:
v
- variablef
- PDFamount
- reduction
-
addVariable
Adds a variable with the given PDF.- Parameters:
v
- variablef
- PDF
-
addExpVariable
Adds an exponentially-distributed variable.- Parameters:
v
- variablerate
- rate
-
removeExpVariable
-
getEXPVariables
-
getEXPRate
-
setEXPRate
-
getEXPRates
-
getTotalExpRate
Returns the sum of rates of all exponential variables.- Returns:
- total exponential rate
-
getTotalExpRate
Returns the sum of rates of a subset of exponential variables.- Parameters:
expVariables
- input variables- Returns:
- total exponential rate of the input variables
-
addTruncatedExp
Adds a truncated EXP [0, lft] to the state density.- Parameters:
v
- variable of the EXP to be addedrate
- rate of the EXP to be addedlft
- truncation threshold
-
toString
-
isVanishing
public boolean isVanishing() -
setVanishing
public void setVanishing(boolean isVanishing) -
isAbsorbing
public boolean isAbsorbing() -
setAbsorbing
public void setAbsorbing(boolean isAbsorbing) -
getStateDensity
-
setStateDensity
-
equals
-
hashCode
public int hashCode() -
computeMeanValue
Computes the mean value of a variable.- Parameters:
v
- input variable- Returns:
- mean value
-
conditionToMinimum
Conditions this PDF to the event where the input variable is minimum.- Parameters:
v
- minimum variable- Returns:
- probability that the input variable is the minimum
-