The mathematical formalism for LP problems only nows nonnegative real variables. And of course one immediately learns how to model unconstrained real variables by a difference between two nonnegative real variables. And bounded real variables by adding extra constraints.
The formalism for MILP/MIP problems adds integer variables. Constraints may be used to restrict to smaller intervals.
In the world of solvers and AMLs there are several common domains for decision variables.
- The default choice is a nonnegative real variable.
- The next level are “free” variables, i.e. unconstrained real variables.
- Then there are integer variables.
- And most solvers special case binary variables, because they are so common and central to branching.
- And some solvers add semicontinous variables, with domain $\{0\}\cup{}[a,b]$.
In the following I ignore semicontinous variables, as they are just a solver shortcut for MBLP modelled constraints. If one organises these the remaining domains along the axes of discreteness and bounds, then the following grid emerges
Continuous | Discrete | |
---|---|---|
Unbounded | $\mathbb{R}$ | $\mathbb{Z}$ |
Nonnegative | $[0,\infty[$ | (1) |
(3) | (2) | $\{0,1\}$ |
The obvious gaps are:
- Natural numbers $\mathbb{N}$. Useful for counting variables, set and array sizes and array indices.
- Unit interval $[0,1]$. Useful as relaxation of binary variables, as weight coefficients and for the representation of probabilities.
- The natural name for the last row seems to be “Unit-valued”.
In addition the bounds imply closure over various arithmetic operations:
- Unbounded domains are closed under addition, subtraction and multiplication.
- Nonnegative domains are closed under addition and multiplication.
- Unit-valued domains are closed under multiplication only.