Presentation is loading. Please wait.

Presentation is loading. Please wait.

Assignment (6) Simplex Method for solving LP problems with two variables.

Similar presentations


Presentation on theme: "Assignment (6) Simplex Method for solving LP problems with two variables."— Presentation transcript:

1 Assignment (6) Simplex Method for solving LP problems with two variables

2 1- Introduction  Graphical method presented in last chapter is fine for 2 variables. But most LP problems are too complex for simple graphical procedures.  The Simplex Method: ois appropriate for problems with more than 2 variables; ouses algebra rules, to find optimal solutions; ois an algorithm and is a series of steps that will accomplish a certain task.  In this chapter will introduce the simplex method for problems with 2 variables.

3 2- Simplex algorithm through an example: Assume one company producing flair furniture: Tables (T) and Chairs (C). The following table provides the information available: Department ProductionAvailable Working Hours TablesChairs Carpentry43240 Painting & varnishing 21100 Profit7SR5SR

4 Formulation: Decision variables: T = Number of tables C = Number of chairs Objective function: Maximize Z = 7T + 5C Constraints: 2T + 1C  100 (Painting & varnishing) 4T + 3C  240 (Carpentry) T, C  0 (non-negativity constraints)

5 Graphical method solution Number of Chairs 100 80 60 40 20 020406080100 T C Number of Tables Feasible Region  4T + 3C  2T + 1C   Optimal Solution: T=30, C=40 Z= 410 SR

6 1 st Step: 1 st Step: Built initial Simplex tableau  Less-than-or-equal-to constraints (≤) are converted to equations by adding a variable called “slack variable”. oSlack variables represent unused resources.  For the flair furniture problem, define the slacks as: oS 1 = unused hours in the painting department oS 2 = unused hours in the carpentry department  The constraints are now written as: o2T + 1C + S 1 = 100 o4T + 3C + S 2 = 240

7  Slack variables not appearing in an equation are added with a coefficient of 0.This allows all the variables to be monitored at all times.  The final Simplex equations appear as: o2T + 1C + 1S 1 + 0S 2 = 100 o4T + 3C + 0S 1 + 1S 2 = 240 oT, C, S 1, S 2  0  The slacks are added to the objective coefficient with 0 profit coefficients. The objective function, then, is: Min. Z= -7T - 5C + 0S 1 + 0S 2 1 st Step, continued

8 Initial Simplex tableau TCS1S2Quantity (Q) S12110100 S24301240 Z-7-5000 We start by a basic solution Z=0. Non-Basic variables Basic variables

9 2 nd Step: 2 nd Step: Entering variable Choose one entering variable from non-basic variables (T or C) for which we have the largest negative coefficient in the objective function. Here the entering variable will be T and the corresponding column is called pivot column. TCS1S2Quantity (Q) S12110100 S24301240 Z-7-5000 Pivot column

10 3 rd Step: 3 rd Step: Leaving variable Choose one leaving variable from the basic variables (S1 or S2) for which we have the smallest value of quantities (Q) divided by items of pivot column: for S1 we have 100/2=50 for S2 we have 240/4=80 Then the leaving variable will be S1 and the corresponding row is called pivot row.

11 3 rd Step: 3 rd Step: Leaving variable TCS1S2(Q) S12110 100 S24301 240 Z-7-500 0 Pivot column Pivot row Pivot item

12 4 th Step: 4 th Step: Pivoting The pivoting is the changing of simplex tableau values as follow:  The entering variable (T) takes the place of leaving variable (S1).  All items of pivot column are =0 except pivot item =1.  All items of pivot row are divided by pivot item.  Other items of the tableau are calculated as follow: AB CD Pivot column Pivot row New A = A – B*C/D

13 4 th Step: 4 th Step: Pivoting The New value of the objective function is calculated as follow: Capacity of pivot row Z’ = Z + Largest coefficient * Pivot item If all coefficients of objective function are negatives or equal to zero the optimal solution is found. Otherwise go to step2.

14 4 th Step: 4 th Step: Pivoting TCS1S2Q S12110 100 S24301 240 Z -7-500 0 Pivot column Pivot row Pivot item Pivoting

15 4 th Step: 4 th Step: Pivoting TCS1S2Q T11/2 0 50 S201-21 40 Z0-3/2+7/20 350

16 2 nd Step: 2 nd Step: Entering variable The new largest negative coefficient in the objective function is -3/2 then the entering variable will be C. 3 rd Step: 3 rd Step: Leaving variable The new smallest value of quantities (Q) divided by items of pivot column is 40/1=40 then the leaving variable will be S2.

17 4 th Step: 4 th Step: Pivoting TCS1S2Q T11/2 0 50 S201-21 40 Z0-3/2+7/20 350 Pivot column Pivot row Pivot item

18 4 th Step: 4 th Step: Pivoting TCS1S2Q T103/2-1/2 30 C01-21 40 Z001/23/2 410 All coefficients of objective function are now equal to zero. then the optimal solution is found: T=30, C=40 ; Z=410


Download ppt "Assignment (6) Simplex Method for solving LP problems with two variables."

Similar presentations


Ads by Google