Originally posted by: SystemAdmin
[Didier Vidal said:]
Hello,
Here are some answers to your questions, which, I hope, will help you understand the model I posted
how i can maximize a boolean variable???
In OPL, a boolean variable has value 0 when false, and 1 when true. Its domain is 0..1 . This is why you can maximize it.
An logical expression (pay >= 0.9*drivingDistance) is considered a boolean expression by OPL (when using CP), with the same convention (0 if false, 1 if true). You can make comparison, sums, product, and any arithmetic operation you want with such expressions. An equality between enforcement, the boolean variable, and a logical expression, means that the enforcement's value is one if and only if the logical expression is true.
Hope this helps.
Didier.
#ConstraintProgramming-General#DecisionOptimization