This page is for an old version of Hexaly Optimizer. We recommend that you update your version and read the documentation for the latest stable release.

LSSurrogateParameters Class

class localsolver.LSSurrogateParameters

Parameters specific to the surrogate modeling feature. Surrogate parameters can be used to query and set the evaluation budget and the evaluation points of the associated external function.

Since:9.5
See:LSExternalContext.EnableSurrogateModeling

Summary

Methods
GetEvaluationLimit Returns the maximum number of evaluations.
SetEvaluationLimit Sets the maximum number of evaluations.
CreateEvaluationPoint Creates an evaluation point for the external function.
GetNbEvaluationPoints Returns the number of evaluation points.
GetEvaluationPoint Returns the evaluation point at the given position.

Instance methods

int GetEvaluationLimit()

Returns the maximum number of evaluations. By default, the maximum number of evaluations is set to the largest positive integer on 32 bits, that is 2^32-1 = 2,147,483,647 > 10^9.

Returns:Maximum number of evaluations.
Return type:int
void SetEvaluationLimit(int evaluationLimit)

Sets the maximum number of evaluations. By default, the maximum number of evaluations is set to the largest positive integer on 32 bits, that is 2^32-1 = 2,147,483,647 > 10^9. Only allowed in states Modeling or Stopped.

Arguments:evaluationLimit – Maximum number of evaluations.
LSEvaluationPoint CreateEvaluationPoint()

Creates an evaluation point for the external function. It consists of a list of values corresponding to the function’s arguments and return value. 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. Only allowed in states Modeling or Stopped.

Returns:Evaluation point.
Return type:LSEvaluationPoint
int GetNbEvaluationPoints()

Returns the number of evaluation points.

Returns:Number of evaluation points.
Return type:int
LSEvaluationPoint GetEvaluationPoint(int pos)

Returns the evaluation point at the given position.

Arguments:pos – Position of the evaluation point.
Returns:Evaluation point at the given position.
Return type:LSEvaluationPoint