Anda di halaman 1dari 20

ANALYSE THE ANALYSE THE PROGRAM PROGRAM DECISION A PROGRAM/ SOLUTION DECISION A CODE/ENTER THE PROGRAM PROGRAM/ SOLUTION

TEST THE PROGRAM CODE/ENTER THE EVALUTE THE SOLUTION PROGRAM TEST THE PROGRAM PROBLEM: Optimization of problem through simplex algorithm. EVALUTE THE OBJECTIVE FUNCTION: - MAXIMIZE OR MINIMIZE Z= SOLUTION C1X1+C2X2+C3X3+C4X4+---------CONSTRAINTS: - D1X1+D2X2+-----------<=OR>=B1 E1X1+E2X2+-------------<= OR>=B2 --------------------------------------------ALGORITHM: STEP1 Write the problem in conical form (Using slack or surplus variables). N1 Z-C1X1-C2X2-C3X3-------------- +0S1+0S2+-----------=0(B) 0Z+D1X1+D2X2+-------------+1S1+0S2+-----------------=B1 0Z+E1X1+E2X2+--------------+0S1+1S2+------------------=B2 N2 ------------------------------------------------------------------Step2 Calculate the number of equation including objective function (say N1). Step3 calculate the number of variables including z (say N2). Step4 calculate the number of basic variables (say N3). N3=N1-1 N3

Step5 calculate the number of non basic variables (say N4) N4 N4=N2-N3

Step5 formation of equations 1. Enter the coefficient of basic variables S

For equation 1 coefficient S=0, 0, 0, 0, ------------For equation 2 coefficient S =1, 0, 0, 0, ----------For equation 3 coefficient S =0, 1, 0, 0---------2. Enter the coefficient of non basic variables For equation 1 coefficient X=1,-C1,-C2,-C3, ----For equation 2 coefficient X= D1, D2, D3, ---------For equation 3 coefficient X= E1, E2, E3, -------------3. Enter the value of constant For equation1 constant B=0 For equation2 constant B=B1 For equation3 constant B=B2 Step6 formation of basic simplex table B X

Basic variable s Z(1) S1(2) S2(3) S3(4) S4(5)

Z(1) 1 0 0 0 0

X1(2) -C1 D1 E1 F1 G1

X2(3) -C2 D2 E2 F2 G2

X3(4) -C3 D3 E3 F3 G3

S1(5) 0 1 0 0 0

S2(6) 0 0 1 0 0

S3(7) 0 0 0 1 0

S4(8) 0 0 0 0 1

B(9) 0 B1 B2 B3 B4

R(10)

R1 R2 R3 R4

Step7. Start GAUSS JORDAN OPERATION 1. Selection of entering variable column or pivot column - select most negative coefficient of equation 1(objective function) say , C2 so pivot column is X2 column 2. Define R - It is defined as ratio of constant B and corresponding pivot column coefficient, here R1=B1/D2, R2=B2/E2, R3=B3/F2, R4=B4/G2, 3. Select minimum non negative ratio(R), say Rm, consider Rm=R3 4. Selection of leaving variable row or pivot row row corresponding to Rm is called pivot row, here S3

