Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Tổng quan chương trình

- Buổi 1: Simplex + BigM


- Buổi 2: 2 phase + 4 special cases
- Buổi 3: Revised simplex
- Buổi 4: Sensitive Analysis + Phân tích đề và formulate mathematical model
* Graphical method sẽ skip nếu các bạn hong có nhu cầu.

Simplex: constraint “≤”


Big M + 2 phase: constraint “=” và “≥”

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

Step 3: Fill the table


Rule:
- Find entering variable (Most negative number)
- Find leaving variable (RHS / Pivot column => Minimum ratio)
BV x1 x2 s1 s2 s3 RHS Ratio
Z -3 -5 0 0 0 0
s1 1 0 1 0 0 4 4/0
s2 0 2 0 1 0 12 12/2
s3 3 2 0 0 1 18 18/2
Step 4: Next iteration
Rule:
- Update the BV (leaving and entering variable)
- Pivot number = 1
- Pivot column = 0 (except pivot number)
- If Z row are all nonnegative => Conclude optimal solution, otherwise repeat step 3
BV x1 x2 s1 s2 s3 RHS Ratio
Z -3 -5 0 0 0 0
s1 1 1 1 0 0 4 4/1
s2 0 2 0 1 0 12 12/2
s3 3 2 0 0 1 18 18/2

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

b : giao giữa pivot column và hàng mình đang tính


a : pivot number
x : giao giữa pivot row và cột mình đang tính
y : ô mình đang định thay thế

Min Z = Max (-Z)


Min Z=2 x 1 +3 x 2 => Max (-Z) =−2 x 1−3 x 2

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

Step 1: Convert to standard LP form


Max Z=3 x1 +5 x 2+ 0 s 1+ 0 s 2−M A 1
Subject to
x 1+ s 1=4
2 x 2+ s2 =12
3 x 1+2 x 2 + A 1=18
x 1 , x 2 , s1 , s 2 , A1 ≥ 0
Step 2: Initial feasible solution
Nonbasic variables:
x 1=0 , x 2=0
Basic variables:
s1=4 , s 2=12 , A 1=18

Step 3: Convert objective function to standard form


A basic variable A1 has a nonzero coefficient in Objective function, thus A1 must eliminated
Max Z−3 x1 −5 x 2 +0 s1 +0 s 2 + M A 1

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

You might also like