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

Functions
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.
setTimeLimit Sets the time limit in seconds.
getTimeLimit Gets the time limit in seconds.
setEvaluationLimit Sets the maximum number of blackbox evaluations.
getEvaluationLimit Gets the maximum number of blackbox evalutions.
setObjectiveBound Sets the objective bound.

Functions

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 S_Stopped.

Parameters:seed - Seed of the pseudo-random number generator.

int getSeed() const

Gets the seed of the pseudo-random number generator used by the solver.

Only allowed in states S_Paused or S_Stopped.

Return:Seed of the pseudo-random number generator.
See:setSeed(int)

void setTimeLimit(int limit)

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 S_Stopped.

Parameters:limit - Time limit in seconds.

int getTimeLimit() const

Gets the time limit in seconds.

Only allowed in states S_Paused or S_Stopped.

Return:Time limit in seconds.
See:setTimeLimit(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 S_Stopped.

Parameters:limit - Maximum number of blackbox evaluation.

int getEvaluationLimit() const

Gets the maximum number of blackbox evalutions.

Only allowed in states S_Paused or S_Stopped.

Return:Evaluation limit.
See:setEvaluationLimit(int)

void setObjectiveBound(double bound)

Sets the objective bound.

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

Parameters:bound - Objective bound.