5. Define pivot element It is intersection point of pivot column and pivot row. here F2 Step8. Preparation of 1st simplex table 1. Replace S3 (4) with X2(2) in table (only name for preparation of next table). 2. Calculate new pivot row for X2 = current pivot row i.e. S3/pivot element i.e. F2 = (0,F1,F2,F3,0,0,1,0,B3)/F2=(0/F2, F1/F2, F2/F2, F3/F2, 0/F2, 0/F2, 1/F2, 0/F2, B3/F2)= (P1,P2,P3,P4,P5,P6, P7, P8,P9) , say 3. Calculate new row for other rows = Current row-(corresponding pivot column coefficients)*(new pivot row, here P1,P2,P3,P4,P5,P6, P7, P8,P9) (except For pivot element corresponding row i.e. 4 th row) for 1st row (1, -C1, -C2, -C3, 0, 0, 0, 0, 0)-(-C2*( P1,P2,P3,P4,P5,P6, P7, P8,P9)) = (c1,c2,c3,c4,c5,c6,c7,c8,c9), for 2 nd row (0, D1, D2, D3, 1, 0, 0, 0, B1)-(D2*( P1,P2,P3,P4,P5,P6, P7, P8,P9)) = (d1,d2,d3,d4,d5,d6,d7,d8,d9), for 3rd row (0, E1, E2, E3, 0, 1, 0, 0, B2)-(E2*( P1,P2,P3,P4,P5,P6, P7, P8,P9)) = (e1,e2,e3,d4,e5,e6,e7,e8,e9), for 5th row (0, G1, G2, G3, 0, 0, 0, 1, B4)-(G2*( P1,P2,P3,P4,P5,P6, P7, P8,P9)) = (g1,g2,g3,g4,g5,g6,g7,g8,g9) Step9. Formation of 1st Simplex table
Basic variable s Z(1) S1(2) S2(3) X2(4) S4(5) Z(1) c1 d1 e1 P1 g1 X1(2) c2 d2 e2 P2 g2 X2(3) c3 d3 e3 P3 g3 X3(4) c4 d4 e4 P4 g4 S1(5) c5 d5 e5 P5 g5 S2(6) c6 d6 e6 P6 g6 S3(7) c7 d7 e7 P7 g7 S4(8) c8 d8 e8 P8 g8 B(9) c9 d9 e9 P9 g9 R(10)

R5 R6 R7 R8

Step.10 Back to step7, 8, 9, until negative coefficient of equation 1(objective function)=0 Step.11 Output - MAXIMIZE OR MINIMIZE Z=Z* For X1=X1*, X2=X2*, X3=X3*, X4=X4*

PROBLEM1: Optimization of problem through simplex algorithm.

OBJECTIVE FUNCTION: - MAXIMIZE OR MINIMIZE Z= 40X1+100X2 CONSTRAINTS: - 10X1+5X2<= 2500 4X1+10X2<= 2000 2X1+3X2<= 900 ALGORITHM: STEP1 Write the problem in conical form (Using slack or surplus variables). N1 Z-40X1-100X2+0S1+0S2+0S3=0 == = 0Z+10X1+5X2+1S1+0S2+0S3=2500 0Z+4X1+10X2+0S1+1S2+0S3=2000 0Z+2X1+3X2+0S1+0S2+1S3=900 Step2 Calculate the number of equation including objective function (say N1) =4 Step3 calculate the number of variables including z (say N2) =6 Step4 calculate the number of basic variables (say N3) =3 N3=N1-1 N3 N2

Step5 calculate the number of non basic variables (say N4) =3 N4 N4=N2-N3

Step5 formation of equations 4. Enter the coefficient of basic variables For equation 1 coefficient S=0, 0, 0. For equation 2 coefficient S =1, 0, 0. For equation 3 coefficient S =0, 1, 0. For equation 4 coefficient S =0, 0, 1. 5. Enter the coefficient of non basic variables For equation 1 coefficient X=1,-40,-100. For equation 2 coefficient X= 0, 10, 5. For equation 3 coefficient X=0, 4, 10. X S

For equation 4 coefficient X=0, 2, 3. 6. Enter the value of constant For equation1 constant B=0 For equation2 constant B=2500 For equation3 constant B=2000 For equation4constant B=900 Step6 formation of basic simplex table B

Basic variable s Z(1) S1(2) S2(3) S3(4)

Z(1) 1 0 0 0

X1(2) -40 10 4 2

X2(3) -100 5 10 3

S1(5) 0 1 0 0

S2(6) 0 0 1 0

S3(7) 0 0 0 1

B(9) 0 2500 2000 900

R(10)

R1 R2 R3

