Vous êtes sur la page 1sur 2

THE SIMPLEX METHOD USING DICTIONARIES

Consider the following problem with 3 constraints in 3 unknowns:

Maximize
subject to

4x1 3x1 x1 4x1 x1

+ 5x2 + 2x2 + 4x2 + 3x2 , x2

+ 3x3 + x3 + 2x3 + 2x3 , x3

5 11 8 0

Adding slack and objective variables:

Maximize
subject to

z x4 x5 x6

= 4x1 + 5x2 + 3x3 = 5 3x1 2x2 = 11 x1 4x2 = 8 4x1 3x2 x1 , x2 , x3 , x4 , x5 , x6 0

x3 2x3 2x3

which corresponds to the initial dictionary z x4 x5 x6 = 0 = 5 = 11 = 8 + 4x1 3x1 x1 4x1 + 5x2 2x2 4x2 3x2 + 3x3 x3 2x3 2x3

Every dictionary is a system of linear equations in the decision variables, the slack variables, and z. With the exception of z, the variables on the LHS of dictionary equations are the basic variables. The variables on the RHS of dictionary equations are the nonbasic variables. The corresponding set of basic variables, B={x4 , x5 , x6 }, constitutes this dictionaries

basis.

Setting the nonbasic (i.e. RHS) variables to zero immediately yields values of the basic (ie. LHS) variables (and z) satisfying the dictionary equations. If these values of the basic variables are all nonnegative the dictionary is called a feasible dictionary and the solution is called a basic feasible solution. In this example the initial feasible dictionary describes the basic feasible solution x1 = x2 = x3 = 0, x4 = 5, x5 = 11, x6 = 8 and z = 0, B = {x4 , x5 , x6 } and N = {x1 , x2 , x3 }.

A Simplex Method iteration


Step 1: Select the Entering Basis Variable (EBV) Choose the nonbasic variable that has the most positive coecient in the equation for z. Break ties using the candidate with the smallest subscript. NOTE: These coecients are the reduced costs cj corresponding to the nonbasic variables. In this example we select nonbasic variable x2 as the entering basic variable since c2 = 5 > c1 > c3 . Step 2: Select the Leaving Basis Variable (LBV) While maintaining all other nonbasic variables at zero increase the value of the entering basis variable, adjusting the basic variables according to the dictionary equations, until one of the basic variables, the Leaving Basis Variable, hits its lower-bound of zero. Break ties using the candidate with the smallest subscript. Notice that z increases in value as we increase the value of the EBV x2 while keeping x1 = x3 = 0. To maintain feasibility and satisfy the dictionary equations we require: 0 0 0 x4 x5 x6 = 5 = 11 = 8 2x2 4x2 3x2 x2 x2 x2 5/2 11/4 8/3

Thus increasing the value of x2 to 5/2 results in x4 = 0, x5 = 1 > 0 and x6 = 1/2 > 0. NOTE: This is called the Minimum Ratio computation!

Step 3: Pivot to exchange variables To complete this iteration rewrite the unique dictionary equation identied by the leaving basis variable to isolate the entering variable on the LHS, substitute this expression for the entering variable into all other dictionary equations where this variable appears, collect terms and simplify. NOTE: This step corresponds to exchanging the roles of the EBV (which enters the basis) and the LBV (which leaves the basis) in the dictionary equations. Isolating x2 in the dictionary equation corresponding to x4 x2 = 5 3 1 1 x1 x3 x4 2 2 2 2

we replace the equation corresponding to x4 with this equation and we use this equation to replace all other occurrences of x2 to obtain: z x2 x5 x6 = = = =
25 2 5 2

+ +

7 2 x1 3 2 x1

1 2 x3 1 2 x3 1 2 x3

+ +

5 2 x4 1 2 x4

1
1 2

5x1
1 2 x1

2x4 3 2 x4

This process of constructing a new dictionary is called pivoting and the equation used to pivot is called the pivot equation. The pivot operation takes us from one basic feasible solution to an improved adjacent basic feasible solution. This new dictionary implicitly describes the basic feasible solution x1 = x3 = x4 = 0, x2 = 5 1 25 , x5 = 1, x6 = and z = , B = {x2 , x5 , x6 } and N = {x1 , x3 , x4 }. 2 2 2

Notice that this BFS is also a solution to the initial dictionary equations and that the basis changed (from B={x4 , x5 , x6 } to B={x2 , x5 , x6 }) with the entering variable (x2 ) entering the basis and the leaving variable (x4 ) leaving the basis.
Repeating the above process yields the following sequence of iterations:

SECOND DICTIONARY
z x2 x5 x6 Basic feasible solution Entering variable Leaving variable Pivot equation = = = =
25 2 5 2

+ +

7 2 x1 3 2 x1

1 2 x3 1 2 x3 1 2 x3

+ +

5 2 x4 1 2 x4

1
1 2

5x1
1 2 x1

2x4 3 2 x4
25 2

1 x1 = x3 = x4 = 0, x2 = 5 , x5 = 1, x6 = 2 , z = 2 x3 x6 x3 = 1 + x1 + 3x4 2x6

THIRD (AND FINAL) DICTIONARY


z x2 x5 x3 Basic feasible solution Entering variable Leaving variable = = = = 13 2 1 1 3x1 2x1 + + 5x1 x1 + + x4 2x4 3x4 2x6 + x6 x6

2x4

x1 = x4 = x6 = 0, x2 = 2, x3 = 1, x5 = 1, z = 13 x3 x6

THIS IS THE OPTIMAL SOLUTION

Vous aimerez peut-être aussi