Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linear programming - dual simplex variable meanings?

I have just learned the simplex method for solving linear programs, and I'm trying to understand what it's dual problem represents.

I understand the mechanics of solving a dual problem - I do not need help with that. What I can't get (even after reading about it on Wikipedia) is the actual meanings of the y variables in the dual.

I would like to give an example all together with variable meanings in the primal problem, and what I figured out of the dual, and would ask anyone kind enough to explain the meanings in the dual:

Primal:

max z = 3*x1 +  5*x2

subject to:
          x1          <=  4
                2*x2  <= 12
        3*x1 +  2*x2  <= 18

        x1, x2 >= 0

In the primal problem, x1 and x2 are quantities of products A and B to be produced. 3 and 5 are their unit selling prices, respectively. Products are produced on 3 machines, M1-M3. To produce a first product, an hour of work on M1 and 3 hours on M3 are needed. To produce the second one, two hours of work are needed on both M2 and M3. Machines M1, M2, M3 can work for maximum of 4, 12 and 18 hours, respectively. Finally, I can not produce a negative quantity of any of the products.

Now, I set the dual problem:

min z = 4*y1 + 12*y2 + 18*y3

subject to:
          y1         +  3*y3 >= 3
                  y2 +  2*y3 >= 5

          y1, y2, y3 >= 0 

Now, the only thing I think I can figure out is that the constraints mean: - for an hour of work on M1 and 3 hours on M3, I should get payed at least 3 money units - for two hours of work on M2 and 2 hours on M3, I should get payed at least 5 money units

But, I just can't wrap my mind around the meanings of y1 and y2 variables. When I finally do the minimization, the result in z is the same in the primal (although the primal in increasing the lower bound of the result while the dual is decreasing the upper bound), but what does the objective function of the dual problem consist of?

like image 738
penelope Avatar asked Jan 31 '12 17:01

penelope


1 Answers

The Objective function of your Dual is to minimize the Cost/Hour of the 3 machines (resources).

So, the Dual's objective function (4*y1 + 12*y2+ 18*y3) can be read as:

Minimize 4*(cost/hour of Machine1) + 12*(cost/hour of M2) + 18*(cost/hr of M3)

Since the Primal dealt with maximizing the profit of production, the Dual can be thought of as Minimizing the production costs for the firm.

(It sometimes helps to think of the company "renting" the machines M1, M2 and M3.) If they are going to rent it, what is the most that they should pay [$/hour] for each machine and still manufacture x1 and x2 profitably?

The meaning of your dual variables y1, y2, and y3 are the per hour owning/renting costs.

The dual problem's y variables are often referred to as "shadow prices" of the resources.

Since you are looking for insight into understanding duals:

  1. One trick is to reduce the dimension of the dual. (Imagine there was only one Machine M1.) Now, formulate the dual and try to understand the objective function and the constraints.
  2. It helps to think in terms of "opportunity costs." If the manufacturing firm had to rent machines (resources), what price/hour should it pay? Alternatively, if there were many other (profitable) products, at what cost/hour will the machines be allotted to X1 and X2 instead of to manufacture these other products.
  3. Note that not all duals can be "understood" easily. However, you can get a sense of many dual constraints by looking at the corresponding variable in the primal. Similarly, you can get insights into a dual variable by studying the corresponding primal constraint.
like image 87
Ram Narasimhan Avatar answered Nov 13 '22 11:11

Ram Narasimhan