Package org.jreliability.bdd
Class BDDTTRFSimulative<T>
java.lang.Object
org.jreliability.bdd.BDDTTRFSimulative<T>
- Type Parameters:
T- the elements of the bdd
- All Implemented Interfaces:
TTRF<T>
The
BDDTTRFSimulative performs a Monte-Carlo simulation to determine
the ReliabilityFunction based on a BDD representation of the
system structure.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final doubleThe used maximum errorepsilonvalue for the simulation.protected final BDDProvider<T> The usedBDDProvider.protected final RandomThe used random number generator to trigger the simulation. -
Constructor Summary
ConstructorsConstructorDescriptionBDDTTRFSimulative(BDDProvider<T> provider) BDDTTRFSimulative(BDDProvider<T> provider, double epsilon) Constructs aBDDTTRFSimulativewith a givenBDDProviderand an epsilon. -
Method Summary
Modifier and TypeMethodDescriptioncollectTimesToFailure(Term term, org.apache.commons.collections15.Transformer<T, ReliabilityFunction> functionTransformer, org.apache.commons.collections15.Predicate<T> existsPredicate) Collects all times-to-failure to derive5000samples needed to calculate theReliabilityFunction.collectTimesToFailure(Term term, org.apache.commons.collections15.Transformer<T, ReliabilityFunction> functionTransformer, org.apache.commons.collections15.Predicate<T> existsPredicate, int n) Collects all times-to-failure to derivensamples needed to calculate theReliabilityFunction.convert(Term term, org.apache.commons.collections15.Transformer<T, ReliabilityFunction> functionTransformer) Converts aTermto aReliabilityFunction.convert(Term term, org.apache.commons.collections15.Transformer<T, ReliabilityFunction> functionTransformer, int j) convert(Term term, org.apache.commons.collections15.Transformer<T, ReliabilityFunction> functionTransformer, org.apache.commons.collections15.Predicate<T> existsPredicate) convert(Term term, org.apache.commons.collections15.Transformer<T, ReliabilityFunction> functionTransformer, org.apache.commons.collections15.Predicate<T> existsPredicate, int j) getFailures(BDD<T> bdd, org.apache.commons.collections15.Transformer<T, ReliabilityFunction> functionTransformer) Generates theFailureoccurrences for a single simulation run based on the givenBDDand theReliabilityFunctions of its elements.protected doublesimulateTimeToFailure(BDD<T> bdd, org.apache.commons.collections15.Transformer<T, ReliabilityFunction> functionTransformer) Performs a single simulation run to gather one time-to-failure.
-
Field Details
-
epsilon
protected final double epsilonThe used maximum errorepsilonvalue for the simulation. -
random
The used random number generator to trigger the simulation. -
provider
The usedBDDProvider.
-
-
Constructor Details
-
BDDTTRFSimulative
- Parameters:
provider- the used bddProvider
-
BDDTTRFSimulative
Constructs aBDDTTRFSimulativewith a givenBDDProviderand an epsilon.- Parameters:
provider- the used bddProviderepsilon- the used epsilon value
-
-
Method Details
-
convert
public ReliabilityFunction convert(Term term, org.apache.commons.collections15.Transformer<T, ReliabilityFunction> functionTransformer) Description copied from interface:TTRFConverts aTermto aReliabilityFunction. -
convert
public ReliabilityFunction convert(Term term, org.apache.commons.collections15.Transformer<T, ReliabilityFunction> functionTransformer, int j) - Parameters:
term- the term to convertfunctionTransformer- the element to reliability function transformerj- the number of samples to use- Returns:
- the reliability function
-
convert
public ReliabilityFunction convert(Term term, org.apache.commons.collections15.Transformer<T, ReliabilityFunction> functionTransformer, org.apache.commons.collections15.Predicate<T> existsPredicate) Description copied from interface:TTRF -
convert
public ReliabilityFunction convert(Term term, org.apache.commons.collections15.Transformer<T, ReliabilityFunction> functionTransformer, org.apache.commons.collections15.Predicate<T> existsPredicate, int j) - Parameters:
term- the term to convertfunctionTransformer- the element to reliability function transformerexistsPredicate- the element to exists predicatej- the number of samples to use- Returns:
- the reliability function
-
collectTimesToFailure
public List<Double> collectTimesToFailure(Term term, org.apache.commons.collections15.Transformer<T, ReliabilityFunction> functionTransformer, org.apache.commons.collections15.Predicate<T> existsPredicate) Collects all times-to-failure to derive5000samples needed to calculate theReliabilityFunction.- Parameters:
term- the term to convertfunctionTransformer- the element to reliability function transformerexistsPredicate- the element to exists predicate- Returns:
- the reliability function
-
collectTimesToFailure
public List<Double> collectTimesToFailure(Term term, org.apache.commons.collections15.Transformer<T, ReliabilityFunction> functionTransformer, org.apache.commons.collections15.Predicate<T> existsPredicate, int n) Collects all times-to-failure to derivensamples needed to calculate theReliabilityFunction.- Parameters:
term- the term to convertfunctionTransformer- the element to reliability function transformerexistsPredicate- the element to exists predicaten- the number of samples- Returns:
- the reliability function
-
simulateTimeToFailure
protected double simulateTimeToFailure(BDD<T> bdd, org.apache.commons.collections15.Transformer<T, ReliabilityFunction> functionTransformer) Performs a single simulation run to gather one time-to-failure.- Parameters:
bdd- the given bddfunctionTransformer- the element to reliability function transformer- Returns:
- a single time-to-failure
-
getFailures
protected Set<Failure<T>> getFailures(BDD<T> bdd, org.apache.commons.collections15.Transformer<T, ReliabilityFunction> functionTransformer) Generates theFailureoccurrences for a single simulation run based on the givenBDDand theReliabilityFunctions of its elements.- Parameters:
bdd- the given bddfunctionTransformer- the element to reliability function transformer- Returns:
- the failure occurrences for a single simulation run
-