Step7. Start GAUSS JORDAN OPERATION 6. Selection of entering variable column or pivot column - select most negative coefficient of equation 1(objective function) = -100,so pivot column is X2(2) column 7. Define R - It is defined as ratio of constant B and corresponding pivot column coefficient, here 500, 200, 300. 8. Select minimum non negative ratio(R), say Rm, consider Rm=200 9. Selection of leaving variable row or pivot row row corresponding to Rm is called pivot row, here S2(3) 10.Define pivot element It is intersection point of pivot column and pivot row, here 10. Step8. Preparation of 1st simplex table 4. Replace S2 (3) with X2(2) in table (only name for preparation of next table). 5. Calculate new pivot row for X2 = current pivot row i.e. S2/pivot element i.e.10 = (0,4,10,0,1,0,2000)/10 = (0,0.4,1,0,0.1,0, 200). 6. Calculate new row for other rows = Current row-(corresponding pivot column coefficients)*(new pivot row) (except For pivot element)

For 1st row (1, -40, -100, 0, 0, 0, 0)-(-100*(0, 0.4, 1, 0, 0.1,0, 200)) = (1, 0, 0, 0, 10, 0, 20000), For 2nd row (0, 10, 5, 1, 0, 0, 2500)-(5*(0, 0.4, 1, 0, 0.1,0, 200)) = (0, 8, 0, 1, -0.5, 0, 1500), For 4throw (0, 2, 3, 0, 0, 1, 900)-(3*(0, 0.4, 1, 0, 0.1,0, 200)) = (0, 0.8, 0, 0, -0.3, 1, 300). Step9. Formation of 1st Simplex table
Basic variable s Z(1) S1(2) X2(3) S3(4) Z(1) 1 0 0 0 X1(2) 0 8 0.4 0.8 X2(3) 0 0 1 0 S1(5) 0 1 0 0 S2(6) 10 -0.5 0.1 -0.3 S3(7) 0 0 0 1 B(9) 20000 1500 200 300 R(10)

Step.10 negative coefficient in equation 1(objective function) =0 Step.11 Output - MAXIMIZE OR MINIMIZE Z=Z*=2000 For X1=X1*=0, X2=X2*=200.

PROBLEM2: Optimization of problem through simplex algorithm. OBJECTIVE FUNCTION: - MAXIMIZE Z= -2X1+-3X2+-2X3+1X4+-1X5. CONSTRAINTS: - 3X1+-3X2+4X3+2X4+-1X5=0. 1X1+1X2+1X3+3X4+1X5=2.

ALGORITHM: STEP1 Write the problem in conical form (Using slack or surplus variables). N1 Z+2X1+3X2+2X3+-1X4+X5=0 0Z+3X1+-3X2+4X3+2X4+-1X5+0S1+0S2=0 0Z+1X1+1X2+1X3+3X4+1X5+0S1+0S2=2 N2

Step2 Calculate the number of equation including objective function (say N1) =3. Step3 calculate the number of variables including z (say N2) =8. Step4 calculate the number of basic variables (say N3). N3=N1-1=2 N3

Step5 calculate the number of non basic variables (say N4) N4 N4=N2-N3=5

Step5 formation of equations 7. Enter the coefficient of basic variables For equation 1 coefficient S=0, 0. For equation 2 coefficient S =0, 0. For equation 3 coefficient S =0, 0. 8. Enter the coefficient of non basic variables For equation 1 coefficient X=1, 2, 3, 2,-1, 1. For equation 2 coefficient X= 0, 3, -3, 4, 2, -1. For equation 3 coefficient X= 0, 1, 1, 1, 3, 1. 9. Enter the value of constant For equation1 constant B=0 For equation2 constant B=0 For equation3 constant B=2 Step6 formation of basic simplex table B X S

Basic variable s Z(1) S1(2) S2(3)

Z(1) 1 0 0

X1(2) 2 3 1

X2(3) 3 -3 1

X3(4) 2 4 1

X4(5) -1 2 3

X5(6) 1 -1 1

S1(7) 0 0 0

S2(8) 0 0 0

B(9) 0 0 2

R(10)

0 0.67

