LP Formulations For Network Problems

advertisement
LP Formulations For Network Problems
1. Transportation Model
2. Transshipment Model
3. Shortest Path Problem
1. Transportation Model
-- Model Description:
 Set of suppliers (factories) with limited capacities
 Set of buyers (retailers) requesting for products
 Route between each supplier and buyer
 Find most efficient shipment plan
-- A Graphical Representation
Capacities
Suppliers
Customers
Demands
-- Example: Powerco has three electric power plants that supply the power needs of four
cities. Each power plant can supply the amounts shown in Table 1 (in millions of
kilowatt-hours of electricity). The peak power demand (again in millions of kwh) at each
city is given in Table 2. Finally, the cost (in dollars) of sending a million kwh from each
plant to each city is given in Table 3.
Table 1: Capacity of each plant
Plant
Plant 1
Plant 2
Plant 3
Supply
35
50
40
Table 2: Demand of each city
City
City 1
Demand
45
City 2
20
Table 3: Shipping cost between each plant and city
City 1
City 2
Plant 1
8
6
Plant 2
9
12
Plant 3
14
9
City 3
30
City 4
30
City 3
10
13
16
City 4
9
7
5
a. Find the lowest-cost shipment plan for Powerco to meet the demand of the four cities.
b. If the connection between Plant 1 and City 2 is not available, resolve the problem.
c. If the supply of Plant 1 increases to 40, do we need to change our setup?
d. If the demand of City 4 increases to 35, resolve the problem.
-- Excel Data Organization:
 Unit cost and total cost
 Shipment plan
2. Transshipment Model (An Extension of Transportation Model)
-- Model Description:
 Set of suppliers (factories) with limited capacities
 Set of buyers (retailers) requesting for products
 Set of warehouses in between suppliers and buyers
 Route between each supplier, warehouse, and buyer
 Find most efficient shipment plan
-- A Graphical Representation
Capacities
Suppliers
Warehouse
Customers
Demands
-- An Example:
Foodco produces food at three plants (nodes 1, 2, and 3). Food can be shipped directly to
customers (node 6 and 7) or it can be shipped to warehouses (node 4 and 5) and then to
the customers. The cost of producing food at each plant is the same, so Foodco is
concerned with minimizing the total shipping cost incurred in meeting customer
demands. The production capacity of each plant (in tons per year) and the demand of each
customer are listed in Table 1 and 2. The cost of shipping a ton of food (in thousands of
dollars) between each pair of points is given in Table 3, where a dash indicates that
Foodco cannot ship from a node to itself. At most 200 tons of food can be shipped
between any two nodes. Foodco wants to determine a minimum cost shipping schedule.
Table 1: Capacity of each plant
Plant
Plant 1 (node 1)
Plant 2 (node 2)
Plant 3 (node 3)
Supply
200
300
100
Table 2: Customer demands
Customer
Demand
Customer 1 (node 6)
400
Customer 2 (node 7)
180
Table 3: Unit shipping cost
From
Node
1
2
3
4
5
6
7
1
-9
0.4
1
2
2
7
-- Solution Procedure:
2
5
-8
1
1
9
3
To
3
3
9
-0.5
0.6
1
6
Node
4
2
1
1
-0.8
0.6
1
5
1
1
0.5
1.2
-0.7
0.3
6
2
8
10
5
2
-7
7
4
9
8
1
7
3
--
1. Calculate gap = sum(supplies) - sum(demands).
2. If gap > 0, add a dummy customer with demand = gap, flow-in capacity = gap, and
flow-out capacity = 0.
3. If gap < 0, add a dummy supplier with supply = gap, flow-in capacity = 0 and flowout capacity = gap.
4. The unit shipment costs from and to the dummy are set to 0 in both cases.
5. In the constraint, set net out-flow of each node = given out-flow (supply, -demand, or
0), where net out-flow = out-flow - in-flow.
-- Two Excel Tricks Used in the Example:
1. Define a name for a range: Mark the range, and enter the name in the name cell at the
up-left corner of the sheet.
2. Convert a row vector into a column vector: Mark the range of the column vector,
enter the formula transpose(range of the row vector) in the first cell of the marked
column vector. Press Control, Shift, and then Enter.
3. Shortest path problem and applications
-- Description of the problem
Given:
 A network with nodes and arcs
 Length of each arc
