Presentation is loading. Please wait.

Presentation is loading. Please wait.

Shortest Path Problems

Similar presentations


Presentation on theme: "Shortest Path Problems"— Presentation transcript:

1 Shortest Path Problems
Modeling and Applications

2 Find a path with the lowest radiation

3 Find a path with the lowest radiation (A nontrivial example)

4 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 (3) (5) (2) (1) (7) (8) costs

5 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

6 Power Transmission Problem
3% Percentage loss 2 4 2 % 4% 2 % 1 6 3 % 2 % 3 % 3 5 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 1246, the final transmission efficiency received at node 6 = (1-4%)*(1-3%)*(1-2%)=96%*97%*98%=91.258%.

7 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).

8 Max. Efficiency Power Transmission
Convert the % lost into efficiency first as below. 97% 2 4 98 % 96% 98 % 1 6 97 % 98 % 97 % 3 5

9 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 -log(97%) 2 4 -log(98%) -log(96%) -log(98%) 1 6 -log(97%) -log(98%) -log(97%) 3 5

10 Solution Analysis Possible path 1: 1246 Possible path 2: 1256
{[-log(96%)]+[-log(97%)]+[-log(98%)]}=0.0397 Efficiency = % Possible path 2: 1256 {[-log(96%)]+[-log(98%)]+[-log(98%)]}=0.0353 Efficiency = % Optimal path: 1356 {[-log(97%)]+[-log(97%)]+[-log(98%)]}= (Min.) Efficiency = % (Max.)

11 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.

12 On-call Driver Schedule for a Bus Co.
Duty Hour 9am-1pm 9am-12pm 12nn-3pm 12nn-5pm 2pm-5pm 1pm-4pm 4pm-5pm Cost (HKD) 300 260 210 450 200 160 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

13 Shortest Path Model Time
9 10 11 12 1 2 3 4 5 Model: each node corresponds to a time point, each arc to a possible shift Justification: Each path from 9 to 5 corresponds to a feasible schedule, e.g., path 9145 means a schedule (9am-1pm)+(1pm-4pm)+(4pm-5pm) A feasible schedule with overlapped shifts: (9-12)+(12-3)+(2-5) ??? represented by path 912325

14 Schedule 1: 9am1pm,1pm4pm,4pm5pm, cost=HKD720
Duty Hour 9am-1pm 9am-12pm 12nn-3pm 12nn-5pm 2pm-5pm 1pm-4pm 4pm-5pm Cost (HKD) 300 260 210 450 200 160 30 300 260 200 160 260 Time 9 10 11 12 1 2 3 4 5 450 210 Schedule 1: 9am1pm,1pm4pm,4pm5pm, cost=HKD720 Schedule 2: 9am1pm,12nn5pm, cost=HKD750 Schedule 3: 9am1pm,1pm4pm, 2pm5pm, cost=HKD760 Which is the shortest path?

15 Dynamic Shortest Paths
Suppose 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? Start time arc travel time in minutes 7 7:10 7:20 7:30 7:40 7:50 (1,2) 20 30 (1,3) 10 (2,3) (3,4)

16 Time expanded network (time-space network)
(1,2) 10 20 (1,3) (2,4) (3,4) 30 7 7:10 7:20 7:30 7:40 7:50 1 2 3 4 The shortest path from 1 to 4 depends on when to start. Time T 4

17 Find a path with the lowest radiation
Modeling: Partitioning the space as a k*k grid with desired accuracy Between any two points, calculating the total radiation received, assuming direct walking arc costs Finding the shortest path


Download ppt "Shortest Path Problems"

Similar presentations


Ads by Google