Step7. Start GAUSS JORDAN OPERATION 11.Selection of entering variable column or pivot column - select most negative coefficient of equation 1(objective function) = X4(5)=-1 12.Define R - It is defined as ratio of constant B and corresponding pivot column coefficient, here 0, 0.67. 13.Select minimum non negative ratio(R), say Rm, consider Rm=0.67. 14.Selection of leaving variable row or pivot row row corresponding to Rm is called pivot row, here S2(3) 15.Define pivot element It is intersection point of pivot column and pivot row=3 Step8. Preparation of 1st simplex table 7. Replace S2 (3) with X4(5) in table (only name for preparation of next table). 8. Calculate new pivot row for X2 = current pivot row /pivot element = (0, 1, 1, 1, 3, 1, 0, 0, 2)/3= (0, 0.33, 0.33, 0.33, 1, 0.33, 0, 0, 0.67). 9. Calculate new row for other rows = Current row-(corresponding pivot column coefficients)*(new pivot row) (except For pivot element corresponding row) For 1st row (1, 2, 3, 2, -1, 1, 0, 0, 0)-(-1*(0, 0.33, 0.33, 0.33, 1, 0.33, 0, 0, 0.67)) = (1, 2.33, 3.33, 2.33, 0, 1.33, 0, 0, 0.67), For 2nd row (0, 3, -3, 4, 2, -1, 0, 0, 0)-(2*(0, 0.33, 0.33, 0.33, 1, 0.33, 0, 0, 0.67)) = (0, 2.33, 3.67, 3.33, 0, -1.67, 0, 0, -1.33), Step9. Formation of 1st Simplex table
Basic variable s Z(1) S2(2) S2(3) Z(1) 1 0 0 X1(2) 2.33 2.33 -3.5 X2(3) 3.33 3.67 5.5 X3(4) 2.33 3.33 -5 X4(5) 0 0 0 X5(6) 1.33 -1.67 2.5 S1(7) 0 0 0 S2(8) 0 0 0 B(9) 0.67 -1.33 0.67 R(10)

Step.10 Back to step7, 8, 9, until negative coefficient of equation 1(objective function)=0 Step.11 Output - MAXIMIZE OR MINIMIZE Z=Z* For X1=X1*, X2=X2*, X3=X3*, X4=X4*

PROBLEM3: Optimization of problem through simplex algorithm. OBJECTIVE FUNCTION: - MAXIMIZE Z= 3X1+2X2. CONSTRAINTS: 1X1+-1X2 <= 1

3X1+-2X2<= 6

ALGORITHM: STEP1 Write the problem in conical form (Using slack or surplus variables). N1 Z-3X1-2X2 =0 1X1+-1X2+1S1+0S2 = 1 3X1+-2X2+1S1+0S2=6 N2

Step2 Calculate the number of equation including objective function (say N1) =3 Step3 calculate the number of variables including z (say N2) = 5 Step4 calculate the number of basic variables (say N3), N3=N1-1=2 N3

Step5 calculate the number of non basic variables (say N4), N4 N4=N2-N3=3

Step5 formation of equations 10.Enter the coefficient of basic variables For equation 1 coefficient S=0, 0. For equation 2 coefficient S =1, 0. For equation 3 coefficient S =0, 1. 11.Enter the coefficient of non basic variables For equation 1 coefficient X=1,-3,-2. X S

For equation 2 coefficient X=0, 1, -1. For equation 3 coefficient X=0, 3,-2. 12.Enter the value of constant For equation1 constant B=0 For equation2 constant B=1 For equation3 constant B=6 Step6 formation of basic simplex table B

Basic variable s Z(1) S1(2) S2(3)

Z(1) 1 0 0

X1(2) -3 1 3

X2(3) -2 -1 -2

S1(5) 0 1 0

S2(6) 0 0 1

B(9) 0 1 6

R(10)

1 2

Step7. Start GAUSS JORDAN OPERATION 16.Selection of entering variable column or pivot column - select most negative coefficient of equation 1(objective function) = X1(2) =-3. 17.Define R - It is defined as ratio of constant B and corresponding pivot column coefficient, here1, 2. 18.Select minimum non negative ratio(R), say Rm, consider Rm=1 19.Selection of leaving variable row or pivot row row corresponding to Rm is called pivot row, here S1(2) 20.Define pivot element It is intersection point of pivot column and pivot row. here 1

