Example 11.1 Simple Integer Linear Program

This example illustrates a model in an MPS-format SAS data set. This data set is passed to PROC OPTMILP, and a solution is
found.

Consider a scenario where you have a container with a set of limiting attributes (volume V and weight W) and a set I of items that you want to pack. Each item type i has a certain value , a volume , and a weight . You must choose at most four items of each type so that the total value is maximized and all the chosen items fit into the
container. Let be the number of items of type i to be included in the container. This model can be formulated as the following integer linear program:

Constraint (volume_con) enforces the volume capacity limit, while constraint (weight_con) enforces the weight capacity limit.
An instance of this problem can be saved in an MPS-format SAS data set by using the following code:

In the COLUMNS section of this data set, the name of the objective is z, and the objective coefficients appear in field4. The coefficients of (volume_con) appear in field6. The coefficients of (weight_con) appear in field4. In the RHS section, the bounds V and W appear in field4. This problem can be solved by using the following statements to call the OPTMILP procedure:

The optimal solution is , and , with a total value of 87. From this solution, you can compute the total volume used, which is 988 (); the total weight used is 499 (). The problem summary and solution summary are shown in Output 11.1.3.