Mathemetical Modeeling and Optimization
Mathemetical Modeeling and Optimization
You may recall that while introducing the slack and surplus
variables, we had assigned a zero cost to them in the objective
function. Moreover, the slack variables readily provided the
initial basic feasible solution. There are, however, many linear
programming problems where slack variables cannot provide
such a solution. To solve such linear programming problems,
there are two (closely related) methods, viz.,
The "big M-method" or the "method of penalties" due to A.
Charnes, and
"two phase method" due to Dantzig, Orden and Wolfe.
Maximize z = x1 + 5x2
subject to
3x1 + 4x2 ≤ 6
x1 + 3x2 ≥ 2
x1, x2 ≥ 0
Solution.
subject to
3x1 + 4x2 + x3 = 6
x1 + 3x2 – x4 + A1 = 2
x1 ≥ 0, x2 ≥ 0, x3 ≥ 0, x4 ≥ 0, A1 ≥ 0
Where:
x3 is a slack variable
x4 is a surplus variable.
A1 is an artificial variable.
x1 = x2 = x4 = 0
A1 = 2, x3 = 6
z1 – c1 = 0 X 3 + (–M) X 1 – 1 = –M – 1
z2 – c2 = 0 X 4 + (–M) X 3 – 5 = –3M – 5
z3 – c3 = 0 X 1 + (–M) X 0 – 0 = 0
z4 – c4 = 0 X 0 + (–M) X (–1) – 0 = M
z5 – c5 = 0 X 0 + (–M) X 1 – (–M) = 0
Table 2
c j 1 5 0 0
c B Basic variables x 1 x x
2 3 x4 Solution values
B b (= X )B
Table 2
cj 1 5 0 0
cB Basic variables x1 x2 x3 x4 Solution values
B b (= XB)
0 x3 5/3 0 1 4/3 10/3
5 x2 1/3 1 0 –1/3 2/3
zj–cj 2/3 0 0 –5/3
Final Optimal Table: The Big M Method
cj 1 5 0 0
cB Basic variables x1 x2 x3 x4 Solution values
B b (= XB)
0 x4 5/4 0 3/4 1 5/2
5 x2 3/4 1 1/4 0 3/2
zj–cj 11/4 0 5/4 0
x1 = 0, x2 = 3/2
z = 0 + 5 X 3/2 =15/2
Big M Simplex Method Example: LPP
subject to
3x1 + x2 ≥ 27
x1 + x2 ≥ 21
x1 + 2x2 ≥ 30
x1, x2 ≥ 0
Solution.
3x1 + x2 - x3 + A1 = 27
x1 + x2 - x4 + A2 = 21
x1 + 2x2 - x5 + A3 = 30
Where:
x4 and x5 are surplus variables
A1 and A2 are artificial variables.
Table 1
cj -4 -2 0 0 0 – – –
M M M
cB Basic x1 x2 x3 x4 x5 A1 A2 A3 Solution
variables values
B b (= XB)
–M A1 3 1 -1 0 0 1 0 0 27
-M A2 1 1 0 -1 0 0 1 0 21
–M A3 1 2 0 0 -1 0 0 1 30
zj– -5M -4M MMM0 0 0
cj +4 +2
Table 2
cj - -2 0 0 0 – –
4 M M
cB Basic x1 x2 x3 x4 x5 A2 A3 Solution
variables values
B b (= XB)
–4 x1 1 1/3 -1/3 0 0 0 0 9
-M A2 0 2/3 1/3 -1 0 1 0 12
–M A3 0 5/3 1/3 0 -1 0 1 21
zj– 0 -7M/3 + -2M/3 - M M 0 0
cj 2/3 4/3
Table 3
cj - -2 0 0 0 –
4 M
cB Basic x1 x2 x3 x4 x5 A2 Solution
variables values
B b (= XB)
–4 x1 1 0 -2/5 0 1/5 0 24/5
–M A2 0 0 1/5 -1 2/5 1 18/5
-2 x2 0 1 1/5 0 -3/5 0 63/5
zj– 0 0 -M/5 + M -2M/5 + 0
cj 6/5 2/5
cj -4 -2 0 0 0
cB Basic variables x1 x2 x3 x4 x5 Solution values
B b (= XB)
–4 x1 1 0 -1/2 1/2 0 3
0 x5 0 0 1/2 -5/2 1 9
-2 x2 0 1 1/2 -3/2 0 18
zj–cj 0 0 1 1 0
x1 = 3, x2 = 18
z = -4 X 3 - 2 X 18 = -48