Linear Programming
Linear Programming
CHAPTER 2
● Production Planning
● Marketing Mix
● Product Distribution
Example of Problem that can be
Efficiently Solved Using L.P Technique
● Manufacturing Problem
● Advertising Application
● Portfolio Selection
● Staffing Problem
Linear Programming:
MODEL
FORMULATION
A linear programming model is
m ad e up o f s e v e r a l c o m m o n
components.
The model’s components include:
1. Decision Variables
2. Objective Function
3. Model Constraints
4. Non-negativity Constraints
Sample Problem
One kind of cake requires 200g of flour and
25g of fat, and another kind of cake requires
100 g of flour and 50 g of fat Find the
maximum number of cakes that can be
made from 5 kg of flour and 1 kg of fat
assuming that there is no shortage of the
other ingredients, used in making the cakes.
DECISION VARIABLES
● The variables should completely describe
the decision to be made by the management.
X= cake no.1
Y= cake no. 2
OBJECTIVE FUNCTION
● are linear mathematical relationships
that describes the firm’s objective in
terms of decision variables.
Z =X
+Y
CONSTRAINTS
● are also linear relationships between
decision variables.
X, Y ≥ 0
Steps in LP Mathematical Formulation
1) Clearly define the decision variables
2) Construct the objective function
3) Formulate the constraints
LP Model Formulation
A Maximization Example
● Beaver Creek Pottery Company
● How many bowls and mugs should be produced to
MAXIMIZE profits given labor and materials constraints?
● Product resource requirements and unit profit:
LP Mathematical Formulation
LP Mathematical Formulation
LP Solutions
FEASIBLE SOLUTION - does not violate ANY of
the constraints
Plotting these
points on the
g r a p h a n d
connecting them
with a line gives
the constraint
line and area for
clay, as shown in
Figure 2.5.
Graphical Solution of a Maximization Model
Combining the
two individual
graphs for both
labor and clay
(Figures 2.3 and
2.5) produces a
graph of the
model constraints,
as shown in
Figure 2.6.
The Optimal Solution Point
Figure 2.12
s h o w s t h e
solution values
for all three
points, A, B, and
C, and the
amount of profit,
Z, at each point.
Slack Variables
A slack variable is a variable that is added to an inequality
constraint to transform it into an equality.
In our example, a slack variable would mean a portion of
unused resources, say, an unused labor or unused clay.
The complete linear programming model can be written in what
is referred to as standard form with slack variables as follows:
maximize Z = $40x₁ + $50x₂ + 0s₁ + 0s₂
subject to
x₁ + 2x₂ + s₁ = 40
4x₁ + 3x₂ + s₂ = 120
x₁ , x₂ , 0s₁ , 0s₂ ≥ 0
The Solution Values cont.
The solution values, including the slack at each solution point,
are summarized as follows:
Solution to get the slack variables
Solution:
Point A
Labor (hr.)
x₁ = 0 bowl
x₂ = 20 mugs
x₁ + 2x₂ + s₁ = 40 (constraint 1)
1(0) + 2(20) + s₁ = 40
40 + s₁ = 40
s₁ = 0
Solution to get the slack variables
Solution:
Point A
Clay (lb.)
x₁ = 0 bowl
x₂ = 20 mugs
x₁ = 24 bowls
x₂ = 8 mugs
x₁ + 2x₂ + s₁ = 40 (constraint 1)
24 + 2(8) + s₁ = 40
24 + 16 + s₁ = 40
40 + s₁ = 40
s₁ = 0
Solution to get the slack variables
Solution:
Point B
Clay (lb.)
x₁ = 24 bowls
x₂ = 8 mugs
x₁ = 30 bowls
x₂ = 0 mug
x₁ + 2x₂ + s₁ = 40 (constraint 1)
30 + 2(0) + s₁ = 40
30 + s₁ = 40
s₁ = 10
Solution to get the slack variables
Solution:
Point C
Clay (lb.)
x₁ = 30 bowls
x₂ = 0 mug
Figure 2.14
s h o w s t h e
g r a p h i c a l
solution of this
example, with
slack variables
included at each
solution point.
Sample problem # 2
Maximize Z= X +Y
Subject to:
200x + 100y ≤ 5000 or 2x + y ≤ 50
25x + 50y ≤ 1000 or x + 2y ≤ 40
Also, x > 0 and y > 0
wherein
x is the number of first kind cake produced
y is the number of second kind cake produced
Sample problem # 2
2x + y = 50 2x + y = 50
2(0) + y = 50 2x + 0 = 50
Y = 50 2x = 50
0, 50 x=25
25, 0
X + 2y = 40
0 + 2y = 40 X + 2y = 40
2y= 40 X + 2(0) = 40
y=20 X = 40
0, 20 40, 0
Sample problem # 2
Sample problem # 2
● 2x + y + 50 (40 - 2y = 25 - (y/2) ) 2x + y = 50
2
2x = 50 - y 2x + 10 = 50
80 - 4y = 50 - y
X = 25 - (y/2) 2x = 50 -
● X + 2y = 40
80 - 50 = -y + 4y
30 = 3y 10
X = 40 - 2y 10 = y 2x = 40
X = 20
Sample problem # 2
Z = x + y.
Wherein z is the
maximum number of
cakes to produce.
● Z = 0 + 20 = 20
● Z = 20 + 10 = 30
● Z = 25 + 0 = 25
Solution to get the slack variables
Solution: Solution:
Point A Point A
Flour Fat
x = 0 first cake x = 0 first cake
y = 20 second cake y = 20 second cake
2x + y + S1 = 50 x + 2y + s2 = 40
2(0) + 20 + S1 = 50 2(0) + 20 + S2 = 40
20 + S1 = 20 + S2 =
50 40
` `
S1= 50 - 20 S2= 40 - 20
S1 S2
Solution to get the slack variables
Solution: Solution:
Point B Point B
Flour Fat
x = 20 first cake x = 20 first cake
y = 10 second cake y = 10 second cake
2(20) + 10 + S1 = 50 x + 2y + s2 = 40
2(20) + 10 + S1 = 50 20 + 2(10) + S2 = 40
40+ 10 + S1 = 50 20 + 20 + S2 = 40
` S1= `
50 - 50 S2= 40 - 40
S1 = S2
0g =0g
Solution to get the slack variables
Solution: Solution:
Point C Point C
Flour Fat
x = 25 first cake x = 25 first cake
y = 0 second cake y = 0 second cake
2(25) + 0 + S1 = 50 x + 2y + s2 = 40
50 + S1 = 50 25 + 2(0) + S2 = 40
` S1= 25 + S2 = 40
50 - 50 `
S1 = S2= 40 - 25
0g S2
= 15 g
The steps for solving a graphical linear programming model
are summarized here:
2. Plot the objective function; then, move this line out from the
origin to locate the optimal solution point.
Outcome
Group Test 1 Test 2 Test 3
A 95/100 55/100 80/100
01 02
A general mathematical Applicable to any problem
solution technique for that can be formulated in
solving linear programming terms of linear objective
problems with a larger function, subject to a set
number of variables. of linear constraints.
Software Packages in Simplex Method
https://youtu.be/rQt_SWrOktg https://youtu.be/HoZcs8s6UU0
Resources
⁕ https://youtu.be/rQt_SWrOktg
⁕ https://youtu.be/HoZcs8s6UU0