next previous up

Lecture 19: Linear Programming II

(This material is not covered in Fleischer. A good reference text is Hillier and Lieberman, ``Introduction to Operations Research'', published by Holden-Day; the fourth edition of this text came out in 1986, and a fifth edition has come out since.)

Recap

So far, we have done the first step in a simplex-method solution: start from the origin, identify the entering basic variable, then identify the leaving basic variable. Having done this, the next step is to restore the problem to standard form. Standard form means:

To get the equation system into standard form, we can multiply any equation by a non-zero scalar, or add any two equations together. Performing these operations, we get the new system of equations

Z - 3x1 + 5/2x4 = 30

x1 + x3 = 4

x2 + x4/2 = 6

3x1 - x4 + x5 = 6

, Inspecting the objective function, we see that the only way to increase its value is to increase the value of x1, which is therefore the next entering basic variable. As x1 increases in value, the first constraint to become critical is the third one; as soon as x1 becomes 2, the variable x5 must become zero. Hence, x5 is the leaving basic variable. We now put the system back into standard form:

Z + 5/2x4 + x5 = 36

x3 + x4/3 - x5/3 = 2

x2 + x4/2 = 6

x1 - x4/3 + x5/3 = 2

, We can see that the value of the objective function cannot be increased by further changes, so we've finished. Note that one feature of standard form is that we can read off the values of the basic variables from the right-hand sides of the equations. The meaning of the value of a decision variable is obvious: x1 = 2 means that we produce 2,000 Standard phones. What is the significance of the final value of a slack variable?

Exercise

A battery-manufacturing company is considering adding two new products to its market range, the Everlast III battery and the Xeros dry-cell. The Everlast III requires 2 gms of cadmium and 4 gms of nickel per unit, while the Xeros requires 3 gms of nickel and 4 gms of powdered zinc. The total amount of cadmium available on the market, after the company's other needs have been met, is 1,000 kg. The total amount of nickel is 3,000 kg. Zinc is available in unlimited quantities.

Producing 1,000 Everlast III's would require 2 hours on a Glunt II press, whereas producing 1,000 Xeros dry-cells would require 3 hours. There are 1,800 hours available per year on the press.

The company expects to make $1,000 profit on every 1000 Everlast III's sold, and $1,500 profit on every 1000 Xeros dry-cells. Formulate the problem as a linear programming problem, and solve it by the graphical method and the simplex method.

The first step is to select decision variables. These could be the number of each type of battery produced, but it will make the arithmetic slightly easier if we count in thousands of batteries. So x1 can be the number of thousands of Everlast III's, and x2 the number of thousands of Xeros dry-cells. We next write down the objective function, that is, the thing that we want to maximize. It would be nice to maximize profit. Our profit, in thousands of dollars, is

Z=x1+1.5x2

The number of batteries we can make is constrained in several ways. Firstly, there's a constraint imposed by the availability of cadmium:

2x1 =< 1000

The limited supply of nickel imposes a constraint

4x1+ 3x2 =< 3000

The time available on the Glunt press imposes a constraint

2x1+ 3x2 =< 1800

We also have two non-negativity constraints: we can't produce negative numbers of batteries, so the two decision variables must be greater than or equal to zero.

To prepare for the simplex method, we convert these inequality constraints to equations by adding slack variables:

2x1 + x3 = 1000

4x1+ 3x2 + x4= 3000

2x1+ 3x2 + x5= 1800

To avoid constant rewriting of the variable names (tedious in Netscape), we write these equations as a tableau:

Equation Basic variable Coefficient of Variable RHS
Z x1 x2 x3 x4 x5 bi
0 Z 1 -1 -1.5 0 0 0 0
1 3 0 2 0 1 0 0 1000
2 4 0 4 3 0 1 0 3000
3 5 0 2 3 0 0 1 1800

Note that we obtain this initial tableau by writing down the equations in matrix-like form. We have also assigned initial values to the variables: we set the two decision variables to zero, and the remaining variables then take the values implied by the equations. The initial value of the objective function is zero, which is not surprising -- we're not making any batteries, so we don't get any profit.

To increase the profit, we should make one of the decision variables non-zero. We choose x2, since it has the larger coefficient in the objective function. So this is the entering basic variable.

Now we inspect the other equations to see which of the current basic variables will first be forced to zero as x2 increases. We see that x5 is the first to be forced to zero, so it becomes the leaving basic variable.

Now we restore the tableau to standard form -- one basic variable, with a coefficient of 1, in each equation.

Equation Basic variable Coefficient of Variable RHS
Z x1 x2 x3 x4 x5 bi
0 Z 1 0 0 0 0 0.5 900
1 3 0 2 0 1 0 0 1000
2 4 0 2 0 0 1 0 1200
3 2 0 2/3 1 0 0 1/3 600

Examining this tableau, we see that all the coefficients in the objective function are positive, so no further improvement is possible. So we conclude that we should make 600,000 Xeros drycells, for a total profit of $900,000.

This problem is characterised by multiple solutions; the objective function is parallel to one of the constraint equations, so any solution along one edge of the simplex will give an optimum value to the objective function. This is evident using the graphical method; the tableau method won't disclose this unless we notice that one constraint equation is a linear multiple of the objective function.

Other anomalies that can occur during the application of the simplex method include:

Tie for the Entering Basic Variable

This can occur if two or more non-basic variables have the same negative coefficient in the objective function, at any stage of the analysis. The solution to this is very easy: you can choose one of them arbitrarily to become the new entering basic variable.

Tie for the Leaving Basic Variable

This case is called degeneracy. It occurs when the increase in the value of the entering basic variable sends two of the current basic variables to zero simultaneously. In principle this can lead to the method going into an infinite loop. In practice, however, breaking the tie arbitrarily seldom leads to problems.

No Leaving Basic Variable

What happens if, as the value of the entering basic variable increases, none of the current basic variables is forced to zero?

This implies that the value of the objective function can increase without limit. This is a signal that either you have found a way to make an infinite amount of money or that you have set the problem up wrongly in the first place. (One of these is significantly more probable than the other.)


next previous up

John Jones
Mar 3 10:38:23 PDT 2008