Post on 31-Dec-2015
description
Tricks for “Linearizing” Some Non-Linear Functions
Updated 3 February 2005
slide 2
Example 1: The Absolute Value Function
• The National Steel Corporation (NSC) produces a special-purpose steel that is used in the aircraft and aerospace industries.
• The marketing department of NSC has received orders for 2400, 2200, 2700 and 2500 tons of steel during each of the next four months.
• NSC can meet these demands by producing the steel, by drawing from its inventory or by a combination of both.
• NSC currently has an inventory of 1000 tons of steel.
slide 3
NSC Problem Continued
• The production costs per ton of steel during each of the next four months are projected to be $7400, $7500, $7600 and $7800.
• Production capacity can never exceed 4000 tons in any month.
• All production takes place at the beginning of the month and immediately thereafter the demand is met. The remaining steel is then stored in inventory at a holding cost of $120/ton for each month that it remains there.
• The inventory level at the end of the fourth month must be at least 1500 tons.
slide 4
NSC Formulation
• Decision Variables– Let Pi be the tons of steel produced in month i
– Let Ii be the tons of steel in inventory at the end of month i.
slide 5
LP Formulation
00400010001500
27002200250024002700220025002400s.t.
1207800760075007400min
0
4
344
233
122
011
34
23
12
01
4
04321
IPPII
IPIIPIIPIIPI
IPIPIPIP
IPPPP
i
i
i
ii
slide 6
Optimal Solution for NSC: cost = $78, 332,000
Variable Value
P1 2300
P2 4000
P3 4000
P4 0
I1 900
I2 2700
I3 4000
I0 1000
I4 1500
slide 7
Increase/Decrease Penalty
• Suppose that if the production level is increased or decreased from one month to the next, then NSC incurs a cost for implementing these changes.
• Specifically, for each ton of increased or decreased production over the previous month, the cost is $50 (except for month 1).
• Thus, the solution shown above would incur an extra cost (4000 – 2300) ($50) =$85,000 for increasing the production from 2300 to 4000 tons month 1 to month 2.
slide 8
New Objective Function
To make the objective function linear define• Yi = increase in production from month i-1 to month i• Zi = decrease in production from month i-1 to month i
The new objective function is
4
2
4
04321 501207800760075007400min
iii
ii ZYIPPPP
PPPPPP
IPPPPi
i
433221
4
04321
505050
1207800760075007400min
slide 9
Additional Constraints
• Yi 0 for i = 2, 3, 4
• Zi 0 for i = 2, 3, 4
• Yi Pi - Pi-1 for i = 2, 3, 4
• Zi Pi-1 - Pi for i = 2, 3, 4
• Alternatively we can write Yi - Zi = Pi - Pi-1 for i = 2, 3, 4
• Examples1. If P1 = P2, then Y2 = 0, and Z2 = 0
2. If P1 = 2300 and P2 = 4000 then Y2 = 1700, and Z2 = 0
3. If P1 = 4000 and P2 = 2300 then Y2 = 0, and Z2 = 1700Now, it is optimal to produce 2575 tons in each month and the total cost is $78,520,500.
slide 10
Example 2: Min Max Functions
• Addison county is trying to determine where to place the county fire station.
• The locations of the county's three major towns are as follows (each town's location is given in terms of (x,y) coordinates where x = miles north of the center of the county and y = miles east of the county center)– Middlebury: (10, 20)– Vergennes: (60, 20)– Bristol: (40, 30)
slide 11
Example 2 Continued
• The county wants to build a fire station in a location (to be specified in terms of (x,y) coordinates as above) that minimizes the largest distance that a fire engine must travel to respond to a fire.
• Since most roads run in either an east-west or north-south direction, we assume that a fire engine must always be traveling in a north-south or east-west direction. – Example: if the fire station is at (30,40) and a fire
occurred at Vergennes, the fire engine would have to travel (60 - 30) + (40 - 20) = 50 miles to the fire.
slide 12
Example 2 Continued
• Formulate a linear program to determine where the fire station should be located.
• Define all variables and briefly justify each constraint.
• Hint: |a| + |b| c if and only if1. -c a + b c, and
2. -c a - b c
slide 13
Example 2: Feasible Solution
x-coordinate y-coordinateFire station 30 40
x y Town x distance y distance Total10 20 Middlebury 20 20 4060 20 Vergennes 30 20 50 *40 30 Bristol 10 10 20
slide 14
Example 2: Better Solution
x-coordinate y-coordinateFire station 40 30
x y Town x distance y distance Total10 20 Middlebury 30 10 40 *60 20 Vergennes 20 10 3040 30 Bristol 0 0 0
slide 15
Example 2: Min Max Formulation
Let D be themaximumdistance to the¯rehouse.
min D
s.t. D ¸ Distance to Middlebury
D ¸ Distance to Vergennes
D ¸ Distance to Bristol
slide 16
Example 2: Min Max Formulation with Non-Linear Constraints
Let D be themaximumdistance to the¯rehouse.Let x and y be thecoordinates of the ¯rehouse.
min D
s.t. D ¸ jx ¡ 10j + jy ¡ 20j
D ¸ jx ¡ 60j + jy ¡ 20j
D ¸ jx ¡ 40j + jy ¡ 30j
slide 17
Example 2: Min Max Formulation with Linear Constraints
Let D be themaximumdistance to the¯rehouse.Let x and y be thecoordinates of the ¯rehouse.
min D
s.t. D ¸ (x ¡ 10) +(y ¡ 20) ¸ ¡ D
D ¸ (x ¡ 10) ¡ (y ¡ 20) ¸ ¡ D
D ¸ (x ¡ 60) +(y ¡ 20) ¸ ¡ D
D ¸ (x ¡ 60) ¡ (y ¡ 20) ¸ ¡ D
D ¸ (x ¡ 40) +(y ¡ 30) ¸ ¡ D
D ¸ (x ¡ 40) ¡ (y ¡ 30) ¸ ¡ D
slide 18
Example 2: Min Max Formulation with Linear Constraintsmin Ds.t. D ¸ x + y ¡ 30
D ¸ ¡ x ¡ y + 30D ¸ x ¡ y + 10D ¸ ¡ x + y ¡ 10D ¸ x + y ¡ 80D ¸ ¡ x ¡ y + 80D ¸ x ¡ y ¡ 40D ¸ ¡ x + y + 40D ¸ x + y ¡ 70D ¸ ¡ x ¡ y + 70D ¸ x ¡ y ¡ 10D ¸ ¡ x + y + 10
slide 19
Example 3: Optimal Solution
x-coordinate y-coordinateFire station 35 20
x y Town x distance y distance Total10 20 Middlebury 25 0 25 *60 20 Vergennes 25 0 25 *40 30 Bristol 5 10 15