Upload
willis-beasley
View
260
Download
1
Tags:
Embed Size (px)
Citation preview
Shortest Path Problems
Modeling and Applications
Find a path with the lowest radiation
Find a path with the lowest radiation(A nontrivial example)
Shortest Path Problem• A general network structure• A given node as the source, and another given node
as destination• Each arc has a cost• Decision: find a path from the source to the
destination with the minimum total cost– The cost of a path is the sum of costs on all arcs on the path
4
1
5
3
6 7
2
Source
Destination
1
1
(3)
(5)
(2)
(1)(2)
(2)(7)
(8)
(3)
(2)
(1)
costs
Shortest Path Modeling
• Given a particular application (not obviously like a shortest path problem)
• We construct a shortest path problem– To define a network (nodes, arcs, and arc costs)
• Solving the shortest path problem gives the optimal solution of the application– Assuming we know how to solve a shortest path
problem
Power Transmission Problem
1
2 4
3 5
6
4%
3%
2 %
3 %
2 %
3 %
2 %
Transmission efficiency = 1 - percentage lost e.g., from node 1 to 3, efficiency = 1-3%=97%
Final transmission efficiency received at the destination = multiplication of efficiency along the path.
For example, for path 1246, the final transmission efficiency received at node 6 = (1-4%)*(1-3%)*(1-2%)=96%*97%*98%=91.258%.
Percentage loss
Relating Power Transmission to Shortest Path
Differences Power Transmission Shortest Path
Path Evaluation Multiplication of arc efficiency Summation of arc cost
Objective A maximization problem A minimization problem
Observations:For some positive numbers a1,…,an and b1,…,bm, inequality a1×…×an ≥ b1×…×bm is equivalent to log(a1×…×an) ≥ log(b1×…×bm), further equivalent to log(a1)+…+log(an) ≥ log(b1)+…+log(bm),and finally equivalent to -log(a1)-…-log(an) ≤ -log(b1)-…-log(bm).
Max. Efficiency Power Transmission
• Convert the % lost into efficiency first as below.
1
2 4
3 5
6
96%
97%
98 %
97 %
98 %
97 %
98 %
Shortest Path Modeling
• In the network, define the cost of each arc as -log(efficiency) as below.
• Now we can find the shortest path under the given costs
1
2 4
3 5
6
-log(96%)
-log(97%)
-log(98%)
-log(97%)
-log(98%)
-log(97%)
-log(98%)
Solution Analysis
• Possible path 1: 1246– {[-log(96%)]+[-log(97%)]+[-log(98%)]}=0.0397– Efficiency = 91.258%
• Possible path 2: 1256– {[-log(96%)]+[-log(98%)]+[-log(98%)]}=0.0353– Efficiency = 92.198%
• Optimal path: 1356– {[-log(97%)]+[-log(97%)]+[-log(98%)]}=0.0352
(Min.)– Efficiency = 92.208% (Max.)
Another similar example
• A farmer wishes to transport a truckload of eggs from one city to another city through a given road network.– The truck will incur a certain amount of breakage on each
road segment
– Let wij be the percentage of eggs broken if the truck passes the road segment (i,j).
– How should the truck be routed to minimize the total breakage?
• Formulate the problem as a shortest path problem.
On-call Driver Schedule for a Bus Co.
• Available on-call driver shifts and costs in the above table
• Requirement: At least one on-call driver is on duty any time from 9am to 5pm.
• Question: the minimum-cost schedule
Duty Hour 9am-1pm
9am-12pm
12nn-3pm
12nn-5pm
2pm-5pm
1pm-4pm
4pm-5pm
Cost (HKD) 300 260 210 450 200 260 160
Shortest Path Model
9 11 12 1 210 3 4 5
Model: each node corresponds to a time point, each arc to a possible shiftJustification:
Each path from 9 to 5 corresponds to a feasible schedule, e.g., path 9145 means a schedule (9am-1pm)+(1pm-4pm)+(4pm-5pm)
A feasible schedule with overlapped shifts: (9-12)+(12-3)+(2-5) ??? represented by path 912325
Time
9 11 12 1 210 3 4 5
260
30 260200 160
450
300
210
00000000
Schedule 1: 9am1pm,1pm4pm,4pm5pm, cost=HKD720Schedule 2: 9am1pm,12nn5pm, cost=HKD750Schedule 3: 9am1pm,1pm4pm, 2pm5pm, cost=HKD760 Which is the shortest path?
Time
Duty Hour 9am-1pm
9am-12pm
12nn-3pm
12nn-5pm
2pm-5pm
1pm-4pm
4pm-5pm
Cost (HKD) 300 260 210 450 200 260 160
Dynamic Shortest PathsSuppose that the time it takes to travel in arc (i, j) depends on when one
starts. (e.g., rush hour vs. other hours in road networks.)
Let cij(t) be the time it takes to travel in (i, j) starting at time t. What is the minimum time it takes to travel from node 1 to node n starting at 7:00 AM?
7 7:10 7:20 7:30 7:40 7:50 …
(1,2) 20 30 30 20 … … …
(1,3) 10 10 10 10 … … …
(2,3) 20 20 20 20 … … …
(3,4) 10 20 20 10 … … …
…
Start time
arc
travel time in minutes
Time expanded network (time-space network)
(1,2) 10 10 20 20 … …
(1,3) 10 10 10 10 … …
(2,4) 10 20 20 20 … …
(3,4) 10 10 30 30 … …
7 7:10 7:20 7:30 7:40 7:50
The shortest path from 1 to 4 depends on when to start.
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
2
3
4
2
3
Time T
…
…
…
4
Find a path with the lowest radiationModeling:(1)Partitioning the space as a k*k grid
with desired accuracy
(2)Between any two points, calculating the total radiation received, assuming direct walking
arc costs
(3)Finding the shortest path