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¶
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
orLSBBState.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
orLSBBState.STOPPED
. Note that a boolean is also an integer.Returns: True if the expression is a double. 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
orLSBBState.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.