9.11 An ILP model for the Multiple-Choice Knapsack Problem¶
Part 2 · Formulations and their properties · Chapter 9 · Chapter 9: Knapsack problems · Lecture notes, volume 2 (PDF) · Slides · Exercises: Knapsack problems · App: LP relaxation and upper bounds for the 0/1 KP
The Multiple-Choice Knapsack Problem and its reference instance (Example 2.7) are defined in Chapter 2 «Knapsack problems», Section 2.8.
-
We introduce the following \(n\) binary variables:
\[\begin{equation*} \label{BIN_VAR_MCKP} x_j = \left\{ \begin{array}{ll} 1 & \textrm{if item $j$ is selected in the knapsack}\\[1.5ex] 0 & \textrm{otherwise} \end{array} \qquad \forall j \in \mathscr{I}. \right. \tag{9.30} \end{equation*}\]
Using these variables, an Integer Linear Programming (ILP) model for the Multiple-Choice Knapsack Problem (MCKP) reads as follows:
This ILP model is referred to as the \(\mathrm{ILP}_{\mathrm{MCKP}}\) model.
-
Description of the objective function and constraints of the \(\mathrm{ILP}_{\mathrm{MCKP}}\) model:
-
the linear objective function \(\eqref{obj_MCKP}\) maximizes the total profit of the items selected in the knapsack;
-
constraint \(\eqref{cons1_MCKP}\) ensures that the total weight of the selected items does not exceed the knapsack capacity (one linear constraint);
-
constraints \(\eqref{cons2_MCKP}\) ensure that exactly one item is selected from each class (\(q\) linear constraints, one for each class);
-
finally, constraints \(\eqref{cons3_MCKP}\) define the variables of the ILP model.
-
Example 9.15: \(\mathrm{ILP}_{\mathrm{MCKP}}\) model
We consider a knapsack of capacity \(c = 15\) and a set \(\mathscr{I} = \{1,2,3,4,5,6\}\) of \(6\) items (\(n = 6\)), partitioned into \(q = 3\) classes \(\mathscr{J}_1 = \{1,2\}\), \(\mathscr{J}_2 = \{3,4\}\) and \(\mathscr{J}_3 = \{5,6\}\), with the following profits and weights:
This is the MCKP instance of Example 2.7. The \(\mathrm{ILP}_{\mathrm{MCKP}}\) model for this MCKP instance is:
An optimal solution \(~{\tilde{\vet x}}(\mathrm{ILP}_{\mathrm{MCKP}})\) is:
The optimal value \(z(\mathrm{ILP}_{\mathrm{MCKP}})\) is \(17\). The associated optimal solution of the MCKP is \(\tilde{S} =\{1,4,5\}\). The optimal solution is not unique: the subset \(\{2,3,5\}\) has the same value.
Next: 9.12 An ILP model for the Knapsack Problem with Setups