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.

LSBBExpression Class

class localsolverblackbox.LSBBExpression

Mathematical modeling expression. Expressions are used to build the mathematical optimization model associated to LocalSolverBlackBox. An expression is composed of an operator (which corresponds to its type) and its operands (which are other expressions of the model).

Summary

Methods
is_double Returns true if this expression is a double, false otherwise.
is_int Returns true if this expression is an integer, false otherwise.
is_bool Returns true if this expression is a boolean (ie 0 or 1), false otherwise.
add_operand Add the given operand to this expression.

Instance methods

LSBBExpression.is_double()

Returns true if this expression is a double, false otherwise. Only allowed in states LSBBState.PAUSED or LSBBState.STOPPED.

Returns:True if the expression is a double.
Return type:bool
LSBBExpression.is_int()

Returns true if this expression is an integer, false otherwise. Only allowed in states LSBBState.PAUSED or LSBBState.STOPPED. Note that a boolean is also an integer.

Returns:True if the expression is an integer.
Return type:bool
LSBBExpression.is_bool()

Returns true if this expression is a boolean (ie 0 or 1), false otherwise. Only allowed in states LSBBState.PAUSED or LSBBState.STOPPED.

Returns:True if the expression is a boolean.
Return type:bool
LSBBExpression.add_operand(operand)

Add the given operand to this expression. The operand can be an LSBBExpression, a boolean, an integer or a double. Only allowed in state LSBBState.MODELING.

Parameters:operand – Operand to add. Can be an LSBBExpression, a boolean, an integer or a double.