LSEvaluationPoint Class¶
-
class
localsolver.
LSEvaluationPoint
¶ 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 solver 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 solver to drive the solution process. You must be careful about the data you provide: if an incorrect value is given, the solver may have an unexpected behavior.
Since: 10.0 See: LSSurrogateParameters.CreateEvaluationPoint See: LSSurrogateParameters.GetEvaluationPoint
Summary¶
AddArgument |
Adds an integer argument with the given value. |
SetArgument |
Sets the value of the argument at the given position. |
SetReturnValue |
Sets the return value of this evaluation point. |
IsIntReturnValue |
Returns true if the external function associated with this evaluation point is an integer function, false otherwise. |
IsDoubleReturnValue |
Returns true if the external function associated with this evaluation point is a double function, false otherwise. |
IsArrayReturnValue |
Returns true if the external function associated with this evaluation point is an array function, false otherwise. |
IsIntArgument |
Returns true if the argument at this given position is an integer, false otherwise. |
IsDoubleArgument |
Returns true if the argument at this given position is a double, false otherwise. |
GetIntReturnValue |
Returns the return value of this evaluation point. |
GetDoubleReturnValue |
Returns the return value of this evaluation point. |
GetArrayReturnValue |
Returns the return value of this evaluation point. |
GetIntArgument |
Returns the value of the argument at the given position. |
GetDoubleArgument |
Returns the value of the argument at the given position. |
Instance methods¶
-
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
Modeling
orStopped
.Arguments: value – Value of the argument.
-
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
Modeling
orStopped
.Arguments: value – Value of the argument.
-
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
Modeling
orStopped
.Arguments: - pos – Position in the argument list.
- value – Value of the argument.
-
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
Modeling
orStopped
.Arguments: - pos – Position in the argument list.
- value – Value of the argument.
-
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
Modeling
orStopped
.Arguments: value – Return value of this point.
-
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 state
Stopped
.Arguments: value – Return value of this point.
-
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
Modeling
orStopped
.Arguments: value – Return value of this point.
-
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
Modeling
orStopped
.Arguments: value – Return value of this point.
-
bool
IsIntReturnValue
()¶ Returns true if the external function associated with this evaluation point is an integer function, false otherwise. You can retrieve the value with
LSEvaluationPoint.GetIntReturnValue()
.Returns: True if the return value is an integer. Return type: bool
-
bool
IsDoubleReturnValue
()¶ Returns true if the external function associated with this evaluation point is a double function, false otherwise. You can retrieve the value with
LSEvaluationPoint.GetDoubleReturnValue()
.Returns: True if the return value is a double. Return type: bool
-
bool
IsArrayReturnValue
()¶ Returns true if the external function associated with this evaluation point is an array function, false otherwise. You can retrieve the value with
LSEvaluationPoint.GetArrayReturnValue()
.Returns: True if the return value is an array. Return type: bool
-
bool
IsIntArgument
(int pos)¶ Returns true if the argument at this given position is an integer, false otherwise. You can retrieve the value with
LSEvaluationPoint.GetIntArgument(int pos)
.Arguments: pos – Position in the argument list. Returns: True if the argument at this given position is an integer. Return type: bool
-
bool
IsDoubleArgument
(int pos)¶ Returns true if the argument at this given position is a double, false otherwise. You can retrieve the value with
LSEvaluationPoint.GetDoubleArgument(int pos)
.Arguments: pos – Position in the argument list. Returns: True if the argument at this given position is a double. Return type: bool
-
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. Return type: long
-
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. Return type: double
-
LSArray
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. Return type: LSArray
-
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.
Arguments: pos – Position in the argument list. Returns: Value of the argument. Return type: long
-
double
GetDoubleArgument
(int pos)¶ Returns the value of the argument at the given position. Only allowed if this argument is a double.
Arguments: pos – Position in the argument list. Returns: Value of the argument. Return type: double