0% found this document useful (0 votes)
3 views

Tutorial_SIMPLEX

The document provides a tutorial on the Simplex method for solving linear programming problems, including both regular and advanced methods. It presents several optimization problems with their respective constraints and detailed calculations leading to optimal solutions. The optimal values for the problems are provided, demonstrating the application of the Simplex method in operations research.

Uploaded by

hyj.mg12
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Tutorial_SIMPLEX

The document provides a tutorial on the Simplex method for solving linear programming problems, including both regular and advanced methods. It presents several optimization problems with their respective constraints and detailed calculations leading to optimal solutions. The optimal values for the problems are provided, demonstrating the application of the Simplex method in operations research.

Uploaded by

hyj.mg12
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

NYCU, College of Management, 517013

AY113, Semester 1, [email protected] ©

College of Management NYCU


517013 Operations Research (I)
Tutorial of Simplex method

Regular Simplex Method


Question R1.
Maximize z = 5 x1 + x2
subject to: 2 x1 + x2 ≤ 6
x1 − x2 ≤ 0
x1 , x2 ≥ 0

Question R2
Minimize z = − x1 − x2
subject to: x1 − x2 ≤ 1
x1 + x2 ≤ 2
x1 , x2 ≥ 0

Question R3
Maximize z = 2 x1 + 2 x 2 + 4 x3
subject to: x1 + x 2 + 2x3 ≤ 200
3 x1 + 2 x 2 + 5 x3 ≤ 420
2 x1 + x 2 + 3 x3 ≤ 240
x1 , x 2 , x3 ≥ 0

Advanced Simplex Method


Question A1:
Solve to following LP problem by Big-M and Two-Phase Simplex method.
Minimize z = 2 x1 + 3x2
subject to: 2 x1 + x2 ≥ 4
− x1 + x2 ≤ 1
x1 , x2 ≥ 0

Question A2:
Solve to following LP problem by Big-M and Two-Phase Simplex method.
Minimize z = 4 x1 + 4 x2 + x3
subject to: x1 + x2 + x3 ≤ 2
2 x1 + x2 ≤ 3
2 x1 + x2 + 3x3 ≥ 3
x1 , x 2 , x3 ≥ 0
NYCU, College of Management, 517013
AY113, Semester 1, [email protected] ©
2
___________________________________________________________________________
Solution:
QR1.

Augmented form
max z = 5 x1 + x2
subject to: 2 x1 + x2 + s1 = 6
x1 − x2 + s2 = 0
x1 , x2 , s1 , s 2 ≥ 0
Basic Z x1 x2 s1 s2 RHS
z 1 -5 -1 0 0 0
s1 0 2 1 1 0 6
s2 0 1 -1 0 1 0

Basic Z x1 x2 s1 s2 RHS Ratio


z 1 -5 -1 0 0 0
s1 0 2 1 1 0 6 3
s2 0 1 -1 0 1 0 0

Basic Z x1 x2 s1 s2 RHS
z 1 0 -6 0 5 0
s1 0 0 3 1 -2 6
x1 0 1 -1 0 1 0

Basic z x1 x2 s1 s2 RHS Ratio


z 1 0 -6 0 5 0
s1 0 0 3 1 -2 6 1
x1 0 1 -1 0 1 0 N/A

Basic z x1 x2 s1 s2 RHS
z 1 0 0 2 1 12
x2 0 0 1 1/3 - 2/3 2
x1 0 1 0 1/3 1/3 2

Optimal Solution: x1 = 2, x2 = 2, x1=s1=0.


Optimal value: z= 12.
NYCU, College of Management, 517013
AY113, Semester 1, [email protected] ©
3
___________________________________________________________________________
QR2.
Augmented form

Max − z = x1 + x2
Basic -z x1 x2 s1 s2 RHS
-z 1 -1 -1 0 0 0 subject to: x1 − x2 + s1 = 1
s1 0 1 -1 1 0 1 x1 + x2 + s2 = 2
s2 0 1 1 0 1 2 x1 , x2 , s1 , s2 ≥ 0

Basic -z x1 x2 s1 s2 RHS Ratio


-z 1 -1 -1 0 0 0
s1 0 1* -1 1 0 1 1
s2 0 1 1 0 1 2 2

