Package com.hexaly.optimizer
Class HxEvaluationPoint
java.lang.Object
com.hexaly.optimizer.HxEvaluationPoint
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.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddArgument(double value) Adds a double argument with the given value.voidaddArgument(long value) Adds an integer argument with the given value.booleanReturns the return value of this evaluation point.doublegetDoubleArgument(int pos) Returns the value of the argument at the given position.doubleReturns the return value of this evaluation point.longgetIntArgument(int pos) Returns the value of the argument at the given position.longReturns the return value of this evaluation point.inthashCode()booleanReturns true if the external function associated with this evaluation point is an array function, false otherwise.booleanisDoubleArgument(int pos) Returns true if the argument at this given position is a double, false otherwise.booleanReturns true if the external function associated with this evaluation point is a double function, false otherwise.booleanisIntArgument(int pos) Returns true if the argument at this given position is an integer, false otherwise.booleanReturns true if the external function associated with this evaluation point is an integer function, false otherwise.voidsetArgument(int pos, double value) Sets the value of the argument at the given position.voidsetArgument(int pos, long value) Sets the value of the argument at the given position.voidsetReturnValue(double value) Sets the return value of this evaluation point.voidsetReturnValue(double[] value) Sets the return value of this evaluation point.voidsetReturnValue(long value) Sets the return value of this evaluation point.voidsetReturnValue(long[] value) Sets the return value of this evaluation point.
-
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 statesHxState.ModelingorHxState.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 statesHxState.ModelingorHxState.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 statesHxState.ModelingorHxState.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 statesHxState.ModelingorHxState.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 statesHxState.ModelingorHxState.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 statesHxState.ModelingorHxState.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 statesHxState.ModelingorHxState.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 statesHxState.ModelingorHxState.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 withgetIntReturnValue().- 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 withgetDoubleReturnValue().- 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 withgetArrayReturnValue().- 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 withgetIntArgument(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 withgetDoubleArgument(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
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() -
equals
-