0% found this document useful (0 votes)
144 views

Module B PDF

Uploaded by

dudu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
144 views

Module B PDF

Uploaded by

dudu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Outline

Linear

MODULE
Programming ► Why Use Linear Programming?
► Requirements of a Linear
Programming Problem
► Formulating Linear Programming
OPSM 301
Problems
Koç University
► Graphical Solution to a Linear
Programming Problem
© 2014 Pearson Education, Inc.

OPSM 301 MB - 1 OPSM 301 MB - 2

Outline – Continued Learning Objectives


When you complete this chapter you
▶ Solving Minimization Problems should be able to:
▶ Linear Programming Applications
1. Formulate linear programming models,
▶ Excel Solver including an objective function and constraints
2. Construct and solve a minimization problem
3. Formulate production-mix, diet, and labor
scheduling problems
4. Formulate linear programming problems with
Excel Solver

OPSM 301 MB - 3 OPSM 301 MB - 4


Why Use Linear Programming? LP Applications
▶ A mathematical technique to help plan
1. Scheduling school buses to minimize total
and make decisions relative to the distance traveled
trade-offs necessary to allocate
resources 2. Allocating police patrol units to high crime
areas in order to minimize response time
▶ Will find the minimum or maximum to 911 calls
value of the objective 3. Scheduling tellers at banks so that needs
▶ Guarantees the optimal solution to the are met during each hour of the day while
model formulated minimizing the total cost of labor

OPSM 301 MB - 5 OPSM 301 MB - 6

LP Applications LP Applications
4. Selecting the product mix in a factory to 7. Developing a production schedule that will
make best use of machine- and labor- satisfy future demands for a firm’s product
hours available while maximizing the and at the same time minimize total
firm’s profit production and inventory costs
5. Picking blends of raw materials in feed 8. Allocating space for a tenant
mills to produce finished feed mix in a new shopping mall
combinations at minimum costs so as to maximize
revenues to the
6. Determining the distribution system that leasing company
will minimize total shipping cost

OPSM 301 MB - 7 OPSM 301 MB - 8


Requirements of an Requirements of an
LP Problem LP Problem
1. LP problems seek to maximize or 3. There must be alternative courses of
minimize some quantity (usually action to choose from
profit or cost) expressed as an
4. The objective and constraints in
objective function
linear programming problems must
2. The presence of restrictions, or be expressed in terms of linear
constraints, limits the degree to equations or inequalities
which we can pursue our objective

OPSM 301 MB - 9 OPSM 301 MB - 10

Formulating LP Problems Formulating LP Problems


▶ Glickman Electronics Example TABLE B.1 Glickman Electronics Company Problem Data
HOURS REQUIRED TO PRODUCE
ONE UNIT
► Two products AVAILABLE HOURS
DEPARTMENT X-PODS (X1) BLUEBERRYS (X2) THIS WEEK
1. Glickman x-pod, a portable music Electronic 4 3 240
player Assembly 2 1 100

2. Glickman BlueBerry, an internet- Profit per unit $7 $5

connected color telephone


Decision Variables:
► Determine the mix of products that will
X1 = number of x-pods to be produced
produce the maximum profit
X2 = number of BlueBerrys to be produced

OPSM 301 MB - 11 OPSM 301 MB - 12


Formulating LP Problems Formulating LP Problems
Objective Function: First Constraint:
Maximize Profit = $7X1 + $5X2 Electronic Electronic
time used is ≤ time available
There are three types of constraints
4X1 + 3X2 ≤ 240 (hours of electronic time)
► Upper limits where the amount used is ≤ the
amount of a resource
Second Constraint:
► Lower limits where the amount used is ≥ the
amount of the resource Assembly Assembly
time used is ≤ time available
► Equalities where the amount used is = the
amount of the resource 2X1 + 1X2 ≤ 100 (hours of assembly time)
OPSM 301 MB - 13 OPSM 301 MB - 14

Graphical Solution Graphical Solution


▶ Can be used when there are two decision
X2

variables 100 –

1. Plot the constraint equations at their limits by

Number of BlueBerrys
80 – Assembly (Constraint B)
converting each equation to an equality –
60 –
2. Identify the feasible solution space –