Basic -z x1 x2 s1 s2 RHS
-z 1 0 -2 1 0 1
x1 0 1 -1 1 0 1
s2 0 0 2 -1 1 1

Basic -z x1 x2 s1 s2 RHS Ratio


-z 1 0 -2 1 0 1
x1 0 1 -1 1 0 1 N/A
s2 0 0 2* -1 1 1 0.5
Basic -z x1 x2 s1 s2 RHS
-z 1 0 0 0 1 2
x1 0 1 0 0.5 0.5 1.5
x2 0 0 1 -0.5 0.5 0.5
Basic Feasible Solution 1 with optimal value:
z = -2
Basic Variables: Non-Basic Variables:
x1=1.5 s1, s2
x2=0.5

Basic -z x1 x2 s1 s2 RHS Ratio


-z 1 0 0 0 1 2
x1 0 1 0 0.5* 0.5 1.5 3
x2 0 0 1 -0.5 0.5 0.5 N/A

Basic -z x1 x2 s1 s2 RHS
-z 1 0 0 0 1 2
s1 0 2 0 1 1 3
x2 0 1 1 0 1 2
Basic Feasible Solution 2 with optimal
value:
z = -2
Basic Variables: Non-Basic
Variables:
s1=3 x1, s2
x2=2

The convex combinations of these two basic feasible solutions (corners) are also optimal.
NYCU, College of Management, 517013
AY113, Semester 1, [email protected] ©
4
___________________________________________________________________________
QR3.
Augmented form
Maximize z = 2 x1 + 2 x 2 + 4 x3
subject to: x1 + x2 + 2 x3 + s1 = 200
3 x1 + 2 x2 + 5 x3 + s 2 = 420
2 x1 + x2 + 3 x3 + s3 = 240
x1 , x2 , x3 , s1 , s 2 , s3 ≥ 0

Basic z x1 x2 x3 s1 s2 s3 RHS
z 1 -2 -2 -4 0 0 0 0
s1 0 1 1 2 1 0 0 200
s2 0 3 2 5 0 1 0 420
s3 0 2 1 3 0 0 1 240

Basic z x1 x2 x3 s1 s2 s3 RHS Ratio


z 1 -2 -2 -4 0 0 0 0
s1 0 1 1 2 1 0 0 200 100
s2 0 3 2 5 0 1 0 420 84
s3 0 2 1 3 0 0 1 240 80

Basic z x1 x2 x3 s1 s2 s3 RHS
z 1 2/3 - 2/3 0 0 0 4/3 320
s1 0 - 1/3 1/3 0 1 0 - 2/3 40
s2 0 - 1/3 1/3 0 0 1 -5/3 20
x3 0 2/3 1/3 1 0 0 1/3 80

Basic z x1 x2 x3 s1 s2 s3 RHS Ratio


z 1 2/3 - 2/3 0 0 0 4/3 320
s1 0 - 1/3 1/3 0 1 0 - 2/3 40 120
s2 0 - 1/3 1/3 0 0 1 -5/3 20 60
x3 0 2/3 1/3 1 0 0 1/3 80 240

Basic z x1 x2 x3 s1 s2 s3 RHS
z 1 0 0 0 0 2 -2 360
s1 0 0 0 0 1 -1 1 20
x2 0 -1 1 0 0 3 -5 60
x3 0 1 0 1 0 -1 2 60

Basic z x1 x2 x3 s1 s2 s3 RHS Ratio


z 1 0 0 0 0 2 -2 360
s1 0 0 0 0 1 -1 1 20 20
x2 0 -1 1 0 0 3 -5 60 N/A
x3 0 1 0 1 0 -1 2 60 30

Basic z x1 x2 x3 s1 s2 s3 RHS
z 1 0 0 0 2 0 0 400
s3 0 0 0 0 1 -1 1 20
NYCU, College of Management, 517013
AY113, Semester 1, [email protected] ©
5
___________________________________________________________________________
x2 0 -1 1 0 5 -2 0 160
x3 0 1 0 1 -2 1 0 20

Basic Feasible Solution 1 with optimal value:


z = 400
Basic Variables: Non-Basic Variables:
x2 = 160 x1, s1, s2
x3 = 20
s3 = 20

Basic z x1 x2 x3 s1 s2 s3 RHS Ratio


