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.

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

See:

LSBBModel

LSBBOperator

Summary

Functions
addOperand Adds the given operand to this expression.
isBool Returns true if this expression is a boolean (ie 0 or 1), false otherwise.
isInt Returns true if this expression is an integer, false otherwise.
isDouble Returns true if this expression is a double, false otherwise.

Functions

void addOperand(LSBBExpression e)

Adds the given operand to this expression.

Only allowed in state S_Modeling.

Parameters:e - Operand to add.

bool isBool()

Returns true if this expression is a boolean (ie 0 or 1), false otherwise.

Only allowed in states S_Paused or S_Stopped.

Return:True if the expression is a boolean.

bool isInt()

Returns true if this expression is an integer, false otherwise.

Only allowed in states S_Paused or S_Stopped. Note that a boolean is also an integer.

Return:True if the expression is an integer.

bool isDouble()

Returns true if this expression is a double, false otherwise.

Only allowed in states S_Paused or S_Stopped.

Return:True if the expression is a double.