Class SatisfactionCurve

java.lang.Object
xal.extension.solver.SatisfactionCurve

public class SatisfactionCurve extends Object
Collection of satisfaction curve functions
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    acceleratingSatisfaction(double value, double minValue, double maxValue, double endSlope)
    Generate a satisfaction curve which accelerates and ends with the specified slope
    static double
    deceleratingSatisfaction(double value, double minValue, double maxValue, double startSlope)
    Generate a satisfaction curve which decelerates and begins with the specified slope
    static double
    exponentialSatisfaction(double value, double tolerance)
    Generate the exponential satisfaction for a given value and tolerance
    static double
    inverseRisingSatisfaction(double value, double tolerance)
    Generate a satisfaction based on an inverse function 1 - a / ( a + |x| )
    static double
    inverseSatisfaction(double value, double tolerance)
    Generate a satisfaction based on an inverse function a / ( a + |x| )
    static double
    inverseSquareRisingSatisfaction(double value, double tolerance)
    Generate a satisfaction based on an inverse square function 1 - a / ( a + x^2 )
    static double
    inverseSquareSatisfaction(double value, double tolerance)
    Generate a satisfaction based on an inverse square function a / ( a + x^2 )
    static double
    linearFallingSatisfaction(double value, double minValue, double maxValue)
    Generate a linear satisfaction curve which has zero at the bottom end and 1 at the top end
    static double
    linearRisingSatisfaction(double value, double minValue, double maxValue)
    Generate a linear satisfaction curve which has zero at the bottom end and 1 at the top end
    static double
    sCurveSatisfactionWithCenterAndSlope(double value, double center, double slope)
    Generate a satisfaction based on an S-Curve that extends from negative to positive infinity satisfaction = 1/2 + a ( x - x0 ) / ( 1 + 2a|x - x0| )

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SatisfactionCurve

      protected SatisfactionCurve()
      Constructor
  • Method Details

    • exponentialSatisfaction

      public static double exponentialSatisfaction(double value, double tolerance)
      Generate the exponential satisfaction for a given value and tolerance
      Parameters:
      value - the value to test
      tolerance - the tolerance corresponding to 90% satisfaction
    • inverseSatisfaction

      public static double inverseSatisfaction(double value, double tolerance)
      Generate a satisfaction based on an inverse function a / ( a + |x| )
      Parameters:
      value - the value to test
      tolerance - the tolerance corresponding to 90% satisfaction
    • inverseRisingSatisfaction

      public static double inverseRisingSatisfaction(double value, double tolerance)
      Generate a satisfaction based on an inverse function 1 - a / ( a + |x| )
      Parameters:
      value - the value to test
      tolerance - the tolerance corresponding to 90% satisfaction
    • inverseSquareSatisfaction

      public static double inverseSquareSatisfaction(double value, double tolerance)
      Generate a satisfaction based on an inverse square function a / ( a + x^2 )
      Parameters:
      value - the value to test
      tolerance - the tolerance corresponding to 90% satisfaction
    • inverseSquareRisingSatisfaction

      public static double inverseSquareRisingSatisfaction(double value, double tolerance)
      Generate a satisfaction based on an inverse square function 1 - a / ( a + x^2 )
      Parameters:
      value - the value to test
      tolerance - the tolerance corresponding to 90% satisfaction
    • sCurveSatisfactionWithCenterAndSlope

      public static double sCurveSatisfactionWithCenterAndSlope(double value, double center, double slope)
      Generate a satisfaction based on an S-Curve that extends from negative to positive infinity satisfaction = 1/2 + a ( x - x0 ) / ( 1 + 2a|x - x0| )
      Parameters:
      value - the value to test
      center - the center value of the satisfaction curve
      slope - the slope of the satisfaction curve at the center
    • linearRisingSatisfaction

      public static double linearRisingSatisfaction(double value, double minValue, double maxValue)
      Generate a linear satisfaction curve which has zero at the bottom end and 1 at the top end
      Parameters:
      value - the value to test
      minValue - the minimum value
      maxValue - the maximum value
    • linearFallingSatisfaction

      public static double linearFallingSatisfaction(double value, double minValue, double maxValue)
      Generate a linear satisfaction curve which has zero at the bottom end and 1 at the top end
      Parameters:
      value - the value to test
      minValue - the minimum value
      maxValue - the maximum value
    • acceleratingSatisfaction

      public static double acceleratingSatisfaction(double value, double minValue, double maxValue, double endSlope)
      Generate a satisfaction curve which accelerates and ends with the specified slope
      Parameters:
      value - the value to test
      minValue - the minimum value
      maxValue - the maximum value
      endSlope - the slope at the end point
    • deceleratingSatisfaction

      public static double deceleratingSatisfaction(double value, double minValue, double maxValue, double startSlope)
      Generate a satisfaction curve which decelerates and begins with the specified slope
      Parameters:
      value - the value to test
      minValue - the minimum value
      maxValue - the maximum value
      startSlope - the slope at the start point