Académique Documents
Professionnel Documents
Culture Documents
OPTIMIZATION
Linear Programming
1
LEARNING OUTCOMES
At the end of the topic, students are able:
• Understand why and where optimization occurs
in engineering problem solving. (CO1-PO2)
• Understand the major elements of the general
optimization problem: objective function,
decision variables, and constraints. (CO1-PO2)
• To adopt and apply Simplex Method to solve
linear programming problems. (CO2-PO2, CO2-
PO4)
Standard Form
Basic linear programming problem consists of two major
parts:
– The objective function
– A set of constraints
Maximise Z c1 x1 c2 x2 ...... cn xn
ai1 x1 ai 2 x2 ain xn bi
Where aij=amount of the ith resource that is consumed
for each unit of the jth activity and bi=amount of the
ith resource that is available
Fig 15.2
SIMPLEX METHOD
• Assumed that the optimal solution is an
extreme point.
8
• A slack variable measures how much of a
constrained resource is available, e.g.,
7x1+ 11 x2 ≤ 77
If a slack variable S1 is defined as amount of
raw gas that is not used for a particular
production level (x1, x2) and add it to the left side
of the constraint, it makes the relationship exact.
i.e. 7x1+ 11 x2 + S1 = 77
10
Solution:
Formulate the LP with the objective function
Z subject to the constraints.
Z 150x1 175x2
7 x1 11x2 77
10 x1 8 x2 80
x1 9
x2 6
x1 , x 2 , S1 , S 2 , S 3 , S 4 0 11
Introduce Slack
variables
Z 150 x1 175 x2
7 x1 11x2 S1 77
10 x1 8 x2 S2 80
x1 S3 9
x2 S4 6
x1 , x 2 , S1 , S 2 , S 3 , S 4 0
12
STEPS :
1. Draw a ‘tableau’ with all the non-basic variables,
the Solution and Intercept columns.
Number of rows and columns depend on total no.
of slack variables.
TABLEAU 1
Z 150 x1 175 x2 0
#2
Basic Solu- Inter-
Z x1 x2 S1 S2 S3 S4
tion cept
Z 1 -150 -175 0 0 0 0 -
S1 0 7 11 1 0 0 0 77
S2 0 10 8 0 1 0 0 80
S3 0 1 0 0 0 1 0 9
S4 0 0 1 0 0 0 1 6
14
#4:
77 / 7 = 11
#3
Basic Z x1 x2 S1 S2 S3 S4 Soln Inter-
cept
Z 1 -150 -175 0 0 0 0 - -
S1 0 7 11 1 0 0 0 77 11
S2 0 10 8 0 1 0 0 80 8
S3 0 1 0 0 0 1 0 9 9
S4 0 0 1 0 0 0 1 6
5. Choose the smallest positive number from the intercept
column (i.e. = 8). Find the corresponding value in the x1
column (= 10).
The related slack variable is S2 (termed as LEAVING
VARIABLE). This will be replaced with x1 in the next
#5
tableau.
S1 0 7 11 1 0 0 0 77 11
S2 0 10 8 0 1 0 0 80 8
S3 0 1 0 0 0 1 0 9 9
S4 0 0 1 0 0 0 1 6 16
6. Need to transform 10 to 1, i.e. divide all elements in that
row by 10, termed as normalise.
7. All other elements in that x1 column must be transformed
into zeros.
R2 S1 0 7 11 1 0 0 0 77 11
R3 S2 0 10 8 0 1 0 0 80 8
R4 S3 0 1 0 0 0 1 0 9 9
R5 S4 0 0 1 0 0 0 1 6
17
8. Draw a new TABLEAU 2, x1 replaces S2 in the row
heading.
To perform no. 6, normalise the intersect value, where R3 = R3* / 10
* coefficients in previous Tableau
R2 S1 0
R3 x1 0 1 0.8 0 0.1 0 0 8
R4 S3 0
R5 S4 0
18
E.g. To transform Z function at the entering variable (i.e. -150
to make as zero, all elements in R1 must be transform
using general equation of : R1 = R1* -(-150/1x R3)
where R3 = current coefficient and
R1* = previous coefficient
Similarly, find for all other coeffs. in the Z row.
#7
Basic Soln Inter-
Z x1 x2 S1 S2 S3 S4
cept
Z 1 0 -55 0 15 0 0 1200 -
R1
R2 S1
R3 x1 0 1 0.8 0 0.1 0 0 8
R4 S3
R5 S4 19
For other rows :
R2 = R2* -(7/1 x R3), R4 = R4*- (1/1 x R3)
R5 remains the same since element is already zero.
R2 S1 0 0 5.4 1 -0.7 0 0 21
R3 x1 0 1 0.8 0 0.1 0 0 8
R4 S3 0 0 -0.8 0 -0.1 1 0 1
R5 S4 0 0 1 0 0 0 1 6
20
9. Check for other negative values in the Z function row.
x2 is now the entering variable. Repeat the process;
calculate the intercepts and find the smallest positive
number. Thus S1 is the ‘leaving variable’ and change to x2
for next Tableau.
S1 0 0 5.4 1 0 0 0 21 3.889
x1 0 1 0.8 0 1 0 0 8 10
S3 0 0 -0.8 0 0 1 0 1 -1.25
S4 0 0 1 0 0 0 1 6 6
21
10. Draw a new TABLEAU 3.
R2 = R2* / 5.4, R1 = R1* -(-55/1x R2),
R3 = R3* - (0.8xR2)
R4 = R4* - (- 0.8x R2), R5 = R5* - R2
# 11 Basic Soln Inter
Z x1 x2 S1 S2 S3 S4
-cept
0 0 10.1855 7.8704 0 0 1413.889 -
R1 Z 1
0 0 1 0.1852 -0.1296 0 0 3.8889
R2 x2
0 1 0 -0.1481 0.2037 0 0 4.8889
R3 x1
0 0 0 0.1481 -0.2037 1 0 4.111
R4 S3
0 0 0 -0.1852 0.1296 0 1 2.1111
R5 S4
22
11. If there are no other negative unknown
values (in this case x1 and x2) in the Z
row, stop the work.
23
Exercise 15.3
Maximise f(x,y) = 1.75 x + 1.25 y
Subject to :
1.2 x + 2.25 y < 14
x + 1.1y < 8
2.5x + y < 9
x > 0, y > 0
24
SOLUTION :
1.2 x 2.25 y S1 14
x 1.1y S2 8
2.5 x y S3 9
x, y, S1 , S 2 , S3 0
25
TABLEAU 1:
Basic
Z x y S1 S2 S3 Solu Inter-
-tion cept
Z 1 -1.75 -1.25 0 0 0 -
R1
S1 0 1.2 2.25 1 0 0 14 11.667
R2
R3 S2 0 1.0 1.1 0 1 0 8 8
R4 S3 0 2.5 1 0 0 1 9 3.6
28
TABLEAU 3:
Basic
Z x y S1 S2 S3 Solu Inter-
-tion cept
1 0 0 0.3107 0 0.5508 9.3079
Z
0 0 1 0.5649 0 0.2712 5.4689
y
0 0 0 - 1 -0.2102 0.5717
S2 0.3955
EXERCISE:
Do Problems 15.1 (a, c, e), 15.12, 16.16
30
Problem 15.1
a) Set up linear programming:
Say, xa = amount of product A produced,
xb = amount of product B produced.
The objective function is to maximize profit,
P 45xa 20xb
subject to the following constraints:
20xa 5xb 9500 {raw materials}
0.04xa 0.12xb 40 {productio n time}
x a x b 550 {storage}
x a , xb 0 {positivity}
b) To solve graphically, the constraints can
be reformulated as the following straight
lines
xb 1900 – 4 xa {raw materials}
xb 333.3333- 0.33333xa {production time}
xb 550 - xa {storage}
mater
st
time
22,5
or
300
ag
ial
00
e
optimum
200
P=
P=
15,0
7,50
100
00
0
xa
0
0 200 400 600
14 8 9 0
Z -14 -8 -9 0 0
1.458
S1 1.2 1 2.5 1 0 1.75
Tableau 2
= X =Y
40
Note: Convenient to use EXCEL Solver
Inequalities follow
original functions