Step8. Preparation of 1st simplex table 10.Replace S1 (2) with X1(2) in table (only name for preparation of next table). 11.Calculate new pivot row for X2 = current pivot row /pivot element = (0,1,1,1,0,1)/1=(0,1,-1,1,0,1)

12.Calculate new row for other rows = Current row-(corresponding pivot column coefficients)*(new pivot row) (except For pivot element corresponding row ) For 1st row (1, -3, -2, 0, 0, 0)-(-3*(0, 1,-1, 1, 0, 1)) = (1, 0, -5, 3, 0, 3), For 3rd row (0, 3, -2, 0, 1, 6)-(3*(0, 1,-1, 1, 0, 1)) = (0, 0, 1,-3, 1, 3),

Step9. Formation of 1st Simplex table


Basic variable s Z(1) S1(2) S2(3) Z(1) 1 0 0 X1(2) 0 1 0 X2(3) -5 -1 1 S1(5) 3 1 -3 S2(6) 0 0 1 B(9) 3 1 3 R(10)

-1 3

Step.10 Start GAUSS JORDAN OPERATION 21.Selection of entering variable column or pivot column - select most negative coefficient of equation 1(objective function) = X2(3) =-5. 22.Define R - It is defined as ratio of constant B and corresponding pivot column coefficient, here -1, 3. 23.Select minimum non negative ratio(R), say Rm, consider Rm=3 24.Selection of leaving variable row or pivot row row corresponding to Rm is called pivot row, here S2(3) 25.Define pivot element It is intersection point of pivot column and pivot row. here 1

Step11. Preparation of 2nd simplex table 13.Replace S2 (3) with X2(3) in table (only name for preparation of next table). 14.Calculate new pivot row for X2 = current pivot row /pivot element = (0,0,1,3,1,3)/1=(0,0,1,-3,1,3) 15.Calculate new row for other rows = Current row-(corresponding pivot column coefficients)*(new pivot row) (except For pivot element corresponding row)

For 1st row (1, 0, -5, 3, 0, 3)-(-5*(0, 0, 1, -3, 1, 3)) = (1, 0, 0, -12, 5, 18), For 2nd row (0, 1, -1, 1, 0, 1)-(-1*(0, 0, 1,-3, 1, 3)) = (0, 1, 0,-2, 1, 4),

Basic variable s Z(1) S1(2) S2(3)

Z(1) 1 0 0

X1(2) 0 1 0

X2(3) 0 0 1

S1(5) -12 -2 -3

S2(6) 5 1 1

B(9) 18 4 3

R(10)

Step.12 negative coefficient of equation 1(objective function) =0 Step.11 Output - MAXIMIZE =Z*=18. For X1=X1*=4, X2=X2*=3.

PROBLEM4: Optimization of problem through simplex algorithm. OBJECTIVE FUNCTION: - MAXIMIZE Z= -4X1+-1X2. CONSTRAINTS: - 3X1+1X2= 3 4X1+3X2 >=6 1X1+2X2 <=4

ALGORITHM: STEP1 Write the problem in conical form (Using slack or surplus variables). N1 Z+4X1+1X2 =0 0Z+3X1+1X2-+0S1+0S2+0S3=3 0Z+4X1+3X2+1S1+0S2+0S3=6 0Z+1X1+2X2+0S1+1S2+0S3=4 Step2 Calculate the number of equation including objective function (say N1) =4. N2

Step3 calculate the number of variables including z (say N2) =5. Step4 calculate the number of basic variables (say N3) =2. N3 Step5 calculate the number of non basic variables (say N4) N4 N4=N2-N3=3

Step5 formation of equations 13.Enter the coefficient of basic variables For equation 1 coefficient S=0, 0. For equation 2 coefficient S =0, 0. For equation 3 coefficient S =1, 0. For equation 4 coefficient S =0, 1. Enter the coefficient of non basic variables For equation 1 coefficient X=1, 4, 1. For equation 2 coefficient X= 0, 3, 1. For equation 3 coefficient X= 0, 4, 3. For equation 4 coefficient X= 0, 1, 2. X S

