Uploaded by IRISH LEE MARTIN

Linear Programming Models with Examples

advertisement
Chapter 2 The Linear Programming Model
Section 2.1 The Blending Model
Problem: to determine how much of each of the ingredients to blend together so that the total cost
of the mixture is minimized while the composition of the mixture satisfies specified requirements.
Example 1 To feed his stock a farmer can purchase two kinds of feed. His requirement is (per
day)
60 units of nutritional element A,
84 units of nutritional element B,
72 units of nutritional element C.
The contents and cost of a pound of the two feeds are given in the following table.
x
y
Feed 1
Feed 2
Nutritional Elements (units/lb)
A
B
C
3
7
3
2
2
6
Cost (cent/lb)
10
4
The farmer wants to determine the least expensive way of providing an adequate diet by combining
the two feeds.
Formulate the mathematical model.
Variables:
x the number of pounds of Feed 1,
y the number of pounds of Feed 2.
Cost function
f ( x, y ) = 10 x + 4 y
Constraints:
3x + 2 y ³ 60 --nutritional elements A requirement
7 x + 2 y ³ 84 --nutritional elements B requirement
3x + 6 y ³ 72 --nutritional elements C requirement
x, y ³ 0 .
Þ Mathematical model:
Minimize f ( x, y ) = 10 x + 4 y
Subject to
3x + 2 y ³ 60
7 x + 2 y ³ 84
3x + 6 y ³ 72
x, y ³ 0 .
Geometric solution
The hatched region is the set of all
diets that satisfy all nutritional
requirements.
The problem ® to determine the minimum of
f ( x, y ) in the hatched region.
Iso-cost lines: 10 x + 4 y = C
C is any positive constant
All iso-cost lines have
5
the same slope = - < 0 .
2
¯
As C , the line moves to the left.
The problem ® to seek the line farthest to the left
and still intersects the hatched region.
The line through the point (6, 21) is the line that we
seeked.
So, the minimal diet is:
6 lb of Feed 1, and
21 lb of Feed 2.
The minimal cost is
= 10 × 6 + 4 × 21 = 144 cents
Example 2 A landscaper has on hand two grass seed blends. Blend I contains 60% bluegrass seed,
10% fescue, and costs 80$/lb; Blend II contains 20% bluegrass seed, 50% fescue, and costs 60$/lb.
(Each also contains other types of seeds and inert materials). The field about to be sowed requires
a composition of seeds consisting of at least 30% bluegrass and 26% fescue. What is the least
expensive combination of the two blends that meets these requirements?
Ambiguities can arise because the problem involves percentages. To avoid these, fix an
amount of the final product. For example, let the number of pounds of the required composition
be 100.
Variables:
x the number of pounds of Blend I ,
y the number of pounds of Blend II .
Þ Mathematical model:
Minimize the cost function
C ( x, y ) = 0.8 x + 0.6 y
Subject to
30% bluegrass requirement
26% fescue
x < 1500
0.10 x + 0.50 y ³ 26 Þ x + 5 y ³ 260
x + y = 100
x, y ³ 0 .
the direction for
C to reduce
The set of all points that satisfy the constraints is given
graphically by the line segment between (25, 75) and
(60, 40).
The isocost line 0.8 x + 0.6 y = C has the slope -
4
< 0.
3
As C¯, the line moves to the left.
Thus minimum of the cost function is (25, 75).
That is, the minimum cost prescription is to use 25% Blend I and 75% Blend II.
Section 2.2 The Production Model
Problem: To determine a way of operating a system (operation or production system) that
maximizes profit using limited resources or minimizes costs while meeting special production
requirements.
Example 1a Suppose a boat manufacturer produces two types of boats: a family rowboat and a
sport canoe. The boats are molded from aluminum by means of a large pressing machine and are
finished by hand labor.
A rowboat requires:
50 lb of aluminum, 6 min of machine time, and
3 hr of finishing labor.
A canoe requires:
30 lb of aluminum, 5 min of machine time, and
5 hr of finishing labor.
For the next 3 months the company can commit up to 2000 lb of aluminum, 5 hr of machine time
and 200 hr of labor for the manufacture of the two types of boats. The company realizes $50 profit
on the sale of a rowboat and $60 profit on the sale of a canoe. Assuming that all boats made can
be sold, how many of each type should be manufactured in the next 3 months in order to maximize
profits?
Variables:
R -- the number of rowboats,
C -- the number of canoes.
Profit function: 50R + 60C.
Þ Mathematical model:
Maximize 50 R + 60C
Subject to
50 R + 30C £ 2000 (aluminum limited)
6 R + 5C £ 300 (machine time limited)
3R + 5C £ 200 (finishing labor limited)
R, C ³ 0 .
Example 1b In the above example, the $50 and $60 profit estimates would be determined by
subtracting production and delivery costs from the selling price of each of the two types of boats
(that is, profit = revenue-cost). Suppose now that the cost to the manufacturer of the 1 ton of
aluminum is not fixed. In particular, assume that the price per pound of the last 500 lb of aluminum
is 20¢/lb more than the price of the first 1500 lb, and that the price of the first 1500 lb was the cost
used in determining the $50 and $60 profit estimates.
With this increment in cost of the last 500 lb of aluminum, what is the optimal production
schedule?
Variables:
R the number of row boats,
C the number of canoes,
x the amount (in lb) of aluminum used over 1500 lb.
Þ Mathematical model:
Maximize 50 R + 60C - 0.2 x
Subject to
50 R + 30C £ 1500 + x
6 R + 5C £ 300
3R + 5C £ 200
x £ 500
R, C , x ³ 0.
Example 1C If the price of the last 500 lb of aluminum is 20¢ less than the price of the first
1500 lb, what is the optimal production schedule?
Let R and C be as before, and let
x ~ lb of aluminum bought at regular price;
y ~ lb of aluminum bought at discount price (less $0.2/lb)
Profit function: 50R + 60C + 0.2y
(to be maximized)
Constraints:
50R + 30C = x + y (aluminum used)
6R + 5C £ 300
3R + 5C £ 200
x £ 1500, y £ 500, R,C, x, y ³ 0.
Also,
y > 0 only if x = 1500.
(1)
How to realize the request (1)? We may introduce variable z asking that:
if
x = 1500
ì1
z=í
(*)
if
x < 1500
î0
and
y £ 500 z .
But how to make z satisfy (*)? We may add two constraints:
x
z£
, and z is a 0−1 variable.
1500
Then (*) can be satisfied when we maximize the profit function (consider why it is true).
Therefore, the model is:
Max 50R + 60C + 0.2y
Subject to
50R + 30C = x + y
6R + 5C £ 300
3R + 5C £ 200
x £ 1500
y £ 500z
x
z £
1500
R, C, x, y ³ 0; 0 £ z £1 & integral.
Example 2 Consider the operation of a division in a large plant. The division is responsible for
manufacturing two parts of the plant’s final product. The division manager has available four
different processes to produce these two parts; each process uses various amounts of labor and two
raw materials. The inputs and outputs for 1 hr of each of the four processes are given in the
following table.
Run
per hour of
Process
1
2
3
4
Input
Labor
Raw Material A
(man-hour)
(lb)
20
160
30
100
10
200
25
75
1000 (+200)
8000
Raw Material B
(lb)
30
35
60
80
4000
Output
Units of Units of
Part 1
Part 2
35
55
45
42
70
0
0
90
The division is responsible for producing each week
2100 units of Part 1, and 1800 units of Part 2.
The division manager has at her disposal each week
4 tons (i.e.8000 lbs)of Raw Material A,
2 tons (i. e. 4000 lbs) of Raw Material B,
1000 man-hours of labor.
One pound of Raw Material A costs the firm $3, and
One pound of Raw Material B costs the firm $7.
Because of labor contracts, the plant must pay its employees a full week’s salary, regardless of
whether or not the employees are used that week, and so the cost of the 1000 man-hours of labor
is fixed.
However, the division manager can request her workers to work up to an extra 200 man-hours per
week in overtime, at a cost of $8/hr to the firm.
The plant vice-president in charge of production wants to know:
1. if the division can meet its weekly production requirements with the material on hand without
using overtime and, if so, the minimal cost of this operation.
2. And, because the decision to allow overtime must be made at the plant level, the vice-president
also wants to have some estimate on how much money, if any, the division can save by using
overtime.
First model: (overtime is not used)
Variables:
xi the number of hours a week that Process i is used, i = 1, 2, 3, 4.
Þ The first model:
lb of R.M. A
Minimize the cost function
f ( x1 , x 2 , x3 , x 4 )
= 3(160 x1 + 100 x 2 + 200 x3 + 75 x 4 )
+ 7(30 x1 + 35 x 2 + 60 x3 + 80 x 4 )
lb of
R.M. B = 690 x + 545 x + 1020 x + 785 x
1
2
3
4
Subject to
20 x1 + 30 x2 + 10 x3 + 25 x4 £ 1000
(labor)
160 x1 + 100 x2 + 200 x3 + 75 x4 £ 8000
(R.M .A)
30 x1 + 35 x2 + 60 x3 + 80 x4 £ 4000
(R.M .B)
35 x1 + 45 x2 + 70 x3
³ 2100
(Pa rt 1)
+ 90 x4 ³ 1800
(Pa rt 2)
55 x1 + 42 x2
x1 , x2 , x3 , x4 ³ 0.
Second model: (overtime can be used)
Introduce a new variable:
x5 -- the number of hours of overtime used
Þ the second model
Minimize g ( x1 , x2 , x3 , x4 , x5 ) = 8 x5 + f ( x1 , x2 , x3 , x4 )
= 8 x5 + 690 x1 + 545 x 2 + 1020 x3 + 785 x 4
Subject to
20 x1 + 30 x 2 + 10 x3 + 25 x 4 £ 1000 + x5
160 x1 + 100 x 2 + 200 x3 + 75 x 4 £ 8000
30 x1 + 35 x 2 + 60 x3 + 80 x 4 £ 4000
35 x1 + 45 x 2 + 70 x3
55 x1 + 42 x 2
x1 , x 2 , x3 , x 4 ³ 0,
³ 2100
+ 90 x 4 ³ 1800
x5 £ 200.
Section 2.3 The Transportation Model
Problem To determine a shipping schedule that minimizes transportation costs. Assume that the
costs of shipping goods from a source to a destination are directly proportional to the amount of
goods shipped.
Example A paper manufacturer having two mills must supply weekly three printing plants with
newsprint. Mill 1 produces 350 tons of newsprint a week and Mill 2, 550 tons. Plant 1 requires
300 tons/week, Plant 2, 400 tons, and Plant 3, 200 tons. The shipping cost, in dollars per ton, are
given in the following table.
Paper
Mills
1
2
1
17
18
Plants
2
22
16
3
15
12
The problem is to determine how many tons each mill should ship to each plant so that the total
transportation cost is minimal.
Variables:
xij -- the amount (in tons) to be shipped (weekly) from Mill i to Plant j ,
i = 1, 2, j = 1, 2, 3.
Þ
Mathematical model:
Minimize the shipping cost
17 x11 + 22 x12 + 15 x13 + 18 x 21 + 16 x 22 + 12 x 23
Subject to
x11 + x12 + x13 = 350
(product of Mill 1)
x21 + x22 + x23 = 550
(product of Mill 2)
x11 + x21 = 300
(requirement of Plant 1)
x12 + x22 = 400
(requirement of Plant 2)
x13 + x23 = 200
(requirement of Plant 3)
xij ³ 0,
i = 1, 2,
j = 1, 2, 3 .
Unbalanced Transportation Problem
In the above problem,
Total Supply = Total Demand (= 900 Tons).
Such problem is called balanced transportation problem.
If now Mill 1 produces 450 tons of newsprint a week, and other supply and demand have no
change, then
Total Supply = 1000 (Ton) > 900 (Ton) = Total Demand.
We call such problem an unbalanced problem.
An unbalanced transportation problem can be transferred into a balanced one by introducing a
dummy plant (demand). Here we introduce the plant 4, which is an imaginary one, and let its
demand be:
Dummy Demand = Total Supply – Total Actual Demand (=100 Ton).
Let the shipping cost from the two mills to the dummy plant be 0. That is, the table above is
extended to:
The problem now becomes a balanced transportation problem. If we use two additional variables
xi 4 , i = 1,2, then the model is:
Minimize the shipping cost
17 x11 + 22 x12 + 15 x13 + 18 x 21 + 16 x 22 + 12 x 23
Subject to
x11 + x12 + x13 + x14 = 450
(product of Mill 1)
x21 + x22 + x23 + x24 = 550
(product of Mill 2)
x11 + x21 = 300
(requirement of Plant 1)
x12 + x22 = 400
(requirement of Plant 2)
x13 + x23 = 200
(requirement of Plant 3)
x14 + x24 = 100
(requirement of Dummy Plant)
xij ³ 0, i = 1, 2, j = 1, 2, 3 ,4.
When the problem is solved and suppose in the solution, x14 =60 and
x24 =40, then Mill 1 should keep 60 tons of newsprint unshipped, and Mill 2 should keep
40 tons of its product unshipped.
Note that in the above model we let the shipping cost from the two mills to the
dummy demand be 0. If the storage cost in Mill 1 is $5/ton per week and Mill 2 has no
storage space, then we should change the shipping costs from the two mills to the dummy
plant to 5 and ∞ (or a very large number N), respectively.
Section 2.4 The Dynamic Planning Model
The operation of many processes can be divided into distinct time periods.
Decisions for one period affect not only that period, but also subsequent periods.
Example 1 Consider the operation of a dealer of home heating oil.
Maximum storage capacity ~ 10,000 gal (initially, has 3,000 gal stored)
In each month, the dealer can sell up to 8,000 gal; purchase up to 5,000 gal.
In the next 3 months; the purchase prices are, respectively, 80¢, 82¢, 85¢; (per gal)
and the sell prices are, respectively, 92¢, 95¢, 97¢. (per gal)
After the third month, any oil left has the value of 78¢.
Problem: How much oil should the dealer purchase, sell, and store during each month in order to
maximize profit?
For i = 1, 2, 3, let
Pi ~ # of gallons of oil purchased;
Di ~ # of gallons of oil sold (distributed);
Si ~ # of gallons of oil stored.
Obvious constraints: for i = 1, 2, 3,
Si £ 10,000; Pi £ 5,000; Di £ 8,000 .
Consider interrelations between two successive months: for each month,
Oil purchased
during that month
+
Oil sold during
the month
=
Oil stored from
the previous month
So,
Month 1 :
Month 2 :
Month 3 :
+
Oil stored during
the month
P1 + 3000 = D1 +S1
P2 + S1 = D2 +S2
P3 + S2 = D3 +S3
Total Profit = (92 D1 + 95 D2 + 97 D3 + 78 S3) − (80 P1 + 82 P2 + 85 P3).
Mathematical Model for the Problem
Max 92 D1 + 95 D2 + 97 D3 + 78 S3 − 80 P1 − 82 P2 − 85 P3
Subject to:
P1 + 3000 = D1 + S1
P2 + S1 = D2 + S2
P3 + S2 = D3 + S3
0 £ Pi £ 5,000, i = 1, 2, 3
0 £ Di £ 8,000, i = 1, 2, 3
0 £ Si £ 10,000, i = 1, 2, 3.
Example 2 Under a short-term contract, a firm should produce 3700 units of some commodity
over a period of 4 weeks with the delivery schedule below:
Week
1
# of units 700
2
1200
3
1000
4
800
For late delivery, there is a $5 / unit / week of penalty.
No penalty or storage charge for any units delivered early.
The firm must deliver the 3700 units by the end of the fourth week.
Working force
Stable (under long-term contracts) workers: 35.
New workers can be hired, but require a week of training with 1 experienced worker
capable of training 5 new workers each week.
Each worker (excluding the trainees & trainers) can produce 25 units / week.
All workers receive $350 / week.
All new workers hired during the 4 weeks must be laid off by the end of the
fourth week, if not sooner, at a cost of $125 / worker.
Raw material
One raw material is required for the production. Each unit of the product needs
2 lb of the raw material.
Each week the firm can obtain 2000 lb free material, but can be used only during the week.
Extra amount of the raw material can be purchased from the market at a cost of $3 / lb.
Problem: Set a production plan to meet the contract, meanwhile to minimize the total cost.
Introducing the following variables: for week i, i = 1, 2, 3, 4,
Hi ~ new workers to be hired
Fi ~ workers to be laid off
Ti ~ workers to train & to be trained
Ii ~ workers to be idle
Pi ~ workers to produce the commodity
Mi ~ # of lb of raw material purchased from the outside source
Di ~ # of units produced (delivered)
Ui ~ the accumulated number of units required, but not delivered.
Week 1
constraints: 35 + H 1 = T1 + I 1 + P1
H
H 1 + 1 = T1
5
( F1 = 0)
cost:
25P1 = D1
2000 + M 1 ³ 2 D1 (why not 2000 + M1 = 2D1 ?)
D1 + U 1 ³ 700 (why not D1 + U1 = 700 ?)
350 (35 + H 1 ) + 3M 1 + 5U 1 .
Week 2
constraints: 35 + H 1 + H 2 - F2 = T2 + I 2 + P2
H
H 2 + 2 = T2
5
F2 £ H 1
25P2 = D2
2000 + M 2 ³ 2 D2
D2 + U 2 ³ 1200 + 700 - D1
cost: 350 (35 + H 1 + H 2 - F2 ) + 125F2 + 3M 2 + 5U 2 .
Week 3
Write by yourself & explain the constraints / costs.
Week 4
Finally, let
F5 ~ the workers hired for the project who are still in the plant in week 4.
constraint:
F5 = H 1 + H 2 + H 3 + H 4 - F2 - F3 - F4 .
cost:
125 F5 .
4
Model: Min
å (cost of week i ) + 125 F5
i =1
Subject to: constraints of week i
for i = 1, 2, 3, 4
all variables ³ 0
From the above examples we see that the basic problem of linear
programming is to optimize (maximize or minimize) a linear function
subject to a system of linear constraints (linear equations or linear
inequalities).
Download