Find:
 Shortest path from origin to destination
-- Idea of the solution procedure:
 Treat the length of each arc as unit shipment cost
 Try to send 1 unit of flow from the origin to the destination with minimum cost
-- A simple example
Find the shortest path from node 2 to node 6 in the following network.
5
8
9
6
6
2
6
4
6
7
3
3
4
-- Applications to equipment replacement:
 Tradeoff between replacement cost and aging cost.
-- Example (best policy for trade-in car)
Jane Driver has just purchased (at time 1) a new car for $12,000. The cost of maintaining
a car during a year depends on the age of the car at the beginning of the year, as given in
the following table. To avoid high maintenance costs associated with an older car, Jane
can trade in a car and purchase a new car. The prices she receives on a trade-in are also
given in the table. To simplify the computations, we assume that at any time it costs Jane
$12,000 to purchase a new car. Jane’s goal is to minimize the net costs (purchasing costs
plus maintenance costs minus money received in trade-ins) incurred during the next five
years.
Age of Car (years)
0
1
2
3
4
5
Annual Maintenance Cost
$2000
$4000
$5000
$9000
$12000
N/A
Trade-in Price
N/A
$7000
$6000
$2000
$1000
$0
-- Network representation of car trade-in problem
Beginning of
year 1
End of year 5
-- Calculating cost for each option
Cij: the total net cost incurred by owning and operating a car from the beginning of year i
to the beginning of year j if a new car is purchased at the beginning of year i and this car
is traded in at the beginning of year j.
Cij =
-- Example:
C12 =
C13 =
C14 =
...
C23 =
C24 =
...
-- Excel data organization:
 Input data
 Calculating cost of each option and total cost
 Trading plan
Homework Problems for Network Related Problems:
Problem 1. General Ford produces cars at LA and Detroit and has a warehouse in Atlanta.
The company supplies cars to customers in Houston and Tampa. The costs of shipping a
car between various points are listed in the following table, where a dash means that a
shipment is not allowed. LA can produce up to 1100 cars, and Detroit can produce up to
2900 cars. Houston must receive 2400 cars, and Tampa must receive 1500 cars.
Determine how to minimize the cost of meeting demands at Houston and Tampa.
LA
LA
From
Detroit
$145
Atlanta
$105
Houston
$89
Tampa
$210
Total Shipping Cost: $420,500
To
Atlanta
$100
$111
$121
$82
Detroit
$140
$115
$109
$117
Houston
$90
$110
$113
-
Tampa
$225
$119
$78
-
Problem 2. Solve the project management example in my lecture (house construction) by
formulating the problem as a shortest (longest) path problem. Find out the minimum
project duration and all critical activities. Use the maximum time (b) for each task.
26 days
Problem 3. Solve the car replacement problem by Excel.
Total Cost: $31,000
Problem 4. (Extra Credit, 0.5% bonus toward your final grade)
A company sells seven types of boxes, ranging in volume from 17 to 33 cubic feet. The
demand and size of each box are given in the following table. The variable cost (in
dollars) of producing each box is equal to the volume of the box. A fixed cost of $1000 is
incurred to produce any of a particular box. If the company desires, demand for a box can
be satisfied by a box of a larger size. Determine how to minimize the cost of meeting the
demand for boxes.
Box
Size
Demand
1
33
400
2
30
300
3
26
500
4
24
700
5
19
200
6
18
400
7
17
200
Hint: Compare this problem with the car-trade example and try to change the problem to
a shortest path problem. For example, one possible solution of the problem could be
producing 700 boxes of size 33, 1200 boxes of size 26, and 800 boxes of size 19. This
feasible solution can be represented a path in the network representation of this problem.
$72,100
Download