14.Enter the value of constant For equation1 constant B=0 For equation2 constant B=3 For equation3 constant B=6 For equation4 constant B=4 B

Step6 formation of basic simplex table

Basic variable

Z(1)

X1(2)

X2(3)

S1(5)

S2(6)

S3(6)

B(9)

R(10)

s Z(1) S1(2) S2(3) S3(4)

1 0 0 0

4 3 4 1

1 1 3 2

0 0 1 0

0 0 0 1

0 0 0 0

0 3 6 4

R1 R2 R3

Step7. Start GAUSS JORDAN OPERATION 26.Selection of entering variable column or pivot column - select most negative coefficient of equation 1(objective function) say , C2 so pivot column is X2 column 27.Define R - It is defined as ratio of constant B and corresponding pivot column coefficient, here R1=B1/D2, R2=B2/E2, R3=B3/F2, R4=B4/G2, 28.Select minimum non negative ratio(R), say Rm, consider Rm=R3 29.Selection of leaving variable row or pivot row row corresponding to Rm is called pivot row, here S3 30.Define pivot element It is intersection point of pivot column and pivot row. here F2 Step8. Preparation of 1st simplex table 16.Replace S3 (4) with X2(2) in table (only name for preparation of next table). 17.Calculate new pivot row for X2 = current pivot row i.e. S3/pivot element i.e. F2 = (0,F1,F2,F3,0,0,1,0,B3)/F2=(0/F2, F1/F2, F2/F2, F3/F2, 0/F2, 0/F2, 1/F2, 0/F2, B3/F2)= (P1,P2,P3,P4,P5,P6, P7, P8,P9) , say 18.Calculate new row for other rows = Current row-(corresponding pivot column coefficients)*(new pivot row, here P1,P2,P3,P4,P5,P6, P7, P8,P9) (except For pivot element corresponding row i.e. 4 th row) for 1st row (1, -C1, -C2, -C3, 0, 0, 0, 0, 0)-(-C2*( P1,P2,P3,P4,P5,P6, P7, P8,P9)) = (c1,c2,c3,c4,c5,c6,c7,c8,c9), for 2 nd row (0, D1, D2, D3, 1, 0, 0, 0, B1)-(D2*( P1,P2,P3,P4,P5,P6, P7, P8,P9)) = (d1,d2,d3,d4,d5,d6,d7,d8,d9), for 3rd row (0, E1, E2, E3, 0, 1, 0, 0, B2)-(E2*( P1,P2,P3,P4,P5,P6, P7, P8,P9)) = (e1,e2,e3,d4,e5,e6,e7,e8,e9), for 5th row (0, G1, G2, G3, 0, 0, 0, 1, B4)-(G2*( P1,P2,P3,P4,P5,P6, P7, P8,P9)) = (g1,g2,g3,g4,g5,g6,g7,g8,g9) Step9. Formation of 1st Simplex table
Basic variable s Z(1) S1(2) Z(1) c1 d1 X1(2) c2 d2 X2(3) c3 d3 X3(4) c4 d4 S1(5) c5 d5 S2(6) c6 d6 S3(7) c7 d7 S4(8) c8 d8 B(9) c9 d9 R(10)

R5

S2(3) X2(4) S4(5)

e1 P1 g1

e2 P2 g2

e3 P3 g3

e4 P4 g4

e5 P5 g5

e6 P6 g6

e7 P7 g7

e8 P8 g8

e9 P9 g9

R6 R7 R8

Step.10 Back to step7, 8, 9, until negative coefficient of equation 1(objective function)=0 Step.11 Output - MAXIMIZE OR MINIMIZE Z=Z* For X1=X1*, X2=X2*, X3=X3*, X4=X4*

PROBLEM5: Optimization of problem through simplex algorithm. OBJECTIVE FUNCTION: - MAXIMIZE Z= 3X1+9X2 CONSTRAINTS: - 1X1+4X2<=8 1X1+2X2<= 4

