Download presentation
2
LINEAR PROGRAMMING SIMPLEX METHOD
3 LINEAR PROGRAMMING SIMPLEX METHOD CHAPTER
3
Learning Objectives Convert LP constraints to equalities with slack, surplus, and artificial variables. Set up and solve both maximization and minimization LP problems with simplex tableaus. Interpret the meaning of every number in a simplex tableau.
4
Crisis at Bhilpur Type A Vehicle Type B Vehicle Total Available
(a) Carrying Capacity 2 Tons 3 Tons - (b) Diesel Required 100 Litres 200 Litres 4000 Litres (c) Drivers Required 1 30 (d) Numbers Available 26 15
5
Crisis at Bhilpur Convert inequalities to equalities by adding slack variables
6
Crisis at Bhilpur The problem can be formulated as:
7
Initial Tableau Basic Variables Cj 2 3 Qty A B 100 200 1 4000 30 26 15
8
Identify incoming variable (maximum positive value in
row). This is key column. Replacement ratio (RR) = Qty/key column. Outgoing row is row with minimum positive RR and key number is intersection of key column and key row. Basic Variables Cj 2 1 100 A 3 200 B 15 26 30 4000 Qty ∞ 20 RR Incoming variable Outgoing Variable Key number
9
Carry out pivot operations New incoming row = Key row/Key number
New row element = Old row element – (old row element in key column X corresponding element in replaced row) Basic Variables 3 Cj 2 1 100 A B -3 -1 -200 45 15 26 1000 Qty RR Second Tableau
10
Identify incoming variable (maximum positive value in row), outgoing row (row with minimum positive replacement ratio) and identify key number. Incoming variable Outgoing Variable Basic Variables 3 Cj 2 1 100 A B -3 -1 -200 45 15 26 1000 Qty ∞ 10 RR Key number
11
Again carry out pivot operations.
New incoming row = Key row (outgoing row)/Key number New row element = Old row element – (old row element in key column X corresponding element in replaced row) A Basic Variables 3 2 Cj 1 B -0.02 0.02 -0.01 0.01 -1 -2 65 15 16 5 10 Qty RR
12
Identify incoming variable (maximum positive value in row), outgoing row (row with minimum positive replacement ratio) and identify key number. Key Number A Basic Variables 3 2 Cj 1 B -0.02 0.02 -0.01 0.01 -1 -2 65 15 16 5 10 Qty 8 - RR Outgoing Variable Incoming Variable
13
Again carry out pivot operations.
New incoming row = Key row (outgoing row)/Key number New row element = Old row element – (old row element in key column X corresponding element in replaced row) A Basic Variables 3 2 Cj 1 B -0.01 0.01 - 0.01 -1 -2 70 10 6 5 20 Qty RR
14
Mr. Confused Singh should use:
Since all values in the row are now negative, no further improvement is possible. The optimal solution has been reached. Mr. Confused Singh should use: 20 Type A Vehicles and 10 Type B Vehicles Maximum Coal sent 70 tons
15
Simplex Steps For Maximisation
1. Choose the variable with the greatest positive value to enter the solution. 2. Determine the row to be replaced by selecting the one with the smallest (non-negative) replacement ratio. 3. Calculate the new values for the key row. 4. Calculate the new values for the other row(s). 5. Calculate the and values for this tableau. If there are any values greater than zero, return to Step 1.
16
Minimisation Case (Big M Method)
Vitamins Food Daily Requirement V 2 4 40 W 3 50 Cost per unit Rs 3 Rs 2.50
17
Minimisation Case The problem can be formulated as:
18
Surplus And Artificial Variables
Convert inequalities to equations denotes the quantity of Vitamin V more than 40 units that the mix of foods may produce. It is called a surplus variable. If initially we buy no food, then - 40 units of Vitamin V cannot exist. The problem is overcome by introducing an artificial variable ,which can be viewed as a substitute for Vitamin V. Since should not appear in the solution, its cost is taken as very high (M or 1 million). The equation is written as
19
Surplus And Artificial Variables
The model can now be written as
20
B.V 3 2.5 M Qty RR A B 2 4 -1 1 40 10 50 25 Initial Simplex Tableau
Identify incoming variable (greatest negative value in row) Identify outgoing variable (least positive RR value) Identify key number Key number B.V 3 2.5 M Qty RR A B 2 4 -1 1 40 10 50 25 5M 6M -M 90M 3-5M 2.5-6M Outgoing variable Incoming variable
21
Carry out pivot operations in same manner as for a maximisation case
Identify new incoming and outgoing variables Key number B.V 3 2.5 M Qty RR A B 0.5 1 -0.25 0.25 10 20 2 -1 -0.5 30 15 1.5+2M -0.625 +0.5M -M 0.625 -0.5M 25+ 30M 1.75-2M +1.5M Incoming variable Outgoing variable
22
Carry out pivot operations
As there is no negative value in the row, optimal solution has been reached. Buy 15 units of Food A and 2.5 units of Food B. B.V 3 2.5 M Qty A B 1 -0.375 0.25 0.375 -0.25 -0.5 0.5 15 -0.875 0.1875 0.875 51.25 M – M –
23
Minimisation Case (Two Phase Method)
Formulate model Convert inequalities into equations Let the contribution of artificial variables to the objective function be 1 Assume the contribution of all other variables (decision and surplus) to be zero Solve for minimisation. This is solution for Phase 1.
24
Minimisation Case (Two Phase Method)
For Phase 2, start with the solution of Phase 1. Omit artificial variable columns. Restore contribution values of decision variables. Recalculate row. If all values are positive, an optimal solution has been reached, else continue pivot operations as for minimisation till optimal solution is reached.
25
Minimisation Case (Two Phase Method)
Consider the same problem. The model is
26
B.V 1 Qty RR A B 2 4 -1 40 10 3 50 25 Phase 1. Initial Tableau. 5 6 90
Identify incoming variable (greatest negative value in row) Identify outgoing variable (least positive RR value) Identify key number Key number B.V 1 Qty RR A B 2 4 -1 40 10 3 50 25 5 6 90 -5 -6 Outgoing variable Incoming variable
27
Carry out pivot operations in same manner as for a maximisation case
Identify new incoming and outgoing variables Key number B.V 1 Qty RR A B 0.5 -0.25 0.25 10 20 2 -1 -0.5 30 15 -2 Incoming variable Outgoing variable
28
Carry out pivot operations in same manner as for a maximisation case
As there are no negative values in the row, the solution to Phase 1has been achieved. B.V 1 Qty A B -0.375 0.25 0.375 -0.25 2.5 -0.5 0.5 15
29
Set up Phase 1 solution as the initial solution for Phase 2.
As all values in row are positive, optimal solution has been reached. It is the same as for the Big M Method B.V. 3 2.5 Qty A B 1 -0.375 0.25 -0.5 15 2 -0.875 51.25 0.1875 0.875
30
Shadow Prices Shadow Price: Contribution of one unit of a scarce resource to the objective function Found in Final Simplex Tableau in Row Value in Slack Variable Column Consider the Maximisation problem final simlex tableau
31
A Basic Variables 3 2 Cj 1 B -0.01 0.01 - 0.01 -1 -2 70 10 6 5 20 Qty RR S1 has a value of This implies that for every additional litre of diesel, an additional 0.01 tons of coal can be carried. S2 has a value of For every additional driver, 1 ton of coal can be carried.
32
Consider the minimisation problem.
B.V. 3 2.5 Qty A B 1 -0.375 0.25 -0.5 15 2 -0.875 51.25 0.1875 0.875 Every additional unit of Vitamin V will increase the cost by Rs and every additional unit of Vitamin W will increase the cost by Rs 0.875
33
Primal and Dual A problem may be viewed as a maximisation or as a minimisation problem. We can maximise output for given resources or minimise resources for given output. This is the concept of primal and dual.
34
Steps to form the Dual If the primal is maximisation, the dual is minimisation, and vice versa. The right-hand-side values of the primal constraints become the objective coefficients of the dual. The primal objective function coefficients become the right-hand-side of the dual constraints. The transpose of the primal constraint coefficients become the dual constraint coefficients. Constraint inequality signs are reversed
35
Primal and Dual Primal Dual
36
Comparison Primal and Dual Final Tableaus
B.V. 3 2.5 Qty A B 1 -0.375 0.25 -0.5 15 2 -0.875 51.25 0.1875 0.875 B.V. 40 50 Qty X Y 1 0.5 -0.25 0.875 0.375 0.1875 15 2.5 51.25 -15 -2.5
37
Sensitivity Analysis It is a ‘What if?’ analysis. It analyses what would happen if some changes were made. It analyses one factor at a time. Changes in objective function coefficients Changes in RHS of the equations Introduction of a new variable
38
Changes in Objective Function Coefficients
Consider ‘Crisis at Bhilpur’ problem. The current objective function is: Type A vehicle carries 2 tons of coal. By how much can this tonnage carried vary without altering the solution?
39
Examine the graphic solution of the problem
Examine the graphic solution of the problem. The slope of the isoprofit line is dependent on the coefficients of A and B. The solution would remain the same as long as the isoprofit line touched the Point (20,10)and did not enter the solution area. The slope variations can range between the blue and the red lines. Type A Vehicles Type B Vehicles
40
The range can be calculated from the final simplex tableau.
Basic Variables 3 2 Cj 1 B -0.01 0.01 - 0.01 -1 -2 70 10 6 5 20 Qty RR Divide the row by the A row. We get: / The least positive quotient is the answer as to how much the capacity of each Type A vehicle could increase and the least negative quotient is how much the capacity can decrease without changing the solution. Type A vehicle capacity can vary between 1.5 and 3 tons.
41
Divide the row by the B row. We get: 0 0 -1 1 0 0
Similarly, we can find the range of carrying capacity of Type B vehicles A Basic Variables 3 2 Cj 1 B -0.01 0.01 - 0.01 -1 -2 70 10 6 5 20 Qty RR Divide the row by the B row. We get: The least positive quotient is the answer as to how much the capacity of each Type B vehicle could increase and the least negative quotient is how much the capacity can decrease without changing the solution. Type B vehicle capacity can vary between 2 and 4 tons.
42
Right Hand Side Ranging
What would happen if the level of resources available changed, or the right hand side of the constraints changed? If we were to be offered more diesel, without increasing the number of drivers, we would first take as many Type B vehicles as possible, since Type B vehicles carry more i.e. 15 vehicles. We would have 15 drivers left with which we can utilise 15 Type A vehicles. A total of 4500 litres of diesel would be needed.
43
Right Hand Side Ranging
Similarly, if we were required to shed diesel, we would first utilise all Type A vehicles as they consume less diesel, i.e. 26 vehicles. The remaining 4 drivers would be used by deploying 4 Type B vehicles. A total of 3400 litres of diesel would be needed. Shadow prices remain constant within these ranges.
44
We can also do RHS ranging from the final simplex tableau
Basic Variables 3 2 Cj 1 B -0.01 0.01 - 0.01 -1 -2 70 10 6 5 20 Qty RR Divide the Quantity column by the slack column for S1. We get: The least positive quotient (600) is the answer as to how much diesel can be reduced and the least negative quotient (500) is how much it can be increased without affecting the shadow prices. The range of diesel is 3400 to 4500 litres.
45
Similarly, we can compute the range for drivers.
Basic Variables 3 2 Cj 1 B -0.01 0.01 - 0.01 -1 -2 70 10 6 5 20 Qty RR Divide the Quantity column by the slack column for S2. We get: The least positive quotient (5) is the answer as to how many drivers can be reduced and the least negative quotient (3) is how many drivers can be increased without affecting the shadow prices. The range of drivers is 25 to 33.
46
Adding another Variable
If a Type C truck was made available which can carry 4.5 tons of coal but consumes 400 litres of diesel, should we consider it ? The shadow price per litre of diesel is .01 tons of coal and the shadow price of one driver is 1 ton of coal. Since the Type C truck consumes 400 litres of diesel and 1 driver, it should deliver 5 tons of coal at the existing shadow prices Since its capacity is less, we should not consider introducing it in our solution.
47
Technical Issues Infeasibility – when artificial variables are still in solution. Unbounded Solution – if all replacement ratios are negative or infinity. Degeneracy – when a variable though in solution has a value of zero. Two rows may have the same replacement ratio. Multiple Optima – multiple solutions. Two rows have the same replacement ratio.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.