Class UncertaintyAnalyzer
java.lang.Object
neqsim.process.util.uncertainty.UncertaintyAnalyzer
Performs uncertainty propagation analysis for process simulations.
Supports both analytical (linear) uncertainty propagation and Monte Carlo simulation for comprehensive uncertainty quantification.
- Version:
- 1.0
- Author:
- ESOL
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classConfiguration for input variable uncertainty. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<String, UncertaintyAnalyzer.InputUncertainty> private final ProcessSystemprivate final Random -
Constructor Summary
ConstructorsConstructorDescriptionUncertaintyAnalyzer(ProcessSystem processSystem) Creates an uncertainty analyzer for a process system. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInputUncertainty(String variableName, double standardDeviation) Adds an input variable with uncertainty.voidaddInputUncertainty(UncertaintyAnalyzer.InputUncertainty uncertainty) Adds an input variable with uncertainty and distribution type.voidaddOutputVariable(String variableName) Adds an output variable to monitor.Performs analytical uncertainty propagation using linear approximation.analyzeMonteCarlo(int samples) Performs Monte Carlo uncertainty analysis.private SensitivityMatrixCalculates the sensitivity matrix using finite differences.private doublegetInputValue(String name) private doublegetOutputValue(String name) private voidPerturbs input values according to their uncertainty distributions.private voidrestoreInputs(Map<String, Double> values) private voidsetInputValue(String name, double value) voidsetRandomSeed(long seed) Sets the random seed for reproducible Monte Carlo.
-
Field Details
-
processSystem
-
inputUncertainties
-
outputVariables
-
random
-
-
Constructor Details
-
UncertaintyAnalyzer
Creates an uncertainty analyzer for a process system.- Parameters:
processSystem- the process system to analyze
-
-
Method Details
-
addInputUncertainty
Adds an input variable with uncertainty.- Parameters:
variableName- the input variable namestandardDeviation- the standard deviation
-
addInputUncertainty
Adds an input variable with uncertainty and distribution type.- Parameters:
uncertainty- the input uncertainty configuration
-
addOutputVariable
Adds an output variable to monitor.- Parameters:
variableName- the output variable name (measurement device name)
-
analyzeAnalytical
Performs analytical uncertainty propagation using linear approximation.- Returns:
- uncertainty result with bounds for all outputs
-
analyzeMonteCarlo
Performs Monte Carlo uncertainty analysis.- Parameters:
samples- number of Monte Carlo samples- Returns:
- uncertainty result with bounds for all outputs
-
calculateSensitivityMatrix
Calculates the sensitivity matrix using finite differences. -
perturbInputs
private void perturbInputs()Perturbs input values according to their uncertainty distributions. -
getInputValues
-
restoreInputs
-
getInputValue
-
setInputValue
-
getOutputValue
-
setRandomSeed
public void setRandomSeed(long seed) Sets the random seed for reproducible Monte Carlo.- Parameters:
seed- the random seed
-