Professional Documents
Culture Documents
George Dantzig
(FEUP | DEGI)
Operations Research
March 3, 2014
1 / 24
Ability to use the Simplex Method in tableau form to solve a linear program represented in the
Canonical Form, i.e.:
Ability to determine the starting point to initiate the simplex method.
Ability to write the linear program in tableau form.
Ability to use the improvement mechanism for moving from a point to another point with a
better value of the objective function.
Improvement Criterion
In a maximization (minimization) problem, choose the nonbasic variable that has the most positive (negative) coefficient in
the objective function of a canonical form.
If that variable has a positive coefficient in some constraint, then a new basic feasible solution may be obtained by pivoting.
Ratio and Pivoting Criterion
When improving a given canonical form by introducing variable xs into the basis, pivot in a constraint that gives the
minimum ratio of righthand-side coefficient to the corresponding xs coefficient. Compute these ratios only for constraints
that have a positive coefficient for xs .
(FEUP | DEGI)
Operations Research
March 3, 2014
2 / 24
Ability to detect termination criteria to indicate when a solution has been obtained by
demonstrating that:
there is no feasible solution;
the solution is optimal;
there is more than one optimal solution;
the objective function is unbounded over the feasible region.
(FEUP | DEGI)
Operations Research
March 3, 2014
3 / 24
http://www.cccblog.org/2012/08/20/the-algorithm-that-runs-the-world/
(FEUP | DEGI)
Operations Research
March 3, 2014
4 / 24
http://en.wikipedia.org/wiki/File:Simplex-method-3dimensions.png
(FEUP | DEGI)
Operations Research
March 3, 2014
5 / 24
(FEUP | DEGI)
Operations Research
March 3, 2014
6 / 24
Objective:
max
0x1
Subject to:
1x1
0x1
x1 ,
(FEUP | DEGI)
+0x2
3x3
x4
+20
+0x2
+1x2
x2 ,
3x3
8x3
x3 ,
+3x4
+4x4
x4
=6
=4
0
Operations Research
March 3, 2014
7 / 24
Objective:
max
0x1
Subject to:
1x1
0x1
x1 ,
(FEUP | DEGI)
+0x2
+3x3
x4
+20
+0x2
+1x2
x2 ,
3x3
8x3
x3 ,
+3x4
+4x4
x4
=6
=4
0
Operations Research
March 3, 2014
8 / 24
Objective:
max
0x1
Subject to:
1x1
0x1
x1 ,
Objective:
max
0x1
Subject to:
1x1
0x1
x1 ,
(FEUP | DEGI)
+0x2
3x3
+x4
+20
+0x2
+1x2
x2 ,
3x3
8x3
x3 ,
+3x4
+4x4
x4
=6
=4
0
+ 14 x2
x3
+0x4
+21
34 x2
+ 14 x2
x2 ,
3x3
2x3
x3 ,
+0x4
+1x4
x4
=3
=1
0
Operations Research
March 3, 2014
9 / 24
Production Planning at BA
Linear Programming Model
Objective:
max
Z = 50xVP + 60xA
Subject to:
50xVP +
30xA
2000
6xVP +
5xA
300
3xVP +
5xA
200
xVP ,
xA
+s1
+s2
s1 ,
s2 ,
Operations Research
+s3
s3
=
=
=
2000
300
200
0
March 3, 2014
10 / 24
XA
80
70
Objective:
max Z = 50xVP + 60xA
Subject to:
50xVP
+30xA
6xVP
+5xA
3xVP
+5xA
xVP ,
xA ,
60
50
Z = 50XVP + 60XA
40
+s1
+s2
s1 ,
s2 ,
+s3
s3
=
=
=
2000
300
200
0
Basic variables:
20
10
0
0
Non-basic variables:
30
xVP
xA
s1
s2
s
3
10
20
30
40
50
60
70
=0
=0
= 2000
= 300
= 200
Z=0
80
XVP
(FEUP | DEGI)
Operations Research
March 3, 2014
11 / 24
XA
Objective:
max Z = 50xVP
= 50xVP
=
2400
80
70
+60xA
+60(40 53 xVP 15 s3 )
+14xVP
12s3
60
50
Z = 50XVP + 60XA
40
Subject to:
32xVP
3xVP
3
+xA
5 xVP
xVP ,
xA ,
30
+s1
+s2
s1 ,
s2 ,
6s3
s3
+ 15 s3
s3
=
=
=
800
100
40
0
xVP
s3
s1
s2
x
A
=0
=0
= 800
= 100
= 40
Z = 2400
(FEUP | DEGI)
0
10
20
30
40
50
60
70
Basic variables:
10
20
80
XVP
Operations Research
March 3, 2014
12 / 24
Objective:
max Z = 2400
= 2400
= 2750
+14xVP
12s3
1
+14(25 32
s1 +
7
16 s1 75
8 s3
3
16 s3 )
12s3
XA
80
70
Subject to:
xVP
60
1
+ 32
s1
3
16
s3
25
3
32
s1
5
16
s3
25
+s2
50
Z = 50XVP + 60XA
40
30
xVP ,
+xA
xA ,
3
s1
160
s1 ,
71
80 s3
s3
s2 ,
25
0
20
10
Non-basic variables:
Basic variables:
s1
s3
xVP
s
x2
A
=0
=0
10
20
30
40
50
60
70
= 25
= 25
= 25
80
XVP
Z = 2750
(FEUP | DEGI)
Operations Research
March 3, 2014
13 / 24
Simplex Method
Steps of the algorithm
Change the lines in the tableau in order to obtain coeficient equal to one for the
pivot element and zero for all the other elements of the column, including the
objective function.
Go To Optimality Test
There are alternative optimal solutions when, in the optimal solution, one non-basic variable has a zero marginal
cost.
2
If there is more than one variable that fulfills the criterion choose one arbitrarilly.
(FEUP | DEGI)
Operations Research
March 3, 2014
14 / 24
Production Planning at BA
Simplex method
Objective:
max
Subject to:
Objective:
max
Subject to:
(FEUP | DEGI)
Z =
Z =
50xVP +
60xA
50xVP +
6xVP +
3xVP +
xVP ,
30xA
5xA
5xA
xA
50xVP +
60xA
50xVP +
6xVP +
3xVP +
xVP ,
30xA +
5xA +
5xA +
xA ,
2000
300
200
0
s1
s2
s1 ,
Operations Research
s2 ,
s3
s3
= 2000
= 300
= 200
0
March 3, 2014
15 / 24
xVP
50
6
3
50
s1
s2
s3
Z
xVP
s1
xVP
s2
xA
Z
xA
160
5
s2
xA
Z
3
5
14
xVP
1
0
0
0
xA
30
5
5
60
xA
0
0
1
0
s1
1
0
0
0
s1
s2
0
1
0
0
s3
0
0
1
0
s2
s3
800
100
40
2400
30
5
0
1
0
0
0
0
1
0
0
s1
5
160
15
160
3
160
7
16
s2
0
1
0
0
(FEUP | DEGI)
2000
300
200
0
1
5
12
s3
3
16
7
16
5
16
75
8
25
25
25
2750
Operations Research
March 3, 2014
16 / 24
An important condition for the Simplex method is the availability of an initial Basic
Admissible Solution in the canonical form.
Sometimes this initial BAS is not evident or it may evn not exist (and sometimes there is no
Basic Admissible Solution!).
Solutions:
Trial and error solve the system for different sets of variables, reduce it to the canonical form and
test if the resulting solution is admissible.
Using artificial variables.
(FEUP | DEGI)
Operations Research
March 3, 2014
17 / 24
Pn
j=1
cj xj
Subject to:
n
X
aij xj
= bi
i{1,...,m}
xj
j{1,...,n}
j=1
max
Pn
aij xj
= bi
i{1,...,k}
aij xj + yi
= bi
i{k+1,...,m}
xj
j{1,...,n}
yi
i{k+1,...,m}
j=1
cj xj
Subject to:
n
X
j=1
n
X
j=1
3. The artificial problem will only be equivalent to the original one if all the artificial variables have value zero.
Objective: All the artificial variables must leave the basis. Big M method.
(FEUP | DEGI)
Operations Research
March 3, 2014
18 / 24
Big M method
Assign a very high cost (M) (minimization problem) in the objective function to the artificial
variables .
The simplex method will take care, by improving the objective function, to expel the arficicial
variables from the basis artificial variables equal to zero.
min
Pn
j=1 cj xj
Pm
i=k+1
Myi
Subject to:
n
X
aij xj
= bi
i{1,...,k}
aij xj + yi
= bi
i{k+1,...,m}
xj
j{1,...,n}
yi
i{k+1,...,m}
j=1
n
X
j=1
(FEUP | DEGI)
Operations Research
March 3, 2014
19 / 24
Big M method
example
Objective:
min
Z
Subject to:
x1
4x1
2x1
x1
Objective:
min
Z
Subject to:
x1
4x1
2x1
x1
(FEUP | DEGI)
3x1
x2
2x2
x2
x2
+
+
+
,
x3
2x3
x3
x3
3x1
x2
x3
2x2
x2
s1
x2
x3
2x3
x3
x3
+
+
+
,
Operations Research
x3
s1
s2
s2
11
3
1
0
=
=
=
11
3
1
0
March 3, 2014
20 / 24
Objective:
min
Z
Subject to:
x1
4x1
2x1
x1
3x1
x2
x3
2x2
x2
s1
x2
x3
2x3
x3
x3
+
+
+
,
s1
My1
My2
s2
y1
s2
y1
+
,
y2
y2
=
=
=
(FEUP | DEGI)
Operations Research
March 3, 2014
11
3
1
0
21 / 24
s1
y1
y2
Z
x1
1
4
2
3
6M
x2
2
1
0
1
M
x3
1
2
1
1
3M
s1
1
0
0
0
0
s2
0
1
0
0
M
y1
0
1
0
0
0
y2
0
0
1
0
0
11
3
1
0
4M
s1
y1
x3
Z
x1
3
0
2
1
0
x2
2
1
0
1
M
x3
0
0
1
0
0
s1
1
0
0
0
0
s2
0
1
0
0
M
y1
0
1
0
0
0
y2
1
2
1
1
3M
10
1
1
1
M
(FEUP | DEGI)
Operations Research
March 3, 2014
22 / 24
s1
x2
x3
Z
x1
x2
x3
Z
x1
3
0
2
1
0
x2
0
1
0
0
0
x3
0
0
1
0
0
s1
1
0
0
0
0
s2
2
1
0
1
0
x1
1
0
0
0
x2
0
1
0
0
x3
0
0
1
0
s1
s2
32
1
34
1
3
0
2
3
1
3
y1
2
1
0
1
M
y2
5
2
1
+1
M
1
3
12
1
1
2
0
4
1
9
2
(FEUP | DEGI)
Operations Research
March 3, 2014
23 / 24
Some remarks
The artificial variables are only used to serve as basic variables in a given equation. Once replaced
in the base by the original variables, the artificial variables can be eliminated from the simplex
tableau (eliminating the respective columns).
If, in the optimal simplex tableau, some artificial variables have a value > 0, it means that the
original problem has no admissible solution, and therefore it is an impossible problem.
(FEUP | DEGI)
Operations Research
March 3, 2014
24 / 24