ALGORITHM: STEP1 Write the problem in conical form (Using slack or surplus variables). N1 Z-3X1-9X2+ 0S1+0S2=0. 0Z+1X1+4X2+1S1+0S2=8. 0Z+1X1+2X2+0S1+1S2=4. N2

Step2 Calculate the number of equation including objective function (say N1) = 3. Step3 calculate the number of variables including z (say N2)=5. Step4 calculate the number of basic variables (say N3). N3=N1-1=2 N3

Step5 calculate the number of non basic variables (say N4) = 3 N4 N4=N2-N3=3

Step5 formation of equations 15.Enter the coefficient of basic variables S

For equation 1 coefficient S=0, 0. For equation 2 coefficient S =1, 0. For equation 3 coefficient S =0, 1. 16.Enter the coefficient of non basic variables For equation 1 coefficient X=1,-3,-9. For equation 2 coefficient X= 0, 1, 4. For equation 3 coefficient X= 0, 1, 2. Enter the value of constant For equation1 constant B=0 For equation2 constant B=8 For equation3 constant B=4 Step6 formation of basic simplex table B X

Basic variable s Z(1) S1(2) S2(3)

Z(1) 1 0 0

X1(2) -3 1 1

X2(3) -9 4 2

S1(5) 0 1 0

S2(6) 0 0 1

B(9) 0 8 4

R(10)

2 2

Step7. Start GAUSS JORDAN OPERATION 31.Selection of entering variable column or pivot column - select most negative coefficient of equation 1(objective function) = X2(3) = -9. 32.Define R - It is defined as ratio of constant B and corresponding pivot column coefficient, here 2, 2. 33.Select minimum non negative ratio(R), say Rm, consider Rm=2 34.Selection of leaving variable row or pivot row row corresponding to Rm is called pivot row, here S1 or S2, here take S2 35.Define pivot element It is intersection point of pivot column and pivot row = 2 Step8. Preparation of 1st simplex table

19.Replace S2 (3) with X2(3) in table (only name for preparation of next table). 20.Calculate new pivot row for X2 = current pivot row /pivot element = (0, 1, 2, 0, 1, 4)/2= (0, 0.5, 1, 0, 0.5, 2). 21.Calculate new row for other rows = Current row-(corresponding pivot column coefficients)*(new pivot row) (except For pivot element corresponding row) For 1st row (1, -3, -9, 0, 0, 0)-(-9*(0, 0.5, 1, 0, 0.5, 2)) = (1, 1.5, 0, 0, 4.5, 18), for 2nd row (0, 1, 4, 1, 0, 8)-(4*( 0, 0.5, 1, 0, 0.5, 2)) = (0,-1, 0, 1, -2, 0),. Step9. Formation of 1st Simplex table
Basic variable s Z(1) S1(2) X2(3) Z(1) 1 0 0 X1(2) 1.5 -1 0.5 X2(3) 0 0 1 S1(5) 0 1 0 S2(6) 4.5 -2 0.5 B(9) 18 0 2 R(10)

Step.10 negative coefficient of equation 1(objective function)=0 Step.11 Output - MAXIMIZE Z=Z*=18 For X1=X1*=0, X2=X2*=2.

PROBLEM6: Optimization of problem through simplex algorithm. OBJECTIVE FUNCTION: - MAXIMIZE = 1X1+2X2+1X3. CONSTRAINTS: - 2X1+1X2-1X3<= 2. 2X1-1X2+5X3<= 6. 4X1+1X2+1X3<= 6.

ALGORITHM: STEP1 Write the problem in conical form (Using slack or surplus variables). N1 Z-1X1-2X2-1X3+0S1+0S2+0S3=0. 0Z+2X1+1X2-1X3+1S1+0S2+0S3=2 0Z+2X1-1X2+5X3+0S1+1S2+0S3=6 0Z+4X1+1X2+1X3+0S1+0S2+1S3=6 Step2 Calculate the number of equation including objective function (say N1) =4. Step3 calculate the number of variables including z (say N2) =7. Step4 calculate the number of basic variables (say N3). N3=N1-1=3 N3 N2

Step5 calculate the number of non basic variables (say N4) N4 N4=N2-N3=4