3. Create an iso-profit line based on the 40 –


Electronic (Constraint A)

objective function Feasible
20 –
region
4. Move this line outwards until the optimal –
point is identified |– | | | | | | | | | |
X1
0 20 40 60 80 100
Figure B.3 Number of x-pods
OPSM 301 MB - 15 OPSM 301 MB - 16
Graphical Solution Graphical Solution
X2 X2
Iso-Profit Line Solution Method
100 – 100 –
Choose a –possible value for the objective –
function80 –
Number of BlueBerrys

Number of BlueBerrys
Assembly (Constraint B) 80 –
– –
60 – $210 = 7X1 + 5X2 60 – $210 = $7X1 + $5X2
– –
(0, 42)
Solve for
40 the
– axis intercepts of the function and 40 –
plot the line
– Electronic (Constraint A) –
20 – Feasible 20 – (30, 0)
– X2 =
region 42 X1 = 30 –
|– | | | | | | | | | | X1 –
| | | | | | | | | | |
X1
0 20 40 60 80 100 0 20 40 60 80 100
Figure B.3 Number of x-pods Figure B.4 Number of x-pods
OPSM 301 MB - 17 OPSM 301 MB - 18

Graphical Solution Graphical Solution


X2 X2

100 – 100 –
– $350 = $7X1 + $5X2 – Maximum profit line
Number of BlueBerrys

Number of BlueBerrys
80 – 80 –
$280 = $7X1 + $5X2
– –
60 – $210 = $7X1 + $5X2 60 – Optimal solution point
– – (X1 = 30, X2 = 40)
40 – 40 –
– $420 = $7X1 + $5X2 – $410 = $7X1 + $5X2
20 – 20 –
– –
|– | | | | | | | | | | |
– | | | | | | | | | |
X1 X1
0 20 40 60 80 100 0 20 40 60 80 100
Figure B.5 Number of x-pods Figure B.6 Number of x-pods
OPSM 301 MB - 19 OPSM 301 MB - 20
Corner-Point Method Corner-Point Method
X2 X
► The optimal2
value will always be at a corner
100 – point 100 –
2 – 2 –
► Find the
80 objective function value at each
Number of BlueBerrys

Number of BlueBerrys
80 – –
– corner point
– and choose the one with the
60 – highest60profit

– –
3 3
40 – 40 –

Point 1 : (X1 –= 0, X2 = 0) Profit $7(0) + $5(0) = $0
20 – Point 2 : (X
201 –= 0, X2 = 80) Profit $7(0) + $5(80) = $400
– –
Point 4 : (X1 |= 50, X| 2 =| 0) Profit $7(50) +| $5(0) = $350
1 – 1 –
| | | | | | | | | | | | | | | | | |
X1 X1
0 20 40 60 80 100 0 20 40 60 80 100
4 4
Figure B.7 Number of x-pods Figure B.7 Number of x-pods
OPSM 301 MB - 21 OPSM
© 2014
301 Pearson Education, Inc. MB - 22

Corner-Point Method Corner-Point Method


X X
► The optimal 2
value will always be at a corner ► The optimal2
value will always be at a corner
Solve
point 100 for
– the intersection of two constraints point 100 –
2 – 2 –
Find the 4X1 + 3X2 ≤function
240 (electronic
valuetime)
► 80 objective at each ► Find the
80 objective function value at each
Number of BlueBerrys

Number of BlueBerrys
– –
2X
corner point + 1X ≤ 100 (assembly time)
– 1 and2 choose the one with the corner point
– and choose the one with the
highest60profit
– highest60profit

