Simplex Method
Simplex Method
RK Jana
1
Lecture Outline
4
Example
Subject to
x1 4
2x2 12
3x1 + 2x2 18
x1 , x2 0
5
Corner-points Highlighted
x2 3x1+2x2=18 Both corner-point feasible and
(0, 9)
infeasible solutions are shown.
x1=4
(2, 6) (4, 6)
(0, 6) 2x2=12
(4, 3)
(4, 0) and (2, 6) are adjacent to (4, 3)
(0, 0)
(4, 0) (6, 0) x1
6
Properties of Corner-Point
Solutions
1. If there is exactly one optimal solution, then
it must be a corner-point solution
2. If there are multiple optimal solutions, then
at least two solutions are adjacent corner-
point solutions
3. There are a finite number of corner-point
feasible solutions
4. If a corner-point feasible solution has no
better adjacent corner-point feasible
solution, then it is optimal
7
The Simplex Method
It deals only with a small and unique set of feasible solutions, the
set of vertex points (i.e., extreme points) of the convex feasible
space that contains the optimal solution.
The simplex method is a method for searching corner point
feasible solutions
8
Continued…
9
Geometric Interpretation
10
Continued…
11
Identifying Solution Type
Using Simplex Method
Bounded feasible region exists
If there is exactly one optimal solution, then it can
find the solution efficiently
If there are multiple optimal solutions, then it can
identify the case & can find all solutions
No bounded feasible region exists
Unbounded feasible region can be identified
No feasible region can be identified
12
Slack, surplus and artificial
variables
Slack Variable
Surplus Variable
Artificial Variable
13
Computational Procedure of
Simplex Method
LPP in Vector Notations
Maximize Z = cx
subject to
Ax = b, x 0
16
Initial Simplex Table
cj c1 c2 … cn
cB xB b x1 x2 … xn
… … … … … … …
z j – cj z 1 – c1 z2 –c2 … z n – cn
Objective value
Z = cB xB = cB1 xB1 + cB2 xB2 + … + cBm xBm
The Quantity Zj
zj = cB aj = cB1 a1j + cB2 a2j + … + cBm amj
18
Characteristics
Net evaluation
zj – cj = cB aj - cj= cB1 a1j + cB2 a2j + … + cBm amj – cj
Optimality condition: zj - cj 0
Unbounded solution: zj - cj 0 and aij 0
19
Characteristics
20
Entering & Departing Vector Rules
(maximization problem)
21
Simplex Algorithm
(for a maximization problem)
Step 1: If the given LPP is of minimization type, then
convert it to a maximization type problem.
Step 2: If any of the components of the requirement
vector is negative, multiply the corresponding
constraint by (-1) and adjust the direction of inequality.
If the constraint is an equality then multiply it by (-1)
only.
Step 3: Add slack, surplus & artificial variables to the
constraints according to their requirement.
22
Continued…
23
Continued…
Max Z = x1 + x2 + 3x3
subject to
3x1 + 3x2 + x3 3
2x1 + x2 + 2x3 2
x1 , x2, x3 0
25
Continued…
26
Continued…
Table 1
cj 1 1 3 0 0
cB xB b x1 x2 x3 s1 s2
0 s1 3 3 3 1 1 0
0 s2 2 2 1 2 0 1
zj – c j -1 -1 -3 0 0
27
Continued…
Table 2
cj 1 1 3 0 0
cB xB b x1 x2 x3 s1 s2
0 s1 2 2 5/2 0 1 -1/2
3 x3 1 1 1/2 1 0 1/2
zj – cj 2 1/2 0 0 3/2
Table 1
cj 3 2 1 0 0 0
cB xB b x1 x2 x3 s1 s2 s3
0 s1 42 3 4 3 1 0 0
0 s2 45 5 0 3 0 1 0
0 s3 41 3 6 2 0 0 1
zj – cj -3 -2 -1 0 0 0
30
Continued…
Table 2
cj 3 2 1 0 0 0
cB xB b x1 x2 x3 s1 s2 s3
0 s1 15 0 4 6/5 1 -3/5 0
3 x1 9 1 0 3/5 0 1/5 0
0 s3 14 0 6 1/5 0 -3/5 1
zj – cj 0 -2 4/5 0 3/5 0
31
Continued…
Table 3
cj 3 2 1 0 0 0
cB xB b x1 x2 x3 s1 s2 s3
3 x1 9 1 0 3/5 0 1/5 0
Min Z = x1 + x2
Subject to
5x1 + 9x2 45
x1 + x2 2
x2 4
x1 , x2 0
33
Example
Table 1
cj 107 1 2 0 0 0
cB xB b x1 x2 x3 x4 s1 s2
0 s1 5 16 1/2 -6 0 1 0
0 s2 0 3 -1 -1 0 0 1
zj – cj -107 -1 -2 0 0 0
36
Continued…
Table 2
cj 107 1 2 0 0 0
cB xB b x1 x2 x3 x4 s1 s2
38
Big M-Method of A. Charnes
Example
41
Continued…
Table 1
cj 2 3 0 -M 0
cB xB b x1 x2 s1 s2 s3
0 s1 8 1 1 1 0 0
-M s2 5 1 2 0 1 0
0 s3 8 2 1 0 0 1
zj – cj -M-2 -2M-3 0 0 0
42
Continued…
Table 2
cj 2 3 0 -M 0
cB xB b x1 x2 s1 s2 s3
0 s1 11/2 1/2 0 1 … 0
3 x2 5/2 1/2 1 0 … 0
0 s3 11/2 3/2 0 0 … 1
zj – cj -1/2 0 0 … 0
43
Continued…
Table 3
cj 2 3 0 -M 0
cB xB b x1 x2 s1 s2 s3
0 s1 11/3 0 0 1 … -1/3
3 x2 2/3 0 1 0 … -1/3
2 x1 11/3 1 0 0 … 2/3
zj – cj 0 0 0 … 1/3
46
Continued…
47
Continued…
Table 1
cj -4 -3 0 0 0 -M -M
cB xB b x1 x2 s1 s2 s3 s4 s5
-M s4 10 2 1 -1 0 0 1 0
0 S2 6 -3 2 0 1 0 0 0
-M s5 6 1 1 0 0 -1 0 1
zj – cj -3M+4 -2M+3 M 0 M 0 0
48
Continued…
Table 2
cj -4 -3 0 0 0 -M -M
cB xB b x1 x2 s1 s2 s3 s4 s5
-4 x1 5 1 1/2 -1/2 0 0 -- 0
0 S2 21 0 7/2 -3/2 1 0 -- 0
-M s5 0 0 1/2 1/2 0 -1 -- 1
-M/2 -M/2
zj – cj 0 0 M -- 0
+1 +2 49
Continued…
Table 3
cj -4 -3 0 0 0 -M -M
cB xB b x1 x2 s1 s2 s3 s4 s5
-4 x1 4 1 0 -1 0 1 -- --
0 S2 14 0 0 -5 1 7 -- --
-3 x2 2 0 1 1 0 2 -- --
zj – cj 0 0 1 0 2 -- --
51
Continued…
Table 1
cj 3 2 0 0 -M
cB xB b x1 x2 s1 s2 s5
0 s1 2 2 1 1 0 0
-M s3 12 3 4 0 -1 1
zj – cj -3M-3 -4M-2 0 M 0
52
Continued…
Table 2
cj 3 2 0 0 -M
cB xB b x1 x2 s1 s2 s5
2 x2 2 2 1 1 0 0
-M s3 4 -5 0 -4 -1 1
zj – cj 5M+1 0 4M+2 M 0
54
Continued…
55
Case Study
Bus Scheduling