• Tidak ada hasil yang ditemukan

Simplex Algorithm : (Maximization Case)

Theorem 3.6 Every basic feasible solution to a LPP corresponds to a vertex of the set of feasible solution

2.8.1 Simplex Algorithm : (Maximization Case)

Note :

1. While discussing simplex method, we have assumed an initial basic feasible solution, we have assumed an initial basic feasible solution with a basis matrix B. If B = I then B-1 = I then initial solution xB = B-1b = b and y matrix is y = B-1A = A. Net evaluations, zj – cj = - cj + cBTB-1aj = - cj + cBTaj , j = 1, 2, …, n and value of the objective function Z = cBTxB = cBTb. Thus, we observe that if initial basis matrix is a unit matrix then it is easy to obtain initial solution and related parameters. Hence, in order to obtain initial basic feasible solution, we shall assume that a unit matrix is present as a sub-matrix of the coefficient matrix A.

2. For choosing incoming vector aj in the next basis, choose that zj – cj ( cj – zj)which is most negative (positive). If two or more zj – cj ( cj – zj) have the same most negative (positive) value, choose any one of the corresponding vector to enter into the basis.

3. After choosing the incoming vector, choose the outgoing vector which satisfies (2.13). If this minimum value is assumed for more than two vectors, choose any one of the corresponding basis vector from B.

Following two theorems will state without proof.

Step 4 : After selecting key column, next step is to decide the outgoing variable using (3.6) This ratio is called replacement ratio (RR). The replacement ratio restricts the number of units of incoming variables that can be obtained from the exchange. The row selected in this manner is called key row. The element at the intersection of key row and key column is called key element.

Note that the division by negative or zero element in key column is not allowed. Denote these cases by -.

Step 5 : Now we want to find new solution. If the key element is 1, then don’t change the row in the next simplex table. If the key element is other than 1, then divide element in that key row by that element including the element in xB – column and formulate the new row. The new values of the elements in the remaining rows for the next iteration can be evaluated by performing elementary operations on all rows so that all elements except the key element in the key column are zero. This can be also calculated as follows

(New row numbers) = (numbers in old row)-[ (numbers above or below the key element)×(corresponding number in the new row, that is the row replaced in the previous step)]

If new solution so obtained satisfies step 2 then terminate the process otherwise perform step 4 and step 5.

Repeat the steps for finite number of steps to obtain basic feasible solution i.e. no further improvement is possible.

Example 2.14 Use simplex method to maximize z = 5x1 + 4x2

subject to the constraints : 4x1 + 5x2 ≤ 10, 3x1 + 2x2 ≤ 9, 8x1 + 3x2 ≤ 12 and x1 , x2 ≥ 0.

Solution : Writing given LPP in standard form, we need to add slack variables s1, s2 and s3 in the constraints. Thus LPP is

Maximize z = 5x1 + 4x2 + 0s1+ 0s2 + 0s3

subject to the constraints : 4x1 + 5x2 + s1 = 10 3x1 + 2x2 + s2 = 9 8x1 + 3x2 + s3 = 12 and x1 , x2 , s1, s2, s3 ≥ 0.

Putting x1 = x2 = 0, we get first iteration as

cj 5 4 0 0 0 RR cB B xB x1 x2 s1 s2 s3

0 s1 10 4 5 1 0 0 10/4

0 s2 9 3 2 0 1 0 9/3

0 s3 12 8 3 0 0 1 12/8 → z 0 zj - cj -5

-4 0 0 0

Clearly, most negative zjcj corresponds to x1. So x1 will enter into the basis. The minimum replacement ratio corresponds to s3 so s3 will leave the basis. So key column corresponds to x1 and key row corresponds to s3. The leading (key) element is 8 which is other than 1 so divide all elements of key row by 8 and using elementary row transformations so that in key column entries of the first and second row are zero. The new iteration table is

cj 5 4 0 0 0 RR

cB B xB x1 x2 s1 s2 s3

0 s1 4 0 7/2 1 0 -1/2 8/7 →

0 s2 9/2 0 7/8 0 1 -3/8 36/7

5 x1 3/2 1 3/18 0 0 1/8 9

z 15/2 zj - cj 0 -17/8

0 0 5/8

Clearly, most negative zjcj corresponds to x2 so x2 will enter into the basis. The minimum replacement ratio corresponds to s1 so s1 will leave the basis. So key column corresponds to x2 and key row corresponds to s1. The leading (key) element is 7/2 which is other than 1 so divide all elements of key row by 2/7 and using elementary row transformations so that in key column entries of the second and third row are zero. The new iteration table is

cj 5 4 0 0 0 cB B xB x1 x2 s1 s2 s3

4 x2 8/7 0 1 1 0 -1/7

0 s2 7/2 0 0 0 1 -2/8

5 x1 15/14 1 0 0 0 5/28

z 139/14 zj - cj 0 0 17/28 0 9/28

Since all zjcj ≥ 0, the solution x1 = 15/14, x2 = 8/7 maximizes the z = 139/14.

Example 2.15 Maximize Z = 2x1 + 4x2, subject to 2x1 + 3x2 ≤ 48,

x1 + 3x2 ≤ 42, x1 + x2 ≤ 21, and x1, x2 ≥ 0

We will check the optimality here by evaluating NER as Cj-Zj. Also we will format the table in a different way so that the reader is accustomed to both the ways. We will make a continuous table in which all the iterations are taken care of.

Introducing the slack variables and entering the values in the simplex table we get,

Cj → 2 4 0 0 0

↓ Var→

Basis

x1 x2 s1 s2 s3 R.H.S R.R

