Class SensitivityAnalysis.UncertainParameter

java.lang.Object
neqsim.process.util.fielddevelopment.SensitivityAnalysis.UncertainParameter
All Implemented Interfaces:
Serializable
Enclosing class:
SensitivityAnalysis

public static final class SensitivityAnalysis.UncertainParameter extends Object implements Serializable
Uncertain parameter definition.

Encapsulates a parameter that varies between simulation runs, including its probability distribution and how to apply values to the process model.

Version:
1.0
Author:
ESOL
See Also:
  • Field Details

  • Constructor Details

    • UncertainParameter

      public UncertainParameter(String name, double p10, double p50, double p90, SensitivityAnalysis.DistributionType distribution, String unit, BiConsumer<ProcessSystem, Double> setter)
      Creates an uncertain parameter.
      Parameters:
      name - parameter name for reporting
      p10 - 10th percentile (low case)
      p50 - 50th percentile (base case)
      p90 - 90th percentile (high case)
      distribution - probability distribution type
      unit - engineering unit (for reporting)
      setter - function to apply parameter value to process
  • Method Details

    • triangular

      public static SensitivityAnalysis.UncertainParameter triangular(String name, double min, double mode, double max, BiConsumer<ProcessSystem, Double> setter)
      Creates a triangular distribution parameter.
      Parameters:
      name - parameter name
      min - minimum value (P10)
      mode - most likely value (P50)
      max - maximum value (P90)
      setter - function to apply value
      Returns:
      uncertain parameter
    • triangular

      public static SensitivityAnalysis.UncertainParameter triangular(String name, double min, double mode, double max, String unit, BiConsumer<ProcessSystem, Double> setter)
      Creates a triangular distribution parameter with unit.
      Parameters:
      name - parameter name
      min - minimum value (P10)
      mode - most likely value (P50)
      max - maximum value (P90)
      unit - engineering unit
      setter - function to apply value
      Returns:
      uncertain parameter
    • normal

      public static SensitivityAnalysis.UncertainParameter normal(String name, double p10, double p50, double p90, BiConsumer<ProcessSystem, Double> setter)
      Creates a normal distribution parameter.
      Parameters:
      name - parameter name
      p10 - 10th percentile
      p50 - 50th percentile (mean)
      p90 - 90th percentile
      setter - function to apply value
      Returns:
      uncertain parameter
    • lognormal

      public static SensitivityAnalysis.UncertainParameter lognormal(String name, double p10, double p50, double p90, BiConsumer<ProcessSystem, Double> setter)
      Creates a log-normal distribution parameter.
      Parameters:
      name - parameter name
      p10 - 10th percentile
      p50 - 50th percentile
      p90 - 90th percentile
      setter - function to apply value
      Returns:
      uncertain parameter
    • uniform

      public static SensitivityAnalysis.UncertainParameter uniform(String name, double min, double max, BiConsumer<ProcessSystem, Double> setter)
      Creates a uniform distribution parameter.
      Parameters:
      name - parameter name
      min - minimum value
      max - maximum value
      setter - function to apply value
      Returns:
      uncertain parameter
    • sample

      public double sample(Random rng)
      Samples a random value from this parameter's distribution.
      Parameters:
      rng - random number generator
      Returns:
      sampled value
    • sampleNormal

      private double sampleNormal(Random rng)
    • sampleLognormal

      private double sampleLognormal(Random rng)
    • sampleTriangular

      private double sampleTriangular(Random rng)
    • sampleUniform

      private double sampleUniform(Random rng)
    • apply

      public void apply(ProcessSystem process, double value)
      Applies a value to the process system.
      Parameters:
      process - process to modify
      value - value to apply
    • getName

      public String getName()
      Gets the parameter name.
      Returns:
      name
    • getDistribution

      public SensitivityAnalysis.DistributionType getDistribution()
      Gets the distribution type.
      Returns:
      distribution
    • getP10

      public double getP10()
      Gets the P10 value.
      Returns:
      P10
    • getP50

      public double getP50()
      Gets the P50 value.
      Returns:
      P50
    • getP90

      public double getP90()
      Gets the P90 value.
      Returns:
      P90
    • getUnit

      public String getUnit()
      Gets the unit.
      Returns:
      unit or null
    • getRange

      public double getRange()
      Gets the range (P90 - P10).
      Returns:
      range
    • toString

      public String toString()
      Overrides:
      toString in class Object