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