-z 1 0 0 0 2 0 0 400
s3 0 0 0 0 1 -1 1 20 N/A
x2 0 -1 1 0 5 -2 0 160 N/A
x3 0 1 0 1 -2 1 0 20 20

Basic z x1 x2 x3 s1 s2 s3 RHS
z 1 0 0 0 2 0 0 400
s3 0 0 0 0 1 -1 1 20
x2 0 0 1 1 3 -1 0 180
x1 0 1 0 1 -2 1 0 20
Basic Feasible Solution 2 with optimal value:
z = 400
Basic Variables: Non-Basic Variables:
x1 = 20 x3, s1, s2
x2 = 180
s3 = 20

Basic z x1 x2 x3 s1 s2 s3 RHS Ratio


z 1 0 0 0 2 0 0 400
s3 0 0 0 0 1 -1 1 20 N/A
x2 0 -1 1 0 5 -2 0 160 N/A
x3 0 1 0 1 -2 1 0 20 20

Basic z x1 x2 x3 s1 s2 s3 RHS
z 1 0 0 0 2 0 0 400
s3 0 1 0 1 -1 0 1 40
x2 0 1 1 2 1 0 0 200
S2 0 1 0 1 -2 1 0 20
Basic Feasible Solution 3 with optimal value:
z = 400
Basic Variables: Non-Basic Variables:
x2 = 200 x1, x3, s1
s2 = 20
s3 = 40
The convex combinations of these three basic feasible solutions (corners) are also optimal.
NYCU, College of Management, 517013
AY113, Semester 1, [email protected] ©
6
___________________________________________________________________________
Solution
QA1
Big-M method Augmented form
Maximize -z = − 2 x1 − 3x 2 − Ma1
subject to: 2 x1 + x 2 − s1 + a1 = 4
− x1 + x2 + s 2 = 1
x1 , x2 , s1 , s2 ≥ 0
a1 = 0
Basic -z x1 x2 s1 s2 a1 RHS
-z 1 2 3 0 0 M 0
a1 0 2 1 -1 0 1 4
s2 0 -1 1 0 1 0 1

Basic -z x1 x2 s1 s2 a1 RHS
2-
-z 1 3-M M 0 0 -4M
2M
a1 0 2 1 -1 0 1 4
s2 0 -1 1 0 1 0 1

Basic -z x1 x2 s1 s2 a1 RHS Ratio


2-
-z 1 3-M M 0 0 -4M
2M
a1 0 2* 1 -1 0 1 4 2
s2 0 -1 1 0 1 0 1 N/A

Basic -z x1 x2 s1 s2 a1 RHS
-z 1 0 2 1 0 M-1 -4
x1 0 1 ½ -½ 0 ½ 2
s2 0 0 3/2 -½ 1 ½ 3

Optimal solution: x1=2, s2=3, x2=s1=0.


Optimal value: z=4.
NYCU, College of Management, 517013
AY113, Semester 1, [email protected] ©
7
___________________________________________________________________________
Two-phase method
Phase 1:
Maximize -w = − a1
subject to: 2 x1 + x 2 − s1 + a1 = 4
− x1 + x2 + s 2 = 1
x1 , x2 , s1 , s2 ≥ 0
a1 = 0
Basic -w x1 x2 s1 s2 a1 RHS
-w 1 0 0 0 0 1 0
a1 0 2 1 -1 0 1 4
s2 0 -1 1 0 1 0 1

Basic -w x1 x2 s1 s2 a1 RHS
-w 1 -2 -1 1 0 0 -4
a1 0 2 1 -1 0 1 4
s2 0 -1 1 0 1 0 1

Basic -w x1 x2 s1 s2 a1 RHS Ratio


-w 1 -2 -1 1 0 0 -4
a1 0 2* 1 -1 0 1 4 2
s2 0 -1 1 0 1 0 1 N/A

Basic -w x1 x2 s1 s2 a1 RHS
-w 1 0 0 0 0 1 0
x1 0 1 1/2 - 1/2 0 1/2 2
1
s2 0 0 - 1/2 1 1/2 3
1/2

Phase 2:

Basic -z x1 x2 s1 s2 RHS
-z 1 2 3 0 0 0
x1 0 1 1/2 - 1/2 0 2
1
s2 0 0 - 1/2 1 3
1/2

