Simplex Method: simplifying constraints

358 Views Asked by At

In my Computer Science class we've been exploring the Simplex Method and the applications it has with discovering optimal solutions. I've loved the challenge how much easier it makes finding solutions to business-model problems.

One problem that I have though is understanding how constraints are set when you have non-matching units. For example, an assignment we completed dealt with finding the maximum profit of a precious-metal processing setup. Most constraints made sense as their units lined up (water used per material, hours of labor per material, hours of refining, etc.) but there were two I could not understand on how to implement. We had a limit of rock in tons and could extract only one type of ore per ton. Each ton contained 10 oz copper, 2 oz gold, 3 oz silver, and 1 oz platinum. We're limited to a max of 2000 tons of rock to use.

I correctly constructed the problem up to this point (note that each variable is represents an ounce):

Maximize z = 10.20c + 422.30g + 6.91s + 853.00p subject to
                30c +     15g +   19s +     12p ≤ 1000 (kW hours)
              1000c +   6000g + 4100s +   9100p ≤ 1000000 (gal. water)
                50c +     20g +   21s +     10p ≤ 640 (labor hours)
                 4c +      6g +   19s +     30p ≤ 432 (processing hours)

What I could not figure out was how to properly implement the maximum amount of ore and rock. I can't just put

 10c + 2g + 3s + p ≤ 2000
because it's mixing the ounce limit of each ore per ton with the constraint of maximum tons available. I tried using
 c + g + s + p ≤ 2000 
to indicate how many tons we use and which ores are chosen but they would/will not explain why this is wrong.

What's the proper way of identifying and defining these as constraints so that they can be added?

1

There are 1 best solutions below

6
On BEST ANSWER

Not being able to model a constraint rings a bell that you might have defined inappropriate decision variables. Define the following decision variables

  1. $x_c$=number of tons from which (only) copper will be extracted.
  2. $x_g$=number of tons from which (only) gold will be extracted.

and similarly $x_s$ and $x_p$. Now you have the constraint that $$x_c+x_g+x_s+x_p\le2000$$

Your actual decision has to do with the question: "from how many tons will I extract (only) copper, gold, silver and from how many platinum?" So, accordingly you should define your decision variables.