HxEvaluationPoint Class¶
- class 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.
- Since:
10.0
- See:
- See:
Summary¶
Adds an argument with the given value. |
|
Sets the value of the argument at the given position. |
|
Sets the return value of this evaluation point. |
|
Returns the return value of this evaluation point. |
|
Returns the value of the argument at the given position. |
Instance methods¶
- HxEvaluationPoint.add_argument(value)¶
Adds an argument with the given value. Only allowed in states
MODELING
orSTOPPED
.- Parameters:
value (
int
ordouble
) – Value of the argument.
- HxEvaluationPoint.set_argument(pos, value)¶
Sets the value of the argument at the given position. Only allowed in states
MODELING
orSTOPPED
.- Parameters:
pos – Position in the argument list.
value (
int
ordouble
) – Value of the argument.
- HxEvaluationPoint.set_return_value(value)¶
Sets the return value of this evaluation point. The type of the parameter value must be the same as the type of the external function associated with this evaluation point :
int
for integer external function,double
for double external function,an iterable (
list
,set
,tuple
) composed of numbers of same type (int
ordouble
) for array external function.
Only allowed in states
MODELING
orSTOPPED
.- Parameters:
value (
int
,double
or an iterable) – Return value of this point.
- HxEvaluationPoint.get_return_value()¶
Returns the return value of this evaluation point. The returned value can be a double, an integer or
HxArray
depending on the type of the external function associated with this evaluation point.- Returns:
Return value of this point.
- Return type:
int
,double
orHxArray
- HxEvaluationPoint.get_argument(pos)¶
Returns the value of the argument at the given position. The returned value can be a double or an integer depending on the type of the argument value.
- Parameters:
pos – Position in the argument list.
- Returns:
Value of the argument.
- Return type:
int
ordouble