Professional Documents
Culture Documents
CA3122 Chap 3
CA3122 Chap 3
3.1 Definitions
A standard LP form includes m simultaneous linear equations in n
variables (m<n). Divide the n variables into (1) (n-m) variables to
which zero values are assigned; and (2) the remaining m variables
whose values are to be solved from the m simultaneous
A feasible solution is one which satisfies all the constraint
equations.
A basic matrix is a m x m non-singular matrix made up of any
m constraint equations.
A basic solution is a unique vector determined by choosing a
basic matrix, setting the (n-m) remaining variables to zero and
solving for the m variables.
Basic variables are the m variables yielding a basic solution.
A basic feasible solution is a basic solution in which all
variables have non-negative values.
An optimal solution is a basic solution which minimizes or
maximizes the objective function.
Prof. C.W. Lim CA3122 Engineering Analysis Part 2: Operations Research 2
3.2 Standard LP Form
All constraints are equations with nonnegative right-
hand side. If the rhs is -ve, multiply both sides by -1
and change to or vice versa.
Example:
x1 2 x2 3
x1 2 x2 s1 3
where the slack s1 0.
Example:
3 x1 x2 5
3 x1 x2 5
3 x1 x2 S1 5
where the surplus S1 0.
Example 2:
x1 2 x2 3 x1 x1 2 x2 3
x1 , unrestricted
x1 , x1 , x2 0
x2 0
Example
Minimize z 3 x1 2 x 2 Minimize z 3 x1 2 x 2
Subject to 3 x1 x 2 3 Subject to 3 x1 x2 s3 3
4 x1 3 x 2 6 4 x1 3 x2 s4 6
x1 x 2 3 x1 x2 s5 3
x1 , x 2 0 x1 , x2 , s3 , s4 , s5 0
Minimize z 3 x1 2 x2 Maximize z 3 x1 2 x2
Subject to 3 x1 x2 s3 3 Subject to 3 x1 x2 s3 3
4 x1 3 x2 s4 6 4 x1 3 x2 s4 6
x1 x2 s5 3 x1 x2 s5 3
x1 , x2 , s3 , s4 , s5 0 x1 , x2 , s3 , s4 , s5 0
Prof. C.W. Lim CA3122 Engineering Analysis Part 2: Operations Research 7
1 1 0 x1 5 x1 10
6 0 1 s 4
s1 15
1 s 64
1 0 0 s2 10 2
basic matrix
basic variables basic feasible solution
nonbasic variables: x2, x3
Prof. C.W. Lim CA3122 Engineering Analysis Part 2: Operations Research 11
(a) pivot row: New pivot row = current pivot row/pivot element
Basic z x1 x2 s1 s2 s3 s4 Solution
z
x1 0 1 4/6=2/3 1/6 0 0 0 24/6=4 new pivo t ro w
s2
s3
s4
Basic z x1 x2 s1 s2 s3 s4 Solution
z 1 0 -2/3 5/6 0 0 0 20
x1 0 1 2/3 1/6 0 0 0 4
s2 0 0 4/3 -1/6 1 0 0 2
s3 0 0 5/3 1/6 0 1 0 5
s4 0 0 1 0 0 0 1 2
pivot row: New pivot row = current pivot row/pivot element. All other rows,
including z: New row = (current row) - (its pivot column element) × (new pivot row).
Basic z x1 x2 s1 s2 s3 s4 Solution
z 1 0 -2/3 5/6 0 0 0 20
x1 0 1 2/3 1/6 0 0 0 4
x2 0 0 1 -1/8 3/4 0 0 3/2
s3 0 0 5/3 1/6 0 1 0 5
s4 0 0 1 0 0 0 1 2
x1 2 x2 2 x3 4 x4 40
2 x1 x2 x3 2 x4 8
4 x1 2 x2 x3 x4 10
x1 , x2 , x3 , x4 0
.
(a) Maximize z 2 x1 x2 3 x3 5 x4
(b) Minimize z 5 x1 4 x2 6 x3 8 x4
Prof. C.W. Lim CA3122 Engineering Analysis Part 2: Operations Research 23
Solution:
Standard LP:
Maximize z 2 x1 x2 3x3 5 x4
Subject to x1 2 x2 2 x3 4 x4 x5 40
.
2 x1 x2 x3 2 x4 x6 8
4 x1 2 x2 x3 x4 x7 10
x1 , x2 , x3 , x4 , sx5 , sx6 , sx7 0
x1 x3 x5 x6 0; x2 6, x4 7, x7 29; z 41.
Prof. C.W. Lim CA3122 Engineering Analysis Part 2: Operations Research 25
Solution:
Maximize z 2 x1 x2 5 x3
2 1 1
x1 x2 x3 10 4 x1 3 x2 6 x3 180
9 6 3
subject to 3 2 0
x1 x2 x3 15
x1 x2 45
9 6 3 8 x1 9 x2 12 x3 360
4 3 2
x1 x2 x3 20
9 6 3
Artificial variables are variables that assume the role of slacks at the
first iteration, only to be disposed of at a later iteration.
4 x1 3 x2 6
x1 2 x2 4
x1 , x2 0
Basic x1 x2 x3 R1 R2 x4 Solution
z -4 -1 0 -M -M 0 0
R1 3 1 0 1 0 0 3
R2 4 3 -1 0 1 0 6
x4 1 2 0 0 0 1 4
z (4 7 M ) x1 (1 4 M ) x2 Mx3 9 M
Iteration 1
Basic x1 x2 x3 R1 R2 x4 Solution
z 0 (1+5M)/3 -M (4-7M)/3 0 0 4+2M
x1 1 1/3 0 1/3 0 0 1
R2 0 5/3 -1 -4/3 1 0 2
x4 0 5/3 0 -1/3 0 1 3
Iteration 2
Basic x1 x2 x3 R1 R2 x4 Solution
z 0 0 1/5 8/5-M -1/5-M 0 18/5
x1 1 0 1/5 3/5 -1/5 0 3/5
x2 0 1 -3/5 -4/5 3/5 0 6/5
x4 0 0 1 1 -1 1 1
Iteration 3
Basic x1 x2 x3 R1 R2 x4 Solution
z 0 0 0 7/5-M -M -1/5 17/5
x1 1 0 0 2/5 0 -1/5 2/5
x2 0 1 0 -1/5 0 3/5 9/5
x3 0 0 1 1 -1 1 1
The use of the penalty M may not force the artificial variable
to zero level in the final simplex iteration. If the LP problem
does not have a feasible solution space (I.e., the constraints
are not consistent), then the final simplex iteration will
include at least one artificial variable at a positive level. This
is an indication that the problem has no feasible solution.
Phase I. Minimize r R1 R2
subject to 3 x1 x2 R1 3
4 x1 3 x2 x3 R2 6
x1 2 x2 x4 4
x1 , x2 , x3 , x4 , R1 , R2 0
Basic x1 x2 x3 R1 R2 x4 Solution
r 7 4 -1 0 0 0 9
R1 3 1 0 1 0 0 3
R2 4 3 -1 0 1 0 6
x4 1 2 0 0 0 1 4
Basic x1 x2 x3 R1 R2 x4 Solution
r 0 5/3 -1 -7/3 0 0 2
x1 1 1/3 0 1/3 0 0 1
R2 0 5/3 -1 -4/3 1 0 2
x4 0 5/3 0 -1/3 0 1 3