Professional Documents
Culture Documents
Lecture 3
Instructor:
Dr: Abdelhamid Mostafa
Linear Programming and the Simplex
Method
The simplex algorithm can solve any
kind of linear program, but it only
accepts a special form of the
program as input. So first we have
to do some manipulations. Recall
that the primal form of a linear
program was the following
maximization problem.
Example
• A Company produces two types of products. Type 1
requires 2 K.G of raw material, and 3 hours of direct
labor per unit . Type 2 requires 4 K.G of raw material, 2
hours of direct labor per unit . 32 K.G are available for
raw material and 36 hours for direct labor.
Each unit of Type 1 produces $24 profit, and each unit
of Type 2 yields $15 profit.
Use the Simplex Method to find the maximum profit
and the production schedule that will produce this
profit.
Let x1= number of units of type 1
x2= number of units of type 2
Maximize profit Z= 24x1+ 15x2
x1 x2 Availability
Raw material 2 4 32
Direct labor 3 2 36
10
Maximize Z= 24 x1 +15 x2
Where:
2 x1 +4 x2 ≤ 32
3 x1 +2 x2 ≤ 36
x1, x2 ≥0
Solution
• We can add a new variable (s), called a slack
variable, so that we get an equality:
2 x1 +4 x2 + s1 = 32
3 x1 +2 x2 + s2 = 36
s1= 32 ÷ 2 = 16
s2=36 ÷ 3 = 12 choose the least value