0 s1 2 3 1 0 0 48 48/3=16

0 s2 1 3 0 1 0 42 14

0 s3 1 1 0 0 1 21 21

N.E.R

=Cj-Zj

2 4

0 0 0 Z = 0

0 s1 1 0 1 -1 0 6 6

4 x2 1/3 1 0 1/3 0 14 42

0 s3 2/3 0 0 -1/3 1 7 21/2

N.E.R

=Cj-Zj

2/3

0 0 -4/3 0 Z = 56

2 x1 1 0 1 -1 0 6

4 x2 0 1 -1/3 2/3 0 12

0 s3 0 0 -2/3 1/3 1 3

N.E.R

=Cj-Zj

0 0 -2/3 -2/3 0 Z = 60

As all NER (Cj-Zj) entries are ≤ 0, the optimality criteria is satisfied and the solution obtained is optimal.

Thus, the final solution is x1 = 6, x2 = 12 and Maximum Z = 60 Example 2.16 Minimize Z = x1 - 3x2 + 2x3

subject to 3x1 - x2 + 3x3 ≤ 7, -2x1 + 4x2 ≤ 12, -4x1 + 3x2 + 8x3 ≤ 10 and x1, x2 , x3 ≥ 0

This being a minimization problem with all constraints of ≤ type, we will first convert it into a maximization problem by multiplying the objective function Z with -1 and then maximizing the same.

i.e Maximize Z* = - Z = - x1 + 3x2 - 2x3

preparing the simplex table and solving,

Cj → -1 3 -2 0 0 0

↓ Var→

Basis

x1 x2 x3 s1 s2 s3 RHS R.R

0 s1 3 -1 3 1 0 0 7 -7

0 s2 -2 4 0 0 1 0 12 3

0 s3 -4 3 8 0 0 1 10 10/3

N.E.R

=Cj-Zj

-1 3 -2 0 0 0 Z*=0

0 s1 5/2 0 3 1 1/4 0 10 4 →

3 x2 -1/2 1 0 0 1/4 0 3 -6

0 s3 -5/2 0 8 0 -3/4 1 1 -2/5

N.E.R

=Cj-Zj

1/2 0 -2 0 -3/4 0 Z*=9

-1 x1 1 0 6/5 2/5 1/10 0 4

3 x2 0 1 3/5 1/5 3/10 0 5

0 s3 0 0 11 1 -1/2 1 11

N.E.R

=Cj-Zj

0 0 -13/5 -1/5 -8/10 0 Z*=11

As all NER (Cj-Zj) entries are ≤ 0, the optimality criteria is satisfied and the solution obtained is optimal.

The optimum value of the original objective function will be obtained by taking –Z*.

Thus, the final solution is x1 = 4, x2 = 5, x3 = 0 and Minimum Z = - Z* = -11.

Example 2.17 :Use simplex method to maximize z = 2x1 + 3x2

subject to the constraints : - x1 + 2x2 ≤ 4, x1 + x2 ≤ 6, x1 + 3x2 ≤ 9 and x1 , x2 unrestricted.

Solution : s1, s2, s3 are slack variables introduced in given three constraints. Since x1 and x2 are unrestricted, we introduce the non-negative variables x1′ ≥ 0, x1′′ ≥ 0 and x2′ ≥ 0, x22′′ ≥ 0 so that x1 = x1′ - x1′′ and x2 = x2′ - x2′′ .

cj 2 -2 3 -3 0 0 0 RR

cB B xB x1′ x1′′ x2′ x2′′ s1 s2 s3

0 s1 4 -1 1 2 -2 1 0 0 2 →

0 s2 6 1 -1 1 -1 0 1 0 6

0 s3 9 1 -1 3 -3 0 0 1 3

z 0 zj - cj -2 2 -3

3 0 0 0

x2′ enters into the basis and s1 leaves the basis. The iterative table is

cj 2 -2 3 -3 0 0 0 RR

cB B xB x1′ x1′′ x2′ x2′′ s1 s2 s3

3 x2′ 2 -1/2 ½ 1 -1 1/2 0 0 -

0 s2 4 3/2 -3/2 0 0 -1/2 1 0 8/3

0 s3 3 5/2 -5/2 0 0 -3/2 0 1 6/5 → z 6 zj - cj -7/2

7/2 0 0 3/2 0 0

x2′ enters into the basis and s3 leaves the basis. The iterative table is

cj 2 -2 3 -3 0 0 0 RR

cB B xB x1′ x1′′ x2′ x2′′ s1 s2 s3

3 x2′ 13/5 0 0 1 -1 1/5 0 1/5 65/5 0 s2 11/5 0 0 0 0 2/5 1 -3/5 55/10 → 2 x1′ 9/5 1 -1 0 0 -3/5 0 2/5 - z 51/5 zj - cj 0 0 0 0 -3/5

0 7/5

s1 enters into the basis and s2 leaves the basis. The iterative table is

cj 2 -2 3 -3 0 0 0 cB B xB x1′ x1′′ x2′ x2′′ s1 s2 s3

3 x2′ 3/2 0 0 1 -1 0 -1/2 ½

0 s1 11/2 0 0 0 0 1 5/2 -3/2

2 x1′ 9/2 1 -1 0 0 0 3/2 -1/2

z 27/2 zj - cj 0 0 0 0 0 3/2 ½

Since zj - cj are all non-negative, the optimum solution x1′ = 9/2 and x2′ = 3/2 with maximum z = 27/2 is obtained.

Therefore x1 = 9/2 – 0 = 9/2 and x2 = 3/2 – 0 = 3/2 is the required basic feasible solution.

Dokumen terkait