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.

LSBBSolution Class

class localsolverblackbox.LSBBSolution

Solution to the optimization model. A solution carries the values of all expressions in the model. It is used to retrieve the values of all expressions (getting the solution).

See:LSBBSolutionStatus

Summary

Methods
GetLocalSolverBlackBox Returns the LocalSolverBlackbox object associated to this solution.
GetIntValue Returns the value of the given expression in this solution.
GetDoubleValue Returns the value of the given expression in this solution.

Instance methods

LocalSolverBlackBox GetLocalSolverBlackBox()

Returns the LocalSolverBlackbox object associated to this solution.

Returns:LocalSolverBlackbox object
Return type:LocalSolverBlackbox
long GetIntValue(LSExpression expr)

Returns the value of the given expression in this solution. Only allowed in states LSBBState.Paused or LSBBState.Stopped. Only allowed if this expression is a boolean or an integer.

Arguments:expr (LSExpression) – Expression.
Returns:Value of the expression in this solution.
Return type:long
double GetDoubleValue(LSExpression expr)

Returns the value of the given expression in this solution. Only allowed in states LSBBState.Paused or LSBBState.Stopped. Only allowed if this expression is a double.

Arguments:expr (LSExpression) – Expression.
Returns:Value of the expression in this solution.
Return type:double