Step5 formation of equations 17.Enter the coefficient of basic variables For equation 1 coefficient S=0, 0, 0. For equation 2 coefficient S =1, 0, 0. For equation 3 coefficient S =0, 1, 0. For equation 4 coefficient S =0, 0, 1. S

18.Enter the coefficient of non basic variables For equation 1 coefficient X=1,-1,-2,-1. For equation 2 coefficient X= 0, 2, 1, -1. For equation 3 coefficient X= 0, 2, -1, 5. For equation 4 coefficient X= 0, 4, 1, 1. 19.Enter the value of constant For equation1 constant B=0. B X

For equation2 constant B=2. For equation3 constant B=6. For equation4 constant B=6. Step6 formation of basic simplex table

Basic variable s Z(1) S1(2) S2(3) S3(4)

Z(1) 1 0 0 0

X1(2) -1 2 2 4

X2(3) -2 1 -1 1

X3(4) -1 -1 5 1

S1(5) 0 1 0 0

S2(6) 0 0 1 0

S3(7) 0 0 0 1

B(8) 0 2 6 6

R(9)

2 -6 6

Step7. Start GAUSS JORDAN OPERATION 36.Selection of entering variable column or pivot column - select most negative coefficient of equation 1(objective function)=X2(3)=-2 . 37.Define R - It is defined as ratio of constant B and corresponding pivot column coefficient, here 2, -6, 6. 38.Select minimum non negative ratio(R), say Rm, consider Rm=2. 39.Selection of leaving variable row or pivot row row corresponding to Rm is called pivot row, here S1 (2). 40.Define pivot element It is intersection point of pivot column and pivot row=1 Step8. Preparation of 1st simplex table 22.Replace S1 (2) with X2(3) in table (only name for preparation of next table). 23.Calculate new pivot row for X2 = current pivot row /pivot element = (0, 2, 1, -1 , 5, 0, 1, 0, 6)/1= (P1,P2,P3,P4,P5,P6, P7, P8,P9) 24.Calculate new row for other rows = Current row-(corresponding pivot column coefficients)*(new pivot row, here P1,P2,P3,P4,P5,P6, P7, P8,P9) (except For pivot element corresponding row i.e. 4 th row) for 1st row (1, -C1, -C2, -C3, 0, 0, 0, 0, 0)-(-C2*( P1,P2,P3,P4,P5,P6, P7, P8,P9)) = (c1,c2,c3,c4,c5,c6,c7,c8,c9), for 2 nd row (0, D1, D2, D3, 1, 0, 0, 0, B1)-(D2*( P1,P2,P3,P4,P5,P6, P7, P8,P9)) = (d1,d2,d3,d4,d5,d6,d7,d8,d9), for 3rd row (0, E1, E2, E3, 0, 1, 0, 0, B2)-(E2*( P1,P2,P3,P4,P5,P6, P7, P8,P9)) =

(e1,e2,e3,d4,e5,e6,e7,e8,e9), for 5th row (0, G1, G2, G3, 0, 0, 0, 1, B4)-(G2*( P1,P2,P3,P4,P5,P6, P7, P8,P9)) = (g1,g2,g3,g4,g5,g6,g7,g8,g9) Step9. Formation of 1st Simplex table
Basic variable s Z(1) S1(2) S2(3) X2(4) S4(5) Z(1) c1 d1 e1 P1 g1 X1(2) c2 d2 e2 P2 g2 X2(3) c3 d3 e3 P3 g3 X3(4) c4 d4 e4 P4 g4 S1(5) c5 d5 e5 P5 g5 S2(6) c6 d6 e6 P6 g6 S3(7) c7 d7 e7 P7 g7 S4(8) c8 d8 e8 P8 g8 B(9) c9 d9 e9 P9 g9 R(10)

R5 R6 R7 R8

Step.10 Back to step7, 8, 9, until negative coefficient of equation 1(objective function)=0 Step.11 Output - MAXIMIZE OR MINIMIZE Z=Z* For X1=X1*, X2=X2*, X3=X3*, X4=X4*

Anda mungkin juga menyukai