4X1–+ 3X2 = 240 4X1 + 3(40) = 240 –
3 3
– 4X
40 1–– 2X2 = –200 4X1 + 120 = 240 40 –
Point 1 : (X1 –= 0, X2 = 0) Profit $7(0) + $5(0) = $0 Point 1 : (X1 –= 0, X2 = 0) Profit $7(0) + $5(0) = $0
+ 1X2 = 40 X1 = 30
Point 2 : (X
201 –= 0, X2 = 80) Profit $7(0) + $5(80) = $400 Point 2 : (X
201 –= 0, X2 = 80) Profit $7(0) + $5(80) = $400
– –
Point 4 : (X1 |= 50, X| 2 =| 0) Profit $7(50) +| $5(0) = $350 Point 4 : (X1 |= 50, X| 2 =| 0) | | Profit $7(50) +| $5(0) = $350
1 – 1 –
| | | | | | | | | | | |
X1 X1
0 20 40 60 80 100 Point 3 : (X10= 30, 20
X2 = 40) 40 60 80 100
4 4 Profit $7(30) + $5(40) = $410
Figure B.7 Number of x-pods Figure B.7 Number of x-pods
OPSM
© 2014
301 Pearson Education, Inc. MB - 23 OPSM
© 2014
301 Pearson Education, Inc. MB - 24
Minimization Example Minimization Example
X2
X1 = number of tons of black-and-white picture Figure B.9
chemical produced 60 – X1 + X2 = 60

X2 = number of tons of color picture chemical 50 –


produced Feasible
40 – region
Minimize total cost = 2,500X1 + 3,000X2
30 –
Subject to: b
X1 ≥ 30 tons of black-and-white chemical 20 –
X2 ≥ 20 tons of color chemical a
10 – X1 = 30
X1 + X2 ≥ 60 tons total X2 = 20
X1, X2 ≥ $0 nonnegativity requirements –
| | | | | | |
X1
0 10 20 30 40 50 60
OPSM 301 MB - 25 OPSM 301 MB - 26

Minimization Example LP Applications


Production-Mix Example
DEPARTMENT
Total cost at a = 2,500X1 + 3,000X2 UNIT
PRODUCT WIRING DRILLING ASSEMBLY INSPECTION PROFIT
= 2,500(40) + 3,000(20) XJ201 .5 3 2 .5 $ 9
= $160,000 XM897 1.5 1 4 1.0 $12
TR29 1.5 2 1 .5 $15
Total cost at b = 2,500X1 + 3,000X2 BR788 1.0 3 2 .5 $11
= 2,500(30) + 3,000(30)
DEPARTMENT CAPACITY (HRS) PRODUCT MIN PRODUCTION LEVEL
= $165,000 Wiring 1,500 XJ201 150
Drilling 2,350 XM897 100

Lowest total cost is at point a Assembly 2,600 TR29 200


Inspection 1,200 BR788 400

OPSM 301 MB - 27 OPSM 301 MB - 28


LP Applications LP Applications
X1 = number of units of XJ201 produced
X2 = number of units of XM897 produced Cattle Diet Problem Example
X3 = number of units of TR29 produced
X4 = number of units of BR788 produced
FEED
Maximize profit = 9X1 + 12X2 + 15X3 + 11X4 INGREDIENT STOCK X STOCK Y STOCK Z
A 3 oz 2 oz 4 oz
subject to .5X1 + 1.5X2 + 1.5X3 + 1X4 ≤ 1,500 hours of wiring
3X1 + 1X2 + 2X3 + 3X4 ≤ 2,350 hours of drilling B 2 oz 3 oz 1 oz
2X1 + 4X2 + 1X3 + 2X4 ≤ 2,600 hours of assembly C 1 oz 0 oz 2 oz
.5X1 + 1X2 + .5X3 + .5X4 ≤ 1,200 hours of inspection D 6 oz 8 oz 4 oz
X1 ≥ 150 units of XJ201
The cost per pound of grains X, Y, and Z is $0.02, $ 0.04, and $0.025,
X2 ≥ 100 units of XM897
respectively. The minimum requirement per cow per month is 64
X3 ≥ 200 units of TR29 ounces of ingredient A, 80 ounces of ingredient B, 16 ounces of
X4 ≥ 400 units of BR788 ingredient of C, and 128 ounces of ingredient of D. The amount of
X1, X2, X3, X4 ≥0 ingredient Z is limited to 5 pounds or 80 ounces per cow per month.
OPSM 301 MB - 29 OPSM 301 MB - 30

