LocalSolver logo
is now
Hexaly logo

We're excited to share that we are moving forward. We're leaving behind the LocalSolver brand and transitioning to our new identity: Hexaly. This represents a leap forward in our mission to enable every organization to make better decisions faster when faced with operational and strategic challenges.

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.

LSBBParam Class

class localsolverblackbox.LSBBParam

Solving parameters. This class contains some methods allowing you to parameterize the resolution of the model. For the sake of simplicity, only a few parameters are actually offered to tune the search.

Summary

Methods
SetSeed Sets the seed of the pseudo-random number generator used by the solver.
GetSeed Gets the seed of the pseudo-random number generator used by the solver.
GetTimeLimit Gets the time limit in seconds.
SetTimeLimit Sets the time limit in seconds.
GetEvaluationLimit Gets the maximum number of blackbox evalutions.
SetEvaluationLimit Sets the maximum number of blackbox evaluations.
SetObjectiveBound Sets the objective bound.

Instance methods

void SetSeed(int seed)

Sets the seed of the pseudo-random number generator used by the solver. The seed must be a positive integer. The default seed is set to 0. Only allowed in state LSBBState.Stopped.

Arguments:seed (int) – Seed of the pseudo-random number generator.
int GetSeed()

Gets the seed of the pseudo-random number generator used by the solver. Only allowed in states LSBBState.Paused or LSBBState.Stopped.

You can also use the shortcut member seed

Returns:Seed of the pseudo-random number generator.
Return type:int
int GetTimeLimit()

Gets the time limit in seconds. Only allowed in states LSBBState.Paused or LSBBState.Stopped.

Returns:Time limit in seconds.
Return type:int
void SetTimeLimit(int timeLimit)

Sets the time limit in seconds. Note that the “real” time (that is, total time) spent to resolve the model is considered here (and not only the CPU time). The default time limit is set to the largest positive integer on 32 bits, that is 2^31-1 = 2,147,483,647 > 10^9. Only allowed in state LSBBState.Stopped.

Arguments:timeLimit (int) – Time limit in seconds.
int GetEvaluationLimit()

Gets the maximum number of blackbox evalutions. Only allowed in states LSState.Paused or LSBBState.Stopped.

Returns:Evaluation limit.
Return type:int
void SetEvaluationLimit(int limit)

Sets the maximum number of blackbox evaluations. The default number of evaluations is set to the largest positive integer on 32 bits that is 2^31-1 = 2,147,483,647 > 10^9. Only allowed in state LSBBState.Stopped.

Arguments:limit (int) – Maximum number of blackbox evaluations.
void SetObjectiveBound(double bound)

Sets the objective bound. If the objective is minimized (respectively maximized), then the optimization of this objective is stopped as soon as this lower (respectively upper) bound is reached. Only allowed in states LSBBState.Stopped.

Arguments:bound (double) – Objective bound.