Basic -z x1 x2 s1 s2 RHS
-z 1 0 2 1 0 -4
x1 0 1 1/2 - 1/2 0 2
1
s2 0 0 - 1/2 1 3
1/2

Optimal solution: x1=2, s2=3, x2=s2=0.


Optimal value: z=4.
NYCU, College of Management, 517013
AY113, Semester 1, [email protected] ©
8
___________________________________________________________________________
QA2
Big-M method Augmented form
Maximize - z = − 4 x1 − 4 x2 − x3 − Ma1
subject to: x1 + x2 + x3 + s1 = 2
2 x1 + x2 + s 2 = 3
2 x1 + x2 + 3x3 − s3 + a1 = 3
x1 , x2 , x3 , s1 , s2 , s3 ≥ 0
a1 = 0
Basic -z x1 x2 x3 s1 s2 s3 a1 RHS
-z 1 4 4 1 0 0 0 M 0
s1 0 1 1 1 1 0 0 0 2
s2 0 2 1 0 0 1 0 0 3
a1 0 2 1 3 0 0 -1 1 3

Basic -z x1 x2 x3 s1 s2 s3 a1 RHS Ratio


4- 1-
-z 1 4-M 0 0 M 0 -3M
2M 3M
s1 0 1 1 1 1 0 0 0 2 2
s2 0 2 1 0 0 1 0 0 3 N/A
a1 0 2 1 3* 0 0 -1 1 3 1

Basic -z x1 x2 x3 s1 s2 s3 a1 RHS
-z 1 10/3 11/3 0 0 0 1/3 M-1/3 -1
s1 0 1/3 2/3 0 1 0 1/3 - 1/3 1
s2 0 2 1 0 0 1 0 0 3
x3 0 2/3 1/3 1 0 0 - 1/3 1/3 1

Optimal solution: s1=1, s2=3, x3=1, x1=x2=s3=0.


Optimal value: z=1.
NYCU, College of Management, 517013
AY113, Semester 1, [email protected] ©
9
___________________________________________________________________________
Two-phase method
Phase 1: Maximize -w = −a 1

subject to: x1 + x2 + x3 + s1 = 2
2 x1 + x2 + s 2 = 3
2 x1 + x2 + 3x3 − s3 + a1 = 3
x1 , x2 , x3 , s1 , s2 , s3 ≥ 0
a1 = 0
Basic -w x1 x2 x3 s1 s2 s3 a1 RHS
-w 1 0 0 0 0 0 0 1 0
s1 0 1 1 1 1 0 0 0 2
s2 0 2 1 0 0 1 0 0 3
a1 0 2 1 3 0 0 -1 1 3

Basic -w x1 x2 x3 s1 s2 s3 a1 RHS
-w 1 -2 -1 -3 0 0 1 0 -3
s1 0 1 1 1 1 0 0 0 2
s2 0 2 1 0 0 1 0 0 3
a1 0 2 1 3 0 0 -1 1 3

Basic -w x1 x2 x3 s1 s2 s3 a1 RHS Ratio


-w 1 -2 -1 -3 0 0 1 0 -3
s1 0 1 1 1 1 0 0 0 2 2
s2 0 2 1 0 0 1 0 0 3 N/A
a1 0 2 1 3* 0 0 -1 1 3 1

Basic -w x1 x2 x3 s1 s2 s3 a1 RHS
-w 1 0 0 0 0 0 0 1 0
s1 0 1/3 2/3 0 1 0 1/3 - 1/3 1
s2 0 2 1 0 0 1 0 0 3
x3 0 2/3 1/3 1 0 0 - 1/3 1/3 1

Phase 2:
Basic -z x1 x2 x3 s1 s2 s3 RHS
-z 1 4 4 1 0 0 0 0
s1 0 1/3 2/3 0 1 0 1/3 1
s2 0 2 1 0 0 1 0 3
x3 0 2/3 1/3 1 0 0 - 1/3 1

Basic -z x1 x2 x3 s1 s2 s3 RHS
-z 1 10/3 11/3 0 0 0 1/3 -1
s1 0 1/3 2/3 0 1 0 1/3 1
s2 0 2 1 0 0 1 0 3
x3 0 2/3 1/3 1 0 0 - 1/3 1

Optimal solution: s1=1, s2=3, x3=1, x1=x2=s3=0,


Optimal value: z=1.

You might also like