LP Applications LP Applications
Labor Scheduling Example (details in the text book)
X1 = number of pounds of stock X purchased per cow each month
X2 = number of pounds of stock Y purchased per cow each month
NUMBER OF NUMBER OF
X3 = number of pounds of stock Z purchased per cow each month TIME PERIOD TELLERS REQUIRED TIME PERIOD TELLERS REQUIRED
9 a.m.–10 a.m. 10 1 p.m.–2 p.m. 18
Minimize cost = .02X1 + .04X2 + .025X3 10 a.m.–11 a.m. 12 2 p.m.–3 p.m. 17
11 a.m.–Noon 14 3 p.m.–4 p.m. 15
Ingredient A requirement: 3X1 + 2X2 + 4X3 ≥ 64
Noon–1 p.m. 16 4 p.m.–5 p.m. 10
Ingredient B requirement: 2X1 + 3X2 + 1X3 ≥ 80
Ingredient C requirement: 1X1 + 0X2 + 2X3 ≥ 16
F = Full-time tellers
Ingredient D requirement: 6X1 + 8X2 + 4X3 ≥ 128
P1 = Part-time tellers starting at 9 AM (leaving at 1 PM)
Stock Z limitation: X3 ≤5
P2 = Part-time tellers starting at 10 AM (leaving at 2 PM)
X1, X2, X3 ≥0
P3 = Part-time tellers starting at 11 AM (leaving at 3 PM)
Cheapest solution is to purchase 40 pounds of stock X P4 = Part-time tellers starting at noon (leaving at 4 PM)
at a cost of $0.80 per cow P5 = Part-time tellers starting at 1 PM (leaving at 5 PM)
OPSM 301 MB - 31 OPSM 301 MB - 32
LP Applications LP Applications
Minimize total daily Minimize total daily
= $75F + $24(P1 + P2 + P3 + P4 + P5) = $75F + $24(P1 + P2 + P3 + P4 + P5)
manpower cost manpower cost
F + P1 ≥ 10 (9 AM - 10 AM needs) F + P1 ≥ 10 (9 AM - 10 AM needs)
F + P1 + P2 ≥ 12 (10 AM - 11 AM needs) F + P1 + P2 ≥ 12 (10 AM - 11 AM needs)
1/2 F + P1 + P2 + P3 ≥ 14 (11 AM - 11 AM needs) 1/2 F + P1 + P2 + P3 ≥ 14 (11 AM - 11 AM needs)
1/2 F + P1 + P2 + P3 + P4 ≥ 16 (noon - 1 PM needs) 1/2 F + P1 + P2 + P3 + P4 ≥ 16 (noon - 1 PM needs)
F + P2 + P3 + P4 + P5 ≥ 18 (1 PM - 2 PM needs) F + P2 + P3 + P4 + P5 ≥ 18 (1 PM - 2 PM needs)
F + P3 + P4 + P5 ≥ 17 (2 PM - 3 PM needs) F + P3 + P4 + P5 ≥ 17 (2 PM - 3 PM needs)
F + P4 + P5 ≥ 15 (3 PM - 7 PM needs) F + P4 + P5 ≥ 15 (3 PM - 7 PM needs)
F + P5 ≥ 10 (4 PM - 5 PM needs) F + P5 ≥ 10 (4 PM - 5 PM needs)
F ≤ 12 F ≤ 12

4(P1 + P2 + P3 + P4 + P5) ≤ .50(10 + 12 + 14 + 16 + 18 + 17 + 15 + 10) 4(P1 + P2 + P3 + P4 + P5) ≤ .50(112)


F, P1, P2, P3, P4, P5 ≥ 0

OPSM 301 MB - 33 OPSM 301 MB - 34

LP Applications The Simplex Method


There are two alternate optimal solutions to this ▶ Real world problems are too complex to
problem but both will cost $1,086 per day be solved using the graphical method
First Second ▶ The simplex method is an algorithm for
Solution Solution
solving more complex problems
F = 10 F = 10
P1 = 0 P1 = 6 ▶ Developed by George Dantzig in the late
P2 = 7 P2 = 1 1940s
P3 = 2 P3 = 2
P4 = 2 P4 = 2 ▶ Most computer-based LP packages use
P5 = 3 P5 = 3 the simplex method

OPSM 301 MB - 35 OPSM 301 MB - 36

You might also like