Professional Documents
Culture Documents
OR Simplex
OR Simplex
SIMPLEX
Step 1: Convert to standard LP form
Rule:
≤:+s
≥:–s+A
=:+A
Example:
Max Z = 2 x1 +3 x 2 Max Z = 2 x1 +3 x 2 +0 s 1+ 0 s 3−M A 2−M A 3
Subject to Subject to
x 1+ x2 ≤5 x 1+ x2 + s1=5
2 x1 =6 2 x1 + A 2=6
x 1+ 3 x 2 ≥ 8 x 1+ 3 x 2−s 3+ A 3=8
x1 , x2 ≥ 0 x 1 , x 2 , s1 , s 3 , A2 , A 3 ≥0
Practice:
Max Z = 5 x 1+ 3 x 2
Subject to
3 x 1+ x 2=7
2 x2≥ 6
2 x1 +3 x 2 ≤ 8
x1 , x2 ≥ 0
Step 2: Find initial solution
Rule:
Set x= 0 và tìm biến phụ
Non-basic variable: những biến bị set = 0
Basic variable: những biến mình cần tìm
Example:
Max Z = 2 x1 +3 x 2 Max Z = 2 x1 +3 x 2 +0 s 1+ 0 s 2
Subject to Subject to
x 1+ x2 ≤5 x 1+ x2 + s1=5
2 x1 ≤ 6 2 x1 + s2 =6
x1 , x2 ≥ 0 x 1 , x 2 , s1 , s 2 ≥ 0
Initial solution:
Set x 1=0 , x 2=0
=> s1=5 , s2=6
NBV: x 1 , x 2
BV: s1 , s 2 (= số lượng constraint)
Practice:
Max Z = 3 x 1+ 5 x 2
Subject to
x1 ≤ 4
2 x 2 ≤ 12
3 x 1+2 x 2 ≤ 18
x1 , x2 ≥ 0
Convert to standard LP form
Max Z −3 x 1−5 x2 +0 s1 +0 s2 +0 s3
Subject to
x 1+ s 1=4
2 x 2+ s2 =12
3 x 1+2 x 2 +s 3=18
x 1 , x 2 , s1 , s 2 , s3 ≥ 0
Initial solution
x 1=x 2=0 => Z = 0
=> s1=4 , s 2=12 , s 3=18
NBV: x 1 , x 2
BV: s1 , s 2 , s 3
BV x1 x2 s1 s2 s3 RHS Ratio
Z -3 60
X1 10
x2 15
s3
−b
x+ y
a
- 2 x + y CALC
X=1
Y=3
Practice:
Max Z=2 x 1 + x 2
Subject to
x 1+ x2 ≤ 40
4 x1 + x 2 ≤ 100
x1 , x2 ≥ 0
BIG M
Max Z=3 x1 +5 x 2
Subject to
x1 ≤ 4
2 x 2 ≤ 12
3 x 1+2 x 2=18
x1 , x2 ≥ 0
Z−3 x1 −5 x 2 + M A 1=0
+ −M (3 x 1+ 2 x 2 + A 1=18)
---------------------------------------------------------------------------------
Z+ (−3 M −3 ) x 1 + (−2 M −5 ) x 2=−18 M
Step 4: Fill the table
BV x1 x2 s1 s2 A1 RHS Ratio
Z - 3M - 3 - 2M - 5 0 0 0 - 18M
s1 1 0 1 0 0 4
s2 0 2 0 1 0 12
A1 3 2 0 0 1 18