Presentation is loading. Please wait.

Presentation is loading. Please wait.

Unrestricted-in-Sign Variables In solving LPs with the simplex algorithm, we used the ratio test to determine the row in which the entering variable became.

Similar presentations


Presentation on theme: "Unrestricted-in-Sign Variables In solving LPs with the simplex algorithm, we used the ratio test to determine the row in which the entering variable became."— Presentation transcript:

1 Unrestricted-in-Sign Variables In solving LPs with the simplex algorithm, we used the ratio test to determine the row in which the entering variable became a basic variable. Recall that the ratio test depended on the fact that any feasible point required all variables to be nonnegative. Thus, if some variables are allowed to be unrestricted in sign (urs), the ratio test and therefore the simplex algorithm are no longer valid. In this section, we show how an LP with unrestricted-in-sign variables can be transformed into an LP in which all variables are required to be nonnegative.

2 For each urs variable xi, we begin by defining two new variables xi` and xi``. Then substitute xi `- xi`` for xi in each constraint and in the objective function. Also add the sign restrictions xi ` and xi ``. The effect of this substitution is to express xi as the difference of the two nonnegative variables xi ‘and xi’’. Because all variables are now required to be nonnegative, we can proceed with the simplex.

3 Example- Baker Problem A baker has 30 oz of flour and 5 packages of yeast. Baking a loaf of bread requires 5 oz of flour and 1 package of yeast. Each loaf of bread can be sold for 30¢. The baker may purchase additional flour at 4¢/oz or sell leftover flour at the same price. Formulate and solve an LP to help the baker maximize profits (revenues costs).

4 Baker Problem Define x1 = number of loaves of bread baked x2 = number of ounces by which flour supply is increased by cash transactions Therefore, x2 > 0 means that x2 oz of flour were purchased, and x2 <0 means that x2 ounces of flour were sold (x2 = 0 means no flour was bought or sold). After noting that x1 ≥ 0 and x2 is urs, the appropriate LP is

5 Objective function z = 30x1-4x2 Subject to 5x1 ≤ 30+x2 x1 ≤ 5 x1 ≥ 0 and x2 is urs

6 Put x2=x2`- x2`` Maximize z= 30x1-4x2’+4x2`` S.T 5x1 ≤ 30+x2`-x2`` x1 ≤ 5 x1,x2`,x`` ≥ 0

7 Maximize z= 30x1-4x2’+4x2`` S.T 5x1-x2`+x2`` ≤ 30 x1 ≤ 5 x1,x2`,x`` ≥ 0

8 Maximize z= 30x1-4x2’+4x2`` S.T 5x1-x2`-x2`` +s1=30 x1 +s2 = 5 x1,x2`,x`` ≥ 0 z- 30x1+4x2’-4x2``=0

9 Simplex Method zx1X2`X2``s1s2solBasic var ration 1-304-4000z=0 0511030S1=30 0100015S2=5

10 Simplex Method z x1 X2`X2``s1s2solBasic var ration 1 -30 4-4000z=0 0 5 11030S1=306 0 1 00015S2=55

11 Simplex Method z x1 X2`X2``s1s2solBasic var ration 1 -30 4-4000z=0 0 5 11030S1=30 0 1 00015S2=5

12 Simplex Method s2 is leaving and x1 in entering z x1 X2`X2``s1s2solBasic var ration 1 0 4-4030150z=150 0 5 11030S1=30 0 1 00015S2=5

13 Simplex Method s2 is leaving and x1 is entering z x1 X2`X2``s1s2solBasic var ration 1 0 4-4030150z=150 0 0 11-55S1=5 0 1 00015x1=5

14 Simplex Method s1 is leaving and x2`` is entering z x1 X2` X2`` s1s2solBasic var ration 1 0 4 -4 030150z=150 0 0 1 1-55S1=55 0 1 0 0 015x1=5inf

15 Simplex Method s1 is leaving and x2``is entering z x1 X2` X2`` s1s2solBasic var ration 1 0 4 -4 030150z=150 0011-55S1=5 0 1 0 0 015x1=5

16 Simplex Method s2 is leaving and x1 is entering z x1 X2` X2`` s1s2solBasic varration 1 0 0 0 410170z=170 0011-55X2``=5 0 1 0 0 015x1=5


Download ppt "Unrestricted-in-Sign Variables In solving LPs with the simplex algorithm, we used the ratio test to determine the row in which the entering variable became."

Similar presentations


Ads by Google