Logical and Integer Modeling

Tony Hürlimann

November 12, 2023


Logical and Boolean conditions are often used in real-live problem solving. However, its importance in practical modeling contrasts sharply with its treatment in modeling books and courses. Many modeling techniques and applications to formulate logical conditions are exposed in this paper.

It presents various methods of logical modeling, that is, mathematical modeling containing logical propositions and Boolean mixed with mathematical expressions within the constraints. Several modeling techniques are formulated in mathematical notation and in the modeling system LPL (see [13]). Concrete and executable model application examples are given for the different techniques.

A word of caution: It is not trivial in a practical context to use Boolean operators. One needs to analyze carefully the context to use the right operators. “and”, “or”, and other words in a a spoken text cannot be translated one-to-one to Boolean “and”, “or”, for instance. Check multiple times before proceeding!

A second word of caution: The modeling formulation may be correct, the implementation of the translation to a mathematical linear model might not always correspond to this logical modeling. This is due to the fact that in most cases, the automatically introduction of a new binary variable is realized in LPL as an implication instead of an equivalence. In most cases, this is justifies but not always. Hence, the resulting linear model in LPL should be checked anyway.

A ZIP file of all models can be found HERE