Boolean expressions
Describes the use of Boolean expressions in OPL.
Boolean expressions can have various operand types in OPL. They are constructed in different ways:
from integer expressions using the traditional relational operators
==,!=(not equal),>=,>,<, and<=.from float expressions using the same relational operators.
from string expressions and support the same operators as well.
For convenience, OPL offers a range expression to express special combinations for constraints.
They are of the form
a op1 x op2 b
where
op1andop2are either of the relational operators<=or<aandbare boundary expressions which need to be groundxis an expression
Those expressions are equivalent to
a op1 x; x op2 b
which is itself equivalent to
a op1 x && x op2 b