Class UncertaintyAnalyzer

java.lang.Object
neqsim.process.util.uncertainty.UncertaintyAnalyzer

public class UncertaintyAnalyzer extends Object
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
  • Field Details

  • Constructor Details

    • UncertaintyAnalyzer

      public UncertaintyAnalyzer(ProcessSystem processSystem)
      Creates an uncertainty analyzer for a process system.
      Parameters:
      processSystem - the process system to analyze
  • Method Details

    • addInputUncertainty

      public void addInputUncertainty(String variableName, double standardDeviation)
      Adds an input variable with uncertainty.
      Parameters:
      variableName - the input variable name
      standardDeviation - the standard deviation
    • addInputUncertainty

      public void addInputUncertainty(UncertaintyAnalyzer.InputUncertainty uncertainty)
      Adds an input variable with uncertainty and distribution type.
      Parameters:
      uncertainty - the input uncertainty configuration
    • addOutputVariable

      public void addOutputVariable(String variableName)
      Adds an output variable to monitor.
      Parameters:
      variableName - the output variable name (measurement device name)
    • analyzeAnalytical

      public UncertaintyResult analyzeAnalytical()
      Performs analytical uncertainty propagation using linear approximation.
      Returns:
      uncertainty result with bounds for all outputs
    • analyzeMonteCarlo

      public UncertaintyResult analyzeMonteCarlo(int samples)
      Performs Monte Carlo uncertainty analysis.
      Parameters:
      samples - number of Monte Carlo samples
      Returns:
      uncertainty result with bounds for all outputs
    • calculateSensitivityMatrix

      private SensitivityMatrix calculateSensitivityMatrix()
      Calculates the sensitivity matrix using finite differences.
    • perturbInputs

      private void perturbInputs()
      Perturbs input values according to their uncertainty distributions.
    • getInputValues

      private Map<String,Double> getInputValues()
    • restoreInputs

      private void restoreInputs(Map<String,Double> values)
    • getInputValue

      private double getInputValue(String name)
    • setInputValue

      private void setInputValue(String name, double value)
    • getOutputValue

      private double getOutputValue(String name)
    • setRandomSeed

      public void setRandomSeed(long seed)
      Sets the random seed for reproducible Monte Carlo.
      Parameters:
      seed - the random seed