WEEK 2 - LP Formulation Examples and Graphical Solution
WEEK 2 - LP Formulation Examples and Graphical Solution
Objective
Max Z= 5x1 + 7x2 Function
s.t. x1 < 6
“Regular”
2x1 + 3x2 < 19
Constraints
x1 + x2 < 8
Non-negativity
x1 > 0 and x2 > 0
Constraints
4
2-4
Computer Solutions
LP problems involving 1000s of variables and 1000s
of constraints are now routinely solved with
computer packages.
Linear programming solvers are now part of many
spreadsheet packages, such as Microsoft Excel.
Leading commercial packages include CPLEX,
LINGO, MOSEK, Xpress-MP, and Premium
Solver for Excel.
In this course we will be using „QM for Windows‟
5
2-5
Example 1:
ABC Electronics
The product-mix problem at ABC Electronics
Two products
1. X-pod: a portable music player
2. BlueBerry: an internet-connected color
telephone
A) Develop an LP model to determine the mix of
products that will produce the maximum profit
under the following constraints:
B) Find the optimum solution using graphical
approach
2-6
Example 1:
ABC Electronics
Hours Required
to Produce 1 Unit
Electronic 4 3 240
Assembly 2 1 100
Profit per unit $7 $5
Table B.1
2-7
Steps to Formulate LP Model
Define the decision variables.
Define the objective function.
X1
11
2-11
A feasible solution does
not violate any of the
constraints
An infeasible solution
violates at least one of
the constraints
2-12
Graphical Solution: ABC Electronics
4X1 + 3X2 ≤ 240 (hours of electronic time)
2X1 + 1X2 ≤ 100 (hours of assembly time)
X2
100 –
–
Number of BlueBerrys
80 – Assembly (constraint B)
–
60 –
–
40 –
– Electronics (constraint A)
20 – Feasible
region
–
|– | | | | | | | | | | X1
0 20 40 50 60 80 100
Number of X-pods
© 2008 Prentice Hall, Inc. B – 13
Corner-Point Method
X2
100 –
2 –
Number of BlueBerrys
80 –
–
60 –
–
3
40 –
–
20 –
–
|– | | | | | | | | | | X1
1
0 20 40 60 80 100
4
Number of X-pods
© 2008 Prentice Hall, Inc. B – 14
Corner-Point Method
The optimal value will always be at a
corner point
Find the objective function value at each
corner point and choose the one with the
highest profit
1 + 3X2 ≤ 240
Find the4Xobjective (electronics
function valuetime)
at each
corner 2X 1 + 1X
point 2 ≤ 100
and (assembly
choose time)with the
the one
highest profit
4X1 + 3X2 = 240 4X1 + 3(40) = 240
- 4X1 - 2X2 = -200 4X1 + 120 = 240
Point 1 : (X1 = 0, X2 = 0) Profit $7(0) + $5(0) = $0
+ 1X2 = 40 X1 = 30
Point 2 : (X1 = 0, X2 = 80) Profit $7(0) + $5(80) = $400
Point 4 : (X1 = 50, X2 = 0) Profit $7(50) + $5(0) = $350
100 –
–
Number of BlueBerrys
80 –
–
60 –
$210 = $7X1 + $5X2
–
(0, 42) Iso-Profit Line
40 –
–
20 – (30, 0)
–
|– | | | | | | | | | | X1
0 20 40 60 80 100
Number of X-pods
© 2008 Prentice Hall, Inc. B – 20
Iso-Profit Line Method to Find the
Optimum Solution
X2
100 –
– $350 = $7X1 + $5X2
Number of BlueBeryys
80 –
– $280 = $7X1 + $5X2
60 –
$210 = $7X1 + $5X2
–
40 –
–
20 –
$420 = $7X1 + $5X2
–
|– | | | | | | | | | | X1
0 20 40 60 80 100
Number of X-pods
© 2008 Prentice Hall, Inc. B – 21
Iso-Profit Line Method to Find the
Optimum Solution
The optimal solution point is the last point the max
profit line touches on the boundary of the feasible
X2 solution area (corner points of the feasible space)
before it leaves the feasible solution area.
100 –
– Maximum profit line
Number of BlueBerrys
80 –
–
60 –
Optimal solution point
–
(X1 = 30, X2 = 40)
40 –
–
20 –
$410 = $7X1 + $5X2
–
|– | | | | | | | | | | X1
0 20 40 60 80 100
Number of X-pods
© 2008 Prentice Hall, Inc. B – 22
Example 2:
Beaver Creek Pottery Company
The company employs skilled artisans to
produce clay bowls and mugs with authentic
Native American designs and colors. The
two primary resources used by the company
are special pottery clay and skilled labor.
Given these limited resources, the company
desires to know how many bowls and mugs
to produce each day in order to maximize
profit. A) Formulate an LP model B) Find
the optimum solution using graphical
aproach
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 2-23
LP Model Formulation
A Maximization Example
Bowl 1 4 40
Mug 2 3 50
X2 is mugs
X1 is bowls
Figure 2.2 Coordinates for Graphical Analysis
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall 2-29
Labor Constraint
Graphical Solution of Maximization Model (2 of 12)
2-35
Example 3, Planting Crop
2-36
Example 3, Planting Crop
2-37
Example 3, Planting Crop
2-39
Slack Variables
A slack variable is added to a constraint to convert it
to an equation (=).
A slack variable typically represents an unused
resource.
A slack variable contributes nothing to the objective
function value.
Example: Producing Mugs and Bowls:
2-40
Example 2: Beaver Creek Pottery Company
LP Model in Standard Form
58
2-58
Graphical Solution of 2-variable LP Problems
Example 6
First Constraint Graphed
x2
8
7 x1 = 6
6 Shaded region
5 contains all
feasible points
4
for this constraint
3
2
(6, 0)
1
x1
1 2 3 4 5 6 7 8 9 10
59
2-59
Graphical Solution of 2-variable LP Problems
Example 6
Second Constraint Graphed
x2
8 (0, 6.33)
7
6
5
2x1 + 3x2 = 19
4
Shaded
3
region contains
2 all feasible points (9.5, 0)
1 for this constraint
x1
1 2 3 4 5 6 7 8 9 10
60
2-60
Graphical Solution of 2-variable LP Problems
Example 6
Third Constraint Graphed
x2
(0, 8)
8
7
6 x1 + x2 = 8
5
4
Shaded
3
region contains
2 all feasible points
1 for this constraint (8, 0)
x1
1 2 3 4 5 6 7 8 9 10
61
2-61
Graphical Solution of 2-variable LP Problems
Example 6
Combined-Constraint Graph Showing Feasible
Region x2
8
x1 + x2 = 8
7
6 x1 = 6
5
4
3
Feasible 2x1 + 3x2 = 19
2
Region
1
x1
1 2 3 4 5 6 7 8 9 10
62
2-62
Graphical Solution of 2-variable LP Problems
Example 6
Corner point B with maximum profit (46)
x2
gives the optimum solution Max Z= 5x1 +
7x2
8 x1= 5 , x2 = 3
7
A (0, 6.33)
6
5
4
B (5, 3)
3
Feasible C (6, 2)
2 Region
1 E (0, 0) D (6, 0)
x1
1 2 3 4 5 6 7 8 9 10
63
2-63
Summary
Linear Programming Problem
Formulation Examples
Graphical Solution Procedure for
2-variable LP Problems
Extreme Points and the Optimal Solution
LP Model in Standard Form