Class UncertaintyResult
java.lang.Object
neqsim.process.util.uncertainty.UncertaintyResult
- All Implemented Interfaces:
Serializable
Result of an uncertainty propagation analysis for a process simulation.
Contains uncertainty bounds for all outputs along with the sensitivity matrix used for the calculation.
- Version:
- 1.0
- Author:
- ESOL
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final doubleprivate final intprivate final Map<String, UncertaintyBounds> private final SensitivityMatrixprivate static final long -
Constructor Summary
ConstructorsConstructorDescriptionUncertaintyResult(Map<String, UncertaintyBounds> outputUncertainties, int monteCarloSamples, double convergenceMetric) Creates an uncertainty result from Monte Carlo analysis.UncertaintyResult(Map<String, UncertaintyBounds> outputUncertainties, SensitivityMatrix sensitivityMatrix) Creates an uncertainty result from analytical propagation. -
Method Summary
Modifier and TypeMethodDescriptionGets all output uncertainties.doubleGets the convergence metric for Monte Carlo results.intGets the number of Monte Carlo samples used.Gets the output with the highest relative uncertainty.getOutputsExceedingThreshold(double threshold) Gets outputs that exceed a relative uncertainty threshold.Gets the sensitivity matrix (if available).Generates a summary string of the uncertainty analysis.getUncertainty(String outputName) Gets uncertainty bounds for a specific output variable.booleanChecks if the result is from Monte Carlo analysis.booleanmeetsUncertaintyThreshold(double maxRelativeUncertainty) Checks if all outputs meet a specified relative uncertainty threshold.toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
outputUncertainties
-
sensitivityMatrix
-
monteCarloSamples
private final int monteCarloSamples -
convergenceMetric
private final double convergenceMetric
-
-
Constructor Details
-
UncertaintyResult
public UncertaintyResult(Map<String, UncertaintyBounds> outputUncertainties, SensitivityMatrix sensitivityMatrix) Creates an uncertainty result from analytical propagation.- Parameters:
outputUncertainties- map of output names to uncertainty boundssensitivityMatrix- the sensitivity matrix used
-
UncertaintyResult
public UncertaintyResult(Map<String, UncertaintyBounds> outputUncertainties, int monteCarloSamples, double convergenceMetric) Creates an uncertainty result from Monte Carlo analysis.- Parameters:
outputUncertainties- map of output names to uncertainty boundsmonteCarloSamples- number of Monte Carlo samples usedconvergenceMetric- convergence metric (e.g., coefficient of variation of the mean)
-
-
Method Details
-
getUncertainty
Gets uncertainty bounds for a specific output variable.- Parameters:
outputName- the output variable name- Returns:
- uncertainty bounds or null if not found
-
getAllUncertainties
Gets all output uncertainties.- Returns:
- map of output names to uncertainty bounds
-
getSensitivityMatrix
Gets the sensitivity matrix (if available).- Returns:
- sensitivity matrix or null for Monte Carlo results
-
isMonteCarloResult
public boolean isMonteCarloResult()Checks if the result is from Monte Carlo analysis.- Returns:
- true if Monte Carlo was used
-
getMonteCarloSamples
public int getMonteCarloSamples()Gets the number of Monte Carlo samples used.- Returns:
- number of samples, or 0 for analytical results
-
getConvergenceMetric
public double getConvergenceMetric()Gets the convergence metric for Monte Carlo results.- Returns:
- convergence metric, or 0 for analytical results
-
getMostUncertainOutput
Gets the output with the highest relative uncertainty.- Returns:
- output name with highest uncertainty
-
meetsUncertaintyThreshold
public boolean meetsUncertaintyThreshold(double maxRelativeUncertainty) Checks if all outputs meet a specified relative uncertainty threshold.- Parameters:
maxRelativeUncertainty- maximum acceptable relative uncertainty (e.g., 0.05 for 5%)- Returns:
- true if all outputs meet the threshold
-
getOutputsExceedingThreshold
Gets outputs that exceed a relative uncertainty threshold.- Parameters:
threshold- maximum acceptable relative uncertainty- Returns:
- map of output names to their uncertainty bounds that exceed the threshold
-
getSummary
Generates a summary string of the uncertainty analysis.- Returns:
- formatted summary
-
toString
-