Upload
lecong
View
255
Download
1
Embed Size (px)
Citation preview
BA 452 Lesson B.1 Transportation 1
Review
We will spend up to 30 minutes reviewing Exam 1• Know how your answers were graded.• Know how to correct your mistakes. Your final exam is
cumulative, and may contain similar questions.
Review
BA 452 Lesson B.1 Transportation 2
Readings
ReadingsChapter 6Distribution and Network Models
BA 452 Lesson B.1 Transportation 3
Overview
Overview
BA 452 Lesson B.1 Transportation 4
Overview
Network Models are nodes, arcs, and functions (costs, supplies, demands, etc.) associated with the arcs and nodes, as in transportation, assignment, transshipment, and shortest-route problems.
Transportation Problems are Resource Allocation Problems when outputs are fixed, and when outputs and inputs occur at different locations, so goods must be transported from origins to destinations.
Transportation Problems with Modes of Transport re-interpret some of the different “origins” in a basic transportation problem to include not only location but modes of transportation (truck, rail, …).
Assignment Problems are Transportation Problems when the “goods” are workers that are transported to jobs, and each worker either does all of a job or none of it, so the fraction completed is binary.
BA 452 Lesson B.1 Transportation 5
Tool Summary Write the objective of maximizing a minimum as a linear
program.• For example, maximize min {2x, 3y} as maximize M
subject to 2x > M and 3y > M. Define decision variable xij = units moving from origin i to
destination j. Write origin constraints (with < or =):
Write destination constraints (with < or =):
1 1,2, , Demand
m
ij jix d j n
Overview
1 1,2, , Supply
n
ij ijx s i m
BA 452 Lesson B.1 Transportation 6
Tool Summary Identify implicit assumptions needed to complete a
formulation, such as all agents having an equal value of time.
Overview
BA 452 Lesson B.1 Transportation 7
Network Models
Network Models
BA 452 Lesson B.1 Transportation 8
Network Models
Network Models are nodes, arcs, and functions (costs, supplies, demands, etc.) associated with the arcs and nodes. Transportation, assignment, transshipment, and shortest-route problems are examples.
BA 452 Lesson B.1 Transportation 9
Each of the four network models (transportation, assignment, transshipment, and shortest-route problems) can be formulated as linear programs and solved by general-purpose linear programming codes.
For each of the four models, if the right-hand side of the linear programming formulations are all integers, the optimal solution will be integer values for the decision variables.
There are many computer packages (including The Management Scientist) that contain convenient separate computer codes for these models, which take advantage of their network structure. But do not use such codes on exams because they lack the flexibility of the general-purpose linear programming codes.
Network Models
BA 452 Lesson B.1 Transportation 10
Transportation
Transportation
BA 452 Lesson B.1 Transportation 11
Transportation
Overview
Transportation Problems are Resource Allocation Problems when outputs are fixed, and when outputs and inputs occur at different locations. Transportation Problems thus help determine the transportation of goods from m origins (each with a supply si) to n destinations (each with a demand dj) to minimize cost.
BA 452 Lesson B.1 Transportation 12
2
c11c12
c13
c21
c22c23
d1
d2
d3
s1
s2
Sources Destinations
3
2
1
1
Transportation
Here is the network representation for a transportation problem with two sources and three destinations.
BA 452 Lesson B.1 Transportation 13
xij = number of units shipped from origin i to destination j cij = cost per unit of shipping from origin i to destination j si = supply or capacity in units at origin i dj = demand in units at destination j
Notation:
xij > 0 for all i and j
1 1,2, , Supply
n
ij ijx s i m
1 1Min
m n
ij iji j
c x
1 1,2, , Demand
m
ij jix d j n
=
Linear programming formulation (supply inequality, demand equality).
Transportation
BA 452 Lesson B.1 Transportation 14
Possible variations:• Minimum shipping guarantee from i to j:
xij > Lij
• Maximum route capacity from i to j:
xij < Lij
• Unacceptable route:
Remove the corresponding decision variable.
Transportation
BA 452 Lesson B.1 Transportation 15
Northwood Westwood Eastwood Plant 1 24 30 40 Plant 2 30 40 42
Question: Acme Block Company has orders for 80 tons of concrete blocks at three suburban locations: Northwood -- 25 tons, Westwood -- 45 tons, and Eastwood -- 10 tons. Acme has two plants, each of which can produce 50 tons per week. Delivery costs per ton from each plant to each suburban location are thus:
Formulate then solve the linear program that determines how shipments should be made to fill the orders above.
Transportation
BA 452 Lesson B.1 Transportation 16
Answer: Linear programming formulation (supply inequality, demand equality). Variables: Xij = Tons shipped from Plant i to Destination j Objective: Min 24 X11 + 30 X12 + 40 X13 + 30 X21 + 40 X22 + 42
X23 Supply Constraints: X11 + X12 + X13 < 50X21 + X22 + X23 < 50 Demand Constraints:X11 + X21 = 25X12 + X22 = 45X13 + X23 = 10
Transportation
BA 452 Lesson B.1 Transportation 17
Transportation
BA 452 Lesson B.1 Transportation 18
Define sources: Source 1 = Plant 1, Source 2 = Plant 2. Define destinations: 1 = Northwood, 2 = Westwood, 3 = Eastwood. Define costs:
Define 2 supplies: s1 = 50, s2 = 50. Define 3 demands: d1 = 25, d2 = 45, d3 = 10. Define variables: Xij = number of units shipped from Source i to Destination j.
2+3=5 2x3 = 6
Supply s1 = 50
Demand d2 = 45
Cost c13 = 40
c11 = 24 c12 = 30 c13 = 40c21 = 30 c22 = 40 c23 =
42
Transportation
BA 452 Lesson B.1 Transportation 19
Optimal shipments: From To Amount Cost
Plant 1 Northwood 5 120 Plant 1 Westwood 45 1,350 Plant 2 Northwood 20 600 Plant 2 Eastwood 10 420 Total Cost = $2,490
Variable names:Xij = number of units shipped from Plant i to Destination j.Destination 1 = Northwood; 2 = Westwood; 3 = Eastwood
Transportation
BA 452 Lesson B.1 Transportation 20
Transportation
BA 452 Lesson B.1 Transportation 21
Optimal shipments: From To Amount Cost
Plant 1 Northwood 5 120 Plant 1 Westwood 45
1,350 Plant 2 Northwood 20 600 Plant 2 Eastwood 10
420 Total Cost = $2,490
Variable names: Origin i = Plant i Destination 1 = Northwood Destination 2 = Westwood Destination 3 = Eastwood Cost from Plant
1 to Northwood
Transportation
BA 452 Lesson B.1 Transportation 22
Transportation with Modes of Transport
Transportation with Modes of Transport
BA 452 Lesson B.1 Transportation 23
Overview
Transportation Problems with Modes of Transport re-interpret some of the different “origins” in a basic transportation problem to include not only location but modes of transportation. For example, instead of “San Diego” as an origin specifying location, we have “San Diego by Truck” as an origin specifying both location and mode of transportation.
Transportation with Modes of Transport
BA 452 Lesson B.1 Transportation 24
Question: The Navy has 9,000 pounds of material in Albany, Georgia that it wishes to ship to three installations: San Diego, Norfolk, and Pensacola. They require 4,000, 2,500, and 2,500 pounds, respectively. Government regulations require equal distribution of shipping among the three carriers. The shipping costs per pound by truck, railroad, and airplane are:
Formulate then solve the linear program that determines shipping arrangements (mode, destination, and quantity) that minimize the total shipping cost.
DestinationMode San Diego Norfolk PensacolaTruck $12 $ 6 $ 5Railroad $20 $11 $ 9Airplane $30 $26 $28
Transportation with Modes of Transport
BA 452 Lesson B.1 Transportation 25
Transportation with Modes of Transport
BA 452 Lesson B.1 Transportation 26
Define the variables. We want to determine the pounds of material, xij , to be shipped by mode i to destination j.
Variable names:
Define the objective. Minimize the total shipping cost. Min: (shipping cost per pound for each mode-destination pairing) x
(number of pounds shipped by mode-destination pairing). Min: 12x11 + 6x12 + 5x13 + 20x21 + 11x22 + 9x23
+ 30x31 + 26x32 + 28x33
San Diego Norfolk Pensacola
Truck x11 x12 x13
Railroad x21 x22 x23
Airplane x31 x32 x33
Transportation with Modes of Transport
BA 452 Lesson B.1 Transportation 27
Define the constraints of equal use of transportation modes: (1) x11 + x12 + x13 = 3000 (2) x21 + x22 + x23 = 3000 (3) x31 + x32 + x33 = 3000 Define the destination material constraints: (4) x11 + x21 + x31 = 4000 (5) x12 + x22 + x32 = 2500 (6) x13 + x23 + x33 = 2500
Transportation with Modes of Transport
BA 452 Lesson B.1 Transportation 28
Linear programming summary. Variables: Xij = Pounds shipped by Mode i to Destination j Objective: Min 12 X11 + 6 X12 + 5 X13 + 20 X21 + 11 X22 + 9 X23 + 30 X31 + 26 X32 + 28 X33 Mode (Supply equality) Constraints: X11 + X12 + X13 = 3000X21 + X22 + X23 = 3000X31 + X32 + X33 = 3000 Destination Constraints:X11 + X21 + X31 = 4000X12 + X22 + X32 = 2500X13 + X23 + X33 = 2500
Transportation with Modes of Transport
BA 452 Lesson B.1 Transportation 29
San Diego Norfolk Pensacola Truck X11 X12 X13 Railroad X21 X22 X23 Airplane X31 X32 X33
Solution Summary:• San Diego receives 1000 lbs. by truck
and 3000 lbs. by airplane.• Norfolk receives 2000 lbs. by truck and 500 lbs. by railroad.• Pensacola receives 2500 lbs. by railroad. • The total shipping cost is $142,000.
Variable names:
Units to San Diego by truck
Transportation with Modes of Transport
BA 452 Lesson B.1 Transportation 30
The Management Science Transportation module is not available. Remember, in that formulation, the supply constraints are inequalities.
xij > 0 for all i and j
1 1Min
m n
ij iji j
c x
But in Example 2, the “origins” are the modes of shipping, and the supply constraint on each mode is an equality.
1 1,2, , Supply
n
ij ijx s i m
1 1,2, , Demand
m
ij jix d j n
=
Transportation with Modes of Transport
BA 452 Lesson B.1 Transportation 31
Assignment
Assignment
BA 452 Lesson B.1 Transportation 32
Overview
Assignment Problems are Transportation Problems when the “goods” are workers that are transported to jobs, and each worker either does all of a job or none of it. Assignment Problems thus minimize the total cost of assigning of m workers (or agents) to m jobs (or tasks). The simplest way to model all-or-nothing in any linear program is to restrict the fraction of the job completed to be a binary (0 or 1) decision variable.
Assignment
BA 452 Lesson B.1 Transportation 33
An assignment problem is thus a special case of a transportation problem in which all supplies and all demands equal to 1; hence assignment problems may be solved as linear programs. And although the only sensible solution quantities are binary (0 or 1), the special form of the problem and of The Management Scientist guarantees all solutions are binary (0 or 1).
Assignment
BA 452 Lesson B.1 Transportation 34
2
3
1
2
3
1c11
c12
c13
c21 c22
c23
c31 c32
c33
Agents Tasks
Here is the network representation of an assignment problem with three workers (agents) and three jobs (tasks):
Assignment
BA 452 Lesson B.1 Transportation 35
Notation: xij = 1 if agent i is assigned to task j 0 otherwise
cij = cost of assigning agent i to task j
xij > 0 for all i and j
1 1Min
m n
ij iji j
c x
11 1,2, , Agents
n
ijjx i m
11 1,2, , Tasks
m
ijix j n
s.t.
Assignment
BA 452 Lesson B.1 Transportation 36
Possible variations:• Number of agents exceeds the number of tasks:
Extra agents simply remain unassigned.
• An assignment is unacceptable:
Remove the corresponding decision variable.
• An agent is permitted to work t tasks:
1 1,2, , Agents
n
ijjx t i m
Assignment
BA 452 Lesson B.1 Transportation 37
Question: Russell electrical contractors pay their subcontractors a fixed fee plus mileage for work performed. On a given day the contractor is faced with three electrical jobs associated with various projects. Given below are the distances between the subcontractors and the projects.
ProjectsSubcontractor A B C Westside 50 36 16
Federated 28 30 18 Goliath 35 32 20
Universal 25 25 14
Assume each subcontractor can perform at most one project. Formulate then solve the linear program that assigns contractors to minimize total mileage costs.
Assignment
BA 452 Lesson B.1 Transportation 38
5036
16
2830
1835 32
2025 25
14
West.
C
B
A
Univ.
Gol.
Fed.
ProjectsSubcontractors
Assignment
Answer:
BA 452 Lesson B.1 Transportation 39
Project A Project B Project C Westside x11 x12 x13
Federated x21 x22 x23
Goliath x31 x32 x33
Universal x41 x42 x43
Variable names:
There will be 1 variable for each agent-task pair, so 12 variables all together.
There will be 1 constraint for each agent and for each task, so 7 constraints all together.
Assignment
BA 452 Lesson B.1 Transportation 40
Min 50x11+36x12+16x13+28x21+30x22+18x23
+35x31+32x32+20x33+25x41+25x42+14x43
s.t. x11+x12+x13 < 1
x21+x22+x23 < 1 x31+x32+x33 < 1 x41+x42+x43 < 1 x11+x21+x31+x41 = 1 x12+x22+x32+x42 = 1 x13+x23+x33+x43 = 1 xij = 0 or 1 for all i and j
Agents
Tasks
Project A Project B Project C Westside x11 x12 x13
Federated x21 x22 x23
Goliath x31 x32 x33
Universal x41 x42 x43
Variable names:
Assignment
BA 452 Lesson B.1 Transportation 41
Project A Project B Project C Westside x11 x12 x13
Federated x21 x22 x23
Goliath x31 x32 x33
Universal x41 x42 x43
Agent 1 capacity: x11+x12+x13 < 1
Task 3 done: x13+x23+x33+x43 = 1
Assignment
BA 452 Lesson B.1 Transportation 42
Project A Project B Project C
Westside x11 x12 x13
Federated x21 x22 x23
Goliath x31 x32 x33
Universal x41 x42 x43
Variable names:
Optimal assignment: Subcontractor Project Distance Westside C 16 Federated A 28
Goliath (unassigned) Universal B 25 Total distance = 69 miles
Assignment
BA 452 Lesson B.1 Transportation 43
Assignment
BA 452 Lesson B.1 Transportation 44
ProjectsSubcontractor A B C Westside 50 36
16Federated 28 30
18 Goliath 35 32
20Universal 25 25
14Optimal assignment: Subcontractor Project Distance Westside C 16 Federated A 28
Goliath (unassigned) Universal B 25 Total distance = 69 miles
Assignment
BA 452 Lesson B.1 Transportation 45
Question: Now change Example 3 to take into account the recent marriage of the Goliath subcontractor to your youngest daughter. That is, you have to assign Goliath one of the jobs.
How should the contractors now be assigned to minimize total mileage costs?
Assignment
BA 452 Lesson B.1 Transportation 46
Alternative notation:
WA = 0 if Westside does not get task A 1 if Westside does get task Aand so on.
Min 50WA+36WB+16WC+28FA+30FB+18FC
+35GA+32GB+20GC+25UA+25UB+14UC
s.t. WA+WB+WC < 1 FA+FB+FC < 1 GA+GB+GC = 1 UA+UB+UC < 1 WA+FA+GA+UA = 1
WB+FB+GB+UB = 1 WC+FC+GC+UC = 1
Agents
Tasks
Assignment
BA 452 Lesson B.1 Transportation 47
Goliath gets a task: GA+GB+GC = 1
Task A gets done: WA+FA+GA+UA=1
Assignment
BA 452 Lesson B.1 Transportation 48
Optimal assignment: Subcontractor Project Distance Westside C 16 Federated (unassigned)
Goliath B 32 Universal A 25 Total distance = 73 miles
Assignment
BA 452 Lesson B.1 Transportation 49
BA 452 Quantitative Analysis
End of Lesson B.1