KnowledgeBase
Class PlausibilityInterval

java.lang.Object
  |
  +--KnowledgeBase.PlausibilityInterval

public class PlausibilityInterval
extends java.lang.Object

Defines an interval with absolute and suggested lower and upper bounds that contain a nominal value. It can also return a Gaussian-distributed random number within this interval.

Version:
Created 29 August 2003
Author:
Dan Tappan

Field Summary
 AttributeIntervalNode attribute_interval_node
           
 double bandpass
           
 int bound_code
           
static int CODE_LOWER_BOUND_ABSOLUTE
           
static int CODE_LOWER_BOUND_SUGGESTED
           
static int CODE_NOMINAL
           
static int CODE_NONE
           
static int CODE_UPPER_BOUND_ABSOLUTE
           
static int CODE_UPPER_BOUND_SUGGESTED
           
 double lower_bound_absolute
           
 double lower_bound_suggested
           
 double nominal
           
 double proportionality_percentage
           
 double upper_bound_absolute
           
 double upper_bound_suggested
           
 double variance
           
 
Constructor Summary
PlausibilityInterval(double absolute_lower_bound, double suggested_lower_bound, double nominal, double suggested_upper_bound, double absolute_upper_bound, double variance, double bandpass, double proportionality_percentage)
          Creates a new interval with a nominal value sandwiched within suggested lower and upper bounds, which in turn are sandwiched within absolute lower and upper bounds.
 
Method Summary
 double getBoundFixedValue(int bound_code)
          Returns the value of a data member of this plausibility interval: lower_bound_absolute lower_bound_suggested nominal upper_bound_suggested upper_bound_absolute Use the expression getCenteredRandomValue(getBoundFixedValue(bound_code), variance, bandpass) to return a random value centered on a fixed bound.
 double getCenteredRandomValue(double center, double variance, double bandpass)
          Returns from a Gaussian distribution a random value centered on a value and spread over a variance.
 PlausibilityInterval getClone()
          Returns a clone of this object.
 boolean isLowerBound()
          Returns whether the current bound in bound_code is a lower bound (i.e., either CODE_LOWER_BOUND_ABSOLUTE or CODE_LOWER_BOUND_SUGGESTED).
 boolean isUpperBound()
          Returns whether the current bound in bound_code is an upper bound (i.e., either CODE_UPPER_BOUND_SUGGESTED or CODE_UPPER_BOUND_ABSOLUTE).
 java.lang.String toString()
          Returns a string representation of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CODE_NONE

public static final int CODE_NONE
See Also:
Constant Field Values

CODE_LOWER_BOUND_ABSOLUTE

public static final int CODE_LOWER_BOUND_ABSOLUTE
See Also:
Constant Field Values

CODE_LOWER_BOUND_SUGGESTED

public static final int CODE_LOWER_BOUND_SUGGESTED
See Also:
Constant Field Values

CODE_NOMINAL

public static final int CODE_NOMINAL
See Also:
Constant Field Values

CODE_UPPER_BOUND_SUGGESTED

public static final int CODE_UPPER_BOUND_SUGGESTED
See Also:
Constant Field Values

CODE_UPPER_BOUND_ABSOLUTE

public static final int CODE_UPPER_BOUND_ABSOLUTE
See Also:
Constant Field Values

bound_code

public int bound_code

lower_bound_absolute

public double lower_bound_absolute

lower_bound_suggested

public double lower_bound_suggested

nominal

public double nominal

upper_bound_suggested

public double upper_bound_suggested

upper_bound_absolute

public double upper_bound_absolute

attribute_interval_node

public AttributeIntervalNode attribute_interval_node

proportionality_percentage

public double proportionality_percentage

variance

public double variance

bandpass

public double bandpass
Constructor Detail

PlausibilityInterval

public PlausibilityInterval(double absolute_lower_bound,
                            double suggested_lower_bound,
                            double nominal,
                            double suggested_upper_bound,
                            double absolute_upper_bound,
                            double variance,
                            double bandpass,
                            double proportionality_percentage)
Creates a new interval with a nominal value sandwiched within suggested lower and upper bounds, which in turn are sandwiched within absolute lower and upper bounds.

Parameters:
absolute_lower_bound - - the absolute lower bound
suggested_lower_bound - - the suggested lower bound
nominal - - the nominal value
suggested_upper_bound - - the suggested upper bound
absolute_upper_bound - - the absolute upper bound
variance - - the distributional variance
bandpass - - the shared minimum and maximum deviation from the mean clamping the gaussian-distributed random number before any further manipulation
proportionality_percentage - - the percent off of nominal when using another dimension to define this one proportionally
Method Detail

getBoundFixedValue

public double getBoundFixedValue(int bound_code)
                          throws java.lang.Exception
Returns the value of a data member of this plausibility interval:

    lower_bound_absolute
    lower_bound_suggested
    nominal
    upper_bound_suggested
    upper_bound_absolute
 

Use the expression getCenteredRandomValue(getBoundFixedValue(bound_code), variance, bandpass) to return a random value centered on a fixed bound.

Parameters:
bound_code - - the bound code
Returns:
the bound value
Throws:
java.lang.Exception - - if the bound code is invalid
See Also:
getCenteredRandomValue(double, double, double), CODE_LOWER_BOUND_ABSOLUTE, CODE_LOWER_BOUND_SUGGESTED, CODE_NOMINAL, CODE_UPPER_BOUND_SUGGESTED, CODE_UPPER_BOUND_ABSOLUTE, AttributeIntervalNode.getAttributeBoundCode(java.lang.String)

getCenteredRandomValue

public double getCenteredRandomValue(double center,
                                     double variance,
                                     double bandpass)
Returns from a Gaussian distribution a random value centered on a value and spread over a variance.

Parameters:
center - - the center or peak over the curve
variance - - the variance or adjustment to the width of the curve based on a standard deviation of 1.0. A higher number produces a wider range of values over the center, whereas a lower produces a narrower range
bandpass - - the shared minimum and maximum deviation from the mean used to trim outliers from the gaussian-distributed random value
Returns:
the random value, clamped within the absolute bounds of this interval
See Also:
getBoundFixedValue(int)

getClone

public PlausibilityInterval getClone()
Returns a clone of this object.

Returns:
the clone

isLowerBound

public boolean isLowerBound()
Returns whether the current bound in bound_code is a lower bound (i.e., either CODE_LOWER_BOUND_ABSOLUTE or CODE_LOWER_BOUND_SUGGESTED).

Returns:
the outcome
See Also:
isUpperBound()

isUpperBound

public boolean isUpperBound()
Returns whether the current bound in bound_code is an upper bound (i.e., either CODE_UPPER_BOUND_SUGGESTED or CODE_UPPER_BOUND_ABSOLUTE).

Returns:
the outcome
See Also:
isLowerBound()

toString

public java.lang.String toString()
Returns a string representation of this class.

Overrides:
toString in class java.lang.Object
Returns:
the String representation