Class MonteCarloSimulator.MonteCarloResult
java.lang.Object
neqsim.process.util.optimizer.MonteCarloSimulator.MonteCarloResult
- All Implemented Interfaces:
Serializable
- Enclosing class:
MonteCarloSimulator
Results of a Monte Carlo simulation.
- Version:
- 1.0
- Author:
- Even Solbraa
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final Stringprivate final List<MonteCarloSimulator.UncertainParameter> private static final longprivate final double[]private final intprivate final List<MonteCarloSimulator.TornadoEntry> private final int -
Constructor Summary
ConstructorsConstructorDescriptionMonteCarloResult(String outputName, double[] sortedValues, int totalIterations, int successCount, int failCount, List<MonteCarloSimulator.TornadoEntry> tornado, List<MonteCarloSimulator.UncertainParameter> parameters) Creates a Monte Carlo result. -
Method Summary
Modifier and TypeMethodDescriptiondoublegetMean()Gets the mean of all successful outputs.doublegetP10()Gets the P10 percentile (10th percentile).doublegetP50()Gets the P50 percentile (median).doublegetP90()Gets the P90 percentile (90th percentile).doublegetPercentile(double percentile) Gets a specific percentile value.doublegetProbabilityBelow(double threshold) Gets the probability that the output is below a threshold.doubleGets the standard deviation of all successful outputs.Gets the tornado sensitivity data, sorted by swing (descending).toJson()Converts results to JSON format.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
outputName
-
sortedValues
private final double[] sortedValues -
totalIterations
private final int totalIterations -
successCount
private final int successCount -
failCount
private final int failCount -
tornado
-
parameters
-
-
Constructor Details
-
MonteCarloResult
MonteCarloResult(String outputName, double[] sortedValues, int totalIterations, int successCount, int failCount, List<MonteCarloSimulator.TornadoEntry> tornado, List<MonteCarloSimulator.UncertainParameter> parameters) Creates a Monte Carlo result.- Parameters:
outputName- name of the output variablesortedValues- sorted array of successful output valuestotalIterations- total iterations attemptedsuccessCount- successful iterationsfailCount- failed iterationstornado- tornado sensitivity entriesparameters- input parameters
-
-
Method Details
-
getP10
public double getP10()Gets the P10 percentile (10th percentile).- Returns:
- P10 value
-
getP50
public double getP50()Gets the P50 percentile (median).- Returns:
- P50 value
-
getP90
public double getP90()Gets the P90 percentile (90th percentile).- Returns:
- P90 value
-
getMean
public double getMean()Gets the mean of all successful outputs.- Returns:
- mean value
-
getStdDev
public double getStdDev()Gets the standard deviation of all successful outputs.- Returns:
- standard deviation
-
getProbabilityBelow
public double getProbabilityBelow(double threshold) Gets the probability that the output is below a threshold.- Parameters:
threshold- the threshold value- Returns:
- probability (0 to 1)
-
getPercentile
public double getPercentile(double percentile) Gets a specific percentile value.- Parameters:
percentile- the percentile (0-100)- Returns:
- the percentile value
-
getTornado
Gets the tornado sensitivity data, sorted by swing (descending).- Returns:
- list of tornado entries
-
toJson
-