1

I have the following problem:

+----------------------+--------------+--------------+----------+
| Process time (hours)                                          |
+----------------------+--------------+--------------+----------+
| Product              | Department A | Department B | Material |
+----------------------+--------------+--------------+----------+
| Shirts               | 2            | 1            | 2        |
| Shorts               | 2            | 3            | 1        |
| Pants                | 3            | 4            | 4        |
+----------------------+--------------+--------------+----------+

I need to maximize the revenue, considering that each product is processed on both departments. Department A has 120 hours of capacity and department B has 160 hours. 90 yards of material are available for all processing.

Each shirt and short generates \$10 of revenue and each pants generates \$23.

I can create a variable for each product and department (like ShirtA, ShirtB, ShortA, etc.), but even though the result will be the revenue, I'd like to find out if it's possible to use output variables with the sum of each product (Shirt = ShirtA + ShirtB).

juliano.net
  • 321
  • 3
  • 14

1 Answers1

1

No, you need separate variables for every degree of freedom. That means you need two variables respectively for Shirts, Shorts, and Pants.

Now, if you would like to create additional variables for convenience, you can, and use equality constraints to set their relationship to the underlying variables. For instance, Shirt = ShirtA + ShirtB could be offered as a constraint on three variables: Shirt, ShirtA, and ShirtB.

Of course, a solver might choose simply to eliminate those extra variables during the solution process, but if it does, it will compute their final values after it finishes.

Michael Grant
  • 19,450