Class HxEvaluationPoint

java.lang.Object
com.hexaly.optimizer.HxEvaluationPoint

public class HxEvaluationPoint extends Object
An evaluation point associated with an external function with surrogate modeling. Evaluation points are used to specify known points for a function in advance. It can be useful to warm-start the optimizer when the function is particularly expensive to evaluate, or if you already have a good estimate of the optimal point.

Note: This information is used by the optimizer to drive the solution process. You must be careful about the data you provide: if an incorrect value is given, the optimizer may have an unexpected behavior.

Since:
10.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addArgument(double value)
    Adds a double argument with the given value.
    void
    addArgument(long value)
    Adds an integer argument with the given value.
    boolean
     
    Returns the return value of this evaluation point.
    double
    Returns the value of the argument at the given position.
    double
    Returns the return value of this evaluation point.
    long
    getIntArgument(int pos)
    Returns the value of the argument at the given position.
    long
    Returns the return value of this evaluation point.
    int
     
    boolean
    Returns true if the external function associated with this evaluation point is an array function, false otherwise.
    boolean
    Returns true if the argument at this given position is a double, false otherwise.
    boolean
    Returns true if the external function associated with this evaluation point is a double function, false otherwise.
    boolean
    isIntArgument(int pos)
    Returns true if the argument at this given position is an integer, false otherwise.
    boolean
    Returns true if the external function associated with this evaluation point is an integer function, false otherwise.
    void
    setArgument(int pos, double value)
    Sets the value of the argument at the given position.
    void
    setArgument(int pos, long value)
    Sets the value of the argument at the given position.
    void
    setReturnValue(double value)
    Sets the return value of this evaluation point.
    void
    setReturnValue(double[] value)
    Sets the return value of this evaluation point.
    void
    setReturnValue(long value)
    Sets the return value of this evaluation point.
    void
    setReturnValue(long[] value)
    Sets the return value of this evaluation point.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • addArgument

      public void addArgument(long value)
      Adds an integer argument with the given value. Only allowed if the associated decision variable is an integer or a boolean. Only allowed in states HxState.Modeling or HxState.Stopped.
      Parameters:
      value - Value of the argument.
    • addArgument

      public void addArgument(double value)
      Adds a double argument with the given value. Only allowed if the associated decision variable is a double. Only allowed in states HxState.Modeling or HxState.Stopped.
      Parameters:
      value - Value of the argument.
    • setArgument

      public void setArgument(int pos, long value)
      Sets the value of the argument at the given position. Only allowed if this argument is an integer or a boolean. Only allowed in states HxState.Modeling or HxState.Stopped.
      Parameters:
      pos - Position in the argument list.
      value - Value of the argument.
    • setArgument

      public void setArgument(int pos, double value)
      Sets the value of the argument at the given position. Only allowed if this argument is a double. Only allowed in states HxState.Modeling or HxState.Stopped.
      Parameters:
      pos - Position in the argument list.
      value - Value of the argument.
    • setReturnValue

      public void setReturnValue(long value)
      Sets the return value of this evaluation point. Only allowed if the external function associated with this evaluation point is an integer function. Only allowed in states HxState.Modeling or HxState.Stopped.
      Parameters:
      value - Return value of this point.
    • setReturnValue

      public void setReturnValue(double value)
      Sets the return value of this evaluation point. Only allowed if the external function associated with this evaluation point is a double function. Only allowed in states HxState.Modeling or HxState.Stopped.
      Parameters:
      value - Return value of this point.
    • setReturnValue

      public void setReturnValue(long[] value)
      Sets the return value of this evaluation point. Only allowed if the external function associated with this evaluation point is an integer array function. Only allowed in states HxState.Modeling or HxState.Stopped.
      Parameters:
      value - Return value of this point.
    • setReturnValue

      public void setReturnValue(double[] value)
      Sets the return value of this evaluation point. Only allowed if the external function associated with this evaluation point is a double array function. Only allowed in states HxState.Modeling or HxState.Stopped.
      Parameters:
      value - Return value of this point.
    • isIntReturnValue

      public boolean isIntReturnValue()
      Returns true if the external function associated with this evaluation point is an integer function, false otherwise. You can retrieve the value with getIntReturnValue().
      Returns:
      True if the return value is an integer.
    • isDoubleReturnValue

      public boolean isDoubleReturnValue()
      Returns true if the external function associated with this evaluation point is a double function, false otherwise. You can retrieve the value with getDoubleReturnValue().
      Returns:
      True if the return value is a double.
    • isArrayReturnValue

      public boolean isArrayReturnValue()
      Returns true if the external function associated with this evaluation point is an array function, false otherwise. You can retrieve the value with getArrayReturnValue().
      Returns:
      True if the return value is an array.
    • isIntArgument

      public boolean isIntArgument(int pos)
      Returns true if the argument at this given position is an integer, false otherwise. You can retrieve the value with getIntArgument(int).
      Parameters:
      pos - Position in the argument list.
      Returns:
      True if the argument at this given position is an integer.
    • isDoubleArgument

      public boolean isDoubleArgument(int pos)
      Returns true if the argument at this given position is a double, false otherwise. You can retrieve the value with getDoubleArgument(int).
      Parameters:
      pos - Position in the argument list.
      Returns:
      True if the argument at this given position is a double.
    • getIntReturnValue

      public long getIntReturnValue()
      Returns the return value of this evaluation point. Only allowed if the external function associated with this evaluation point is an integer function.
      Returns:
      Return value of this point.
    • getDoubleReturnValue

      public double getDoubleReturnValue()
      Returns the return value of this evaluation point. Only allowed if the external function associated with this evaluation point is a double function.
      Returns:
      Return value of this point.
    • getArrayReturnValue

      public HxArray getArrayReturnValue()
      Returns the return value of this evaluation point. Only allowed if the external function associated with this evaluation point is an array function.
      Returns:
      Return value of this point.
    • getIntArgument

      public long getIntArgument(int pos)
      Returns the value of the argument at the given position. Only allowed if this argument is an integer or a boolean.
      Parameters:
      pos - Position in the argument list.
      Returns:
      Value of the argument.
    • getDoubleArgument

      public double getDoubleArgument(int pos)
      Returns the value of the argument at the given position. Only allowed if this argument is a double.
      Parameters:
      pos - Position in the argument list.
      Returns:
      Value of the argument.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object