MIP 2: Modeling Constructs for Internal Decisions

Packages Used: No new packages are used in this notebook.

In an LP, no decision variable can be restricted to being integer-valued, and no decisions can be made (internally) as part of the solution procedure. In practice, what usually necessitates representing a problem as a MILP is that that one or more discrete decisions need to be made as part of the solution procedure.

1. Logical Conditions

Binary decision variables take the value of 1 or 0. These remain integers with respect to the mathematical and logical operations performed, but model discrete binary decisions:

Single binary variable

Two binary vaiables

Three binary vaiables

Ex 1: Capital Budgeting

Many capital budgeting problems involve investment opportunities and can have additional constraints with respect to their occurrence.

Additional Constraints

2. Semi-Continuous Variables

In practice, what can necessitate representing a problem as a MILP is that an (otherwise continuous) decision variable $x$ has a non-zero lower bound $l$ only if it is used in a solution; otherwise, it can remain at zero. This type of discontinuous variable is termed semi-continuous: $ x = \{ 0 \} \cup \left[ l, u \right] $.

For example, if there were minimum order quantity (MOQ) restrictions on the purchase of an item, then it would be incorrect to just add these quantities as lower bounds to the quantity purchased of each item because it might be better as a result of the minimum purchase quantity, to not purchase one of the items. This would violate a lower-bound constraint, but if a binary decision variable could be used to represent whether or not an item is purchased, and then the minimum purchase quantity would be enforced only when the item is purchased. Adding binary decision variables turns an LP into a MILP.

Ex 2: Arbitrage Opportunity with MOQ Restrictions

Continuing with Ex 1 from LP 2, where the optimal solution was to purchase 15 pounds of coffee or peppers for a profit of \$195. If there were minimum order quantities (MOQ) for the coffee or peppers, then it would be incorrect to just add these quantities as lower bounds to the quantity purchased of each item. Assume that there is a MOQ of 20 pounds for coffee and no MOQ for peppers. Just adding the MOQ as a constraint to the LP gives the following:

In order to correctly account for the 20-pound coffee MOQ, a binary decision variable $y_1 \in \{ 0, 1 \}$ can be added to the model that is used to "switch on" (by taking a value of 1) the 20-pound coffee LB only when any $x_1 \ge 0$ coffee is purchased, making the model a MILP. Internal to the model, $y_1$ decides not to purchase coffee (by taking a value of 0), increasing the total profit to from \$170 for the LP to \\$180 for the MILP:

3. Maximum Values

Let $ y = \operatorname{max} \bigl\{ x_1, x_2, \dots, x_n \bigr\} $ for continuous variables $x_i$ with $0 \le x_i \le u$. MIP formulation:

$ \begin{eqnarray*} \quad y &\ge& x_i \\ \quad y &\le& x_i + u(1 - z_i) \\ \quad \sum_{i=1}^n z_i &=& 1 \end{eqnarray*} $

In practive, $x_i$ are continuous decision variables inside of the model. To better illustrate the MIP formulation to determine the maximum $x_i$ value, they are defined outside the model (along with an upper bound $u$ that is assumed to be 100):

Ex 3: Arbitrage Opportunity with Import Duty

Continuing with Ex 2 from LP 3, assume that there is an import duty of \$2 per pound that is only imposed on the single item that is imported in the largest quantity. This is done to try to reduce hoarding and/or speculation (i.e., arbitrage). The following solution was found without the import duty:

Including the duty on the maximum purchase quantity results in the following:

4. Fixed Costs

Instead of a single unit cost, often, the cost $C(x)$ to purchase $x$ units of an item is split between a cost per unit $c$ and a single fixed cost $k$ that is only incurred if the item is purchased:

$\quad C(x) = \begin{cases} 0, & x = 0 \\ k + cx, & x > 0 \end{cases} $.

In the MIP formulation, a binary variable $y_i$ is included in the objective function to account for the fixed cost, $k_i y_i + c_i x_i$, and is used in a constraint to switch $x_i$ between 0 and its upper bound $u_i$:

$\quad x_i \le u_i y_i $

Ex 4: Arbitrage Opportunity with Fixed Costs

Continuing with Ex 2 from LP 3, assume that there is an addition fixed price associtated with the purchase of each item: