Package com.hexaly.optimizer
Class HxEvaluationPoint
- java.lang.Object
-
- com.hexaly.optimizer.HxEvaluationPoint
-
public class HxEvaluationPoint extends java.lang.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:
HxSurrogateParameters.createEvaluationPoint()
,HxSurrogateParameters.getEvaluationPoint(int pos)
-
-
Method Summary
All Methods Instance Methods Concrete Methods 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
equals(java.lang.Object obj)
HxArray
getArrayReturnValue()
Returns the return value of this evaluation point.double
getDoubleArgument(int pos)
Returns the value of the argument at the given position.double
getDoubleReturnValue()
Returns the return value of this evaluation point.long
getIntArgument(int pos)
Returns the value of the argument at the given position.long
getIntReturnValue()
Returns the return value of this evaluation point.int
hashCode()
boolean
isArrayReturnValue()
Returns true if the external function associated with this evaluation point is an array function, false otherwise.boolean
isDoubleArgument(int pos)
Returns true if the argument at this given position is a double, false otherwise.boolean
isDoubleReturnValue()
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
isIntReturnValue()
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.
-
-
-
Method Detail
-
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.Modeling
orHxState.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.Modeling
orHxState.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.Modeling
orHxState.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.Modeling
orHxState.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.Modeling
orHxState.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.Modeling
orHxState.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.Modeling
orHxState.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.Modeling
orHxState.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
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 classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-