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
set_seed Sets the seed of the pseudo-random number generator used by the solver.
get_seed Gets the seed of the pseudo-random number generator used by the solver.
get_time_limit Gets the time limit in seconds.
set_time_limit Sets the time limit in seconds.
get_evaluation_limit Gets the maximum number of blackbox evalutions.
set_evaluation_limit Sets the maximum number of blackbox evaluations.
set_objective_bound Sets the objective bound.

Instance methods

LSBBParam.set_seed(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.

Parameters:seed (int) – Seed of the pseudo-random number generator.
LSBBParam.get_seed()

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
LSBBParam.get_time_limit()

Gets the time limit in seconds. Only allowed in states LSBBState.PAUSED or LSBBState.STOPPED.

Returns:Time limit in seconds.
Return type:int
LSBBParam.set_time_limit(time_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 LSBBState.STOPPED.

Parameters:time_limit (int) – Time limit in seconds.
LSBBParam.get_evaluation_limit()

Gets the maximum number of blackbox evalutions. Only allowed in states LSState.PAUSED or LSBBState.STOPPED.

Returns:Evaluation limit.
Return type:int
LSBBParam.set_evaluation_limit(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.

Parameters:limit (int) – Maximum number of blackbox evaluations.
LSBBParam.set_objective_bound(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.

Parameters:bound – Objective bound. The bound can be a double or an integer.