Class UncertaintyBounds

java.lang.Object
neqsim.process.measurementdevice.vfm.UncertaintyBounds
All Implemented Interfaces:
Serializable

public class UncertaintyBounds extends Object implements Serializable
Represents uncertainty bounds for a measured or calculated value.

This class provides confidence intervals and standard deviation for values calculated by virtual flow meters and soft sensors, enabling risk-aware decision making in production optimization.

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

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • mean

      private final double mean
    • standardDeviation

      private final double standardDeviation
    • lower95

      private final double lower95
    • upper95

      private final double upper95
    • lower99

      private final double lower99
    • upper99

      private final double upper99
    • unit

      private final String unit
  • Constructor Details

    • UncertaintyBounds

      public UncertaintyBounds(double mean, double standardDeviation, String unit)
      Creates uncertainty bounds from mean and standard deviation assuming normal distribution.
      Parameters:
      mean - the mean value
      standardDeviation - the standard deviation
      unit - the engineering unit
    • UncertaintyBounds

      public UncertaintyBounds(double mean, double standardDeviation, double lower95, double upper95, double lower99, double upper99, String unit)
      Creates uncertainty bounds with explicit confidence intervals.
      Parameters:
      mean - the mean value
      standardDeviation - the standard deviation
      lower95 - lower bound of 95% CI
      upper95 - upper bound of 95% CI
      lower99 - lower bound of 99% CI
      upper99 - upper bound of 99% CI
      unit - the engineering unit
  • Method Details

    • getMean

      public double getMean()
      Gets the mean value.
      Returns:
      the mean
    • getStandardDeviation

      public double getStandardDeviation()
      Gets the standard deviation.
      Returns:
      the standard deviation
    • getLower95

      public double getLower95()
      Gets the lower bound of the 95% confidence interval.
      Returns:
      lower 95% bound
    • getUpper95

      public double getUpper95()
      Gets the upper bound of the 95% confidence interval.
      Returns:
      upper 95% bound
    • getLower99

      public double getLower99()
      Gets the lower bound of the 99% confidence interval.
      Returns:
      lower 99% bound
    • getUpper99

      public double getUpper99()
      Gets the upper bound of the 99% confidence interval.
      Returns:
      upper 99% bound
    • getUnit

      public String getUnit()
      Gets the engineering unit.
      Returns:
      the unit
    • getCoefficientOfVariation

      public double getCoefficientOfVariation()
      Gets the coefficient of variation (relative uncertainty).
      Returns:
      CV as a ratio (not percentage)
    • getRelativeUncertaintyPercent

      public double getRelativeUncertaintyPercent()
      Gets the relative uncertainty as a percentage.
      Returns:
      uncertainty percentage
    • isWithin95CI

      public boolean isWithin95CI(double value)
      Checks if a value is within the 95% confidence interval.
      Parameters:
      value - the value to check
      Returns:
      true if within 95% CI
    • isWithin99CI

      public boolean isWithin99CI(double value)
      Checks if a value is within the 99% confidence interval.
      Parameters:
      value - the value to check
      Returns:
      true if within 99% CI
    • add

      Combines two independent uncertainty bounds using error propagation for addition.
      Parameters:
      other - the other uncertainty bounds
      Returns:
      combined uncertainty bounds
    • scale

      public UncertaintyBounds scale(double factor)
      Scales the uncertainty bounds by a constant factor.
      Parameters:
      factor - the scaling factor
      Returns:
      scaled uncertainty bounds
    • toString

      public String toString()
      Overrides:
      toString in class Object