hervé bricard – optimization group - it department 2007, january 26th, bordeaux labri. an...

41
Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed graph, the K shortest circuitless paths having at most P arcs between a source node and a target node.

Upload: simon-williams

Post on 11-Jan-2016

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

Hervé BRICARD – Optimization Group - IT department2007, January 26th, Bordeaux LABRI.

An adaptation of Eppstein’s algorithm building, for a given directed graph, the K shortest circuitless paths having at most P arcs between a source node and a target node.

Page 2: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 2

The downstream logistics business problem

An hybrid resolution method based on Bellman’s Algorithm and a business heuristics

State of the art and choice of an exact resolution method

Results

Questions & Answers

The business problem modelled in Graph Theory

The chosen exact resolution method: an adaptation of Eppstein’s Algorithm

Conclusion and perspectives

Agenda

Page 3: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 3

Les routes: illustration

Bologna

Salerno

Trieste

Vercelli

Livorno

Porto Torres

Palermo

Teesport

Port Grimsby

MachelenZeebrugge

Setubal

SevillaMalaga

Puerto de BarcelonaTarragona

Santander

Madrid

Gandia

Cadiz

Bremerhaven

Leipzig

München

Neuss

Wien

Koper

Nebikon

Kleszczow

Moskva

Budapest

Bratislava

Assembly plant

Distribution center

Palencia

Valladolid

Novo Mesto

Luton

Pitesti

Barcelona

Bursa

Krakow geo. zone

The downstream logistics business problem (1)

Page 4: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 4

The downstream logistics business problem (2)

Each vehicle must be routed from its assembly plant to a final distribution center which depends on the geographical localization of the customer that ordered this vehicle.

PROBLEM DESCRIPTION

Our aim – as far as possible! – is to compute several itineraries from the assembly plant to the final distribution center.

These possible itineraries will be the k shortest paths from the plant to the final center, computed with the delay metric and the cost metric. Thus, we will have at most 2k itineraries between a given couple (assembly plant, final distribution center).

Page 5: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 5

The downstream logistics business problem (3)

SOME VOCABULARY

An itinerary between an assembly plant and a final distribution center will be called a « route ».

A route is composed of sections. A section is a triplet (Departure center, Arrival center, Transportation mode)

There are four possible transportation modes for a section in our worldwide distribution network: boat, barge, train, and truck.

A cost and and a delay are attached to each transportation section. Similarly, each center of our network has a transit cost and a transit delay.

Page 6: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 6

The downstream logistics business problem (4)

PROBLEM SIZE AND CONSTRAINTS

Our transportation network consists of:- a few assembly plants- hundreds of transit and final centers- thousands of transportation sections (Currently 1500, 3000 in 2009…)

We wish to compute, for each possible couple (Assembly plant, Final distribution center), under the constraints described below, the 5 quickest and the 5 cheapest routes. Thus, after the computation there will be at most 10 routes for each couple (Assembly plant, Final distribution center).

C1: The computed routes must be circuitless.

C2: The computed routes must not have more than 6 transportation sections.

Page 7: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 7

The downstream logistics business problem

An hybrid resolution method based on Bellman’s Algorithm and a business heuristics

State of the art and choice of an exact resolution method

Results

Questions & Answers

The business problem modelled in Graph Theory

The chosen exact resolution method: an adaptation of Eppstein’s Algorithm

Conclusion and perspectives

Agenda

Page 8: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 8

The business problem modelled in Graph Theory (1)

Our transportation network might be seen as a directed graph. Its nodes stand for the centers , whereas its arcs stand for the transportation sections. The « routes » evoked earlier will also be referred to as « paths », since this terminology is more common in Graph Theory.

TRANSPORTATION NETWORK STRUCTURE

Each arc of this graph is valuated by two metrics: the delay and the cost. The nodes are not valuated. In the business problem, however, the transportation sections AND the centers have a cost and a delay. We simply add, for a given metric, the valuation of a center to the valuations of its outgoing transportation sections; and thus, the aim is achieved: only the arcs of the graph will be valuated.

Moreover, this graph does have circuits, and is a multi-graph, i.e. there can be several arcs connecting a node A to a node B.

Page 9: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 9

The business problem modelled in Graph Theory (2)

THE MULTI-GRAPH FEATURE

« Bremerhaven Kleszczow by train » and « Bremerhaven Kleszczow by truck » are equivalent arcs.

Krakow geographical zone

Page 10: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 10

The business problem modelled in Graph Theory (3)

For each possible couple (departure node, arrival node), we have to find the 5 circuitless quickest paths having at most 6 arcs. Similarly, we must find also the 5 circuitless cheapest paths having at most 6 arcs. Thus, after performing these two steps, whe will have at most 10 paths for a couple.

THE MATHEMATICAL PROBLEM

This problem belongs to the constrained K shortest paths family, the two constraints for a path being in the present case:

- the limitation of its number of arcs - the circuitless requirement

Page 11: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 11

The downstream logistics business problem

An hybrid resolution method based on Bellman’s Algorithm and a business heuristics

State of the art and choice of an exact resolution method

Results

Questions & Answers

The business problem modelled in Graph Theory

The chosen exact resolution method: an adaptation of Eppstein’s Algorithm

Conclusion and perspectives

Agenda

Page 12: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 12

An hybrid resolution method based on Bellman’s algorithm and a business heuristics (1)

For a possible couple (departure node, arrival node), we first compute the 2 circuitless quickest paths having at most p arcs, using Bellman’s algorithm several times.

THE CHOSEN APPROACHED METHOD

The final step is to sort by increasing delay the obtained paths, retaining only the 5 first ones. By the way, it is perfectly possible that we will have less than 5 paths at the end.

Then additional paths are built taking these two quickest paths as a basis, replacing each arc of these two paths by an equivalent (*) arc, whenever it is possible. (Two arcs are equivalent if they connect the same nodes)This is the core of the business heuristics.

The three steps above have to be performed for the cost metric as well.

Page 13: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 13

This algorithm computes the shortest paths between all the nodes of the directed graph and a given target node. It is based on Dynamic Programming.

SOME WORDS ON BELLMAN’S ALGORITHM

Its main advantage for the present problem is its ability to compute the shortest path having at most P arcs even more quickly than the unconstrained shortest path.

Its complexity, for a directed graph with n nodes and m arcs, is: O(n m).

An hybrid resolution method based on Bellman’s algorithm and a business heuristics (2)

Page 14: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 14

Agenda

The downstream logistics business problem

An hybrid resolution method based on Bellman’s Algorithm and a business heuristics

State of the art and choice of an exact resolution method

Results

Questions & Answers

The business problem modelled in Graph Theory

The chosen exact resolution method: an adaptation of Eppstein’s Algorithm

Conclusion and perspectives

Page 15: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 15

State of the art and choice of an exact resolution method (1)

THE ELEMENTARY PROBLEM

The business problem we have to solve was described earlier.

Until recently it has been solved using an hybrid approached method.

In order to solve it exactly, we have to find an exact resolution method for the following elementary problem:

Given a directed valuated multi-graph containing circuits that is not necessarily strongly connex, compute the K shortest circuitless paths having at most P arcs from a source node to a target node.

Page 16: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 16

State of the art and choice of an exact resolution method (2)

WHY DO WE NEED AN EXACT METHOD ?

Answer: Not only out of desire to see Science make progress… An exact method would improve our results in two ways: in fact, we suspect that the approached method, Bellman combined with an « equivalent arcs »-based  business heuristics to build supplementary paths has two drawbacks:- some « good » paths are not found and we miss them.- since the supplementary paths are not necessarily optimal, some of them can be really « bad ».

Question: Why do we not simply stick to the approached method that has been operational until now ?

This suspicion will prove to be right !

Page 17: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 17

State of the art and choice of an exact resolution method (3)

The following list is not exhaustive…Three efficient deviation algorithms retained our attention:

SOME EXACT ALGORITHMS DEALING WITH K-SHORTEST PATHS PROBLEMS

Eppstein’s Algorithm (EA and LVEA): the K shortest pathsAsymptotical complexity for the computation of the K shortest paths between a source node and a target node : O(m + n log(n) + K)

Reminder: we consider a directed graph with n nodes and m arcs.

Recursive Enumeration Algorithm (REA): the K shortest pathsAsymptotical complexity for the computation of the K shortest paths between

a source node and a target node : O(m + K n log(m / n))

Yen’s Algorithm: the K shortest circuitless pathsAsymptotical complexity for the computation of the K shortest circuitless paths

between a source node and a target node : O(K n (m + n log(n))

Page 18: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 18

State of the art and choice of an exact resolution method (4)

CHOICE OF AN EXACT RESOLUTION METHOD FOR OUR PROBLEM

The choice is to adapt Eppstein’s Algorithm in its Lazy Version (LVEA). Thus we will have an efficient algorithm computing the K shortest paths having at most P arcs between a source node and a target node.A post-filtering of these shortest paths will yield the circuitless paths among them.

Note: the adaptation is designed in such a way it builds very few paths with circuits; but there are some, hence we have to filter the results of the adaptation of Eppstein’s Algorithm to retain the circuitless paths.

Page 19: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 19

State of the art and choice of an exact resolution method (5)

SIMPLE VARIATION OF THE CHOSEN EXACT RESOLUTION METHOD THAT DOES NOT WORK

Question: we could perform a double-filtering of the results of Eppstein’s Algorithm (LVEA), to retain only the shortest paths having at most P arcs that are circuitless. Why not ?

Answer: we did try. Eppstein’s Algorithm (LVEA), in this case, performs far too many useless iterations (= iterations yielding paths whose number of arcs are strictly greater then P and/or paths containing circuits): the computation time is simply unbearable. Taking a look at the graph below, one can get convinced that this behavior is normal.

As an example, we will show that in the graph represented below, the first shortest paths will definitely contain a circuit.

1 2 3 4

5

1 day

15 days13 days

18 days

1 day10 daysTargetnode

12 days 6 2 days

1 daySourcenode

Page 20: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 20

State of the art and choice of an exact resolution method (6)

ILLUSTRATION OF K-SHORTEST PATHS WITH CIRCUITS

1 2 3 4

5

1 day

15 days13 days

18 days

1 day10 daysTargetnode

12 days 6 2 days

1 daySourcenode

The shortest path

1 2 3 4

5

1 day

15 days13 days

18 days

1 day10 daysTargetnode

12 days 6 2 days

1 daySourcenode

2nd to 4th shortest paths

The 2nd shortest path has one circuit involving the «1» and «2» nodes, the 3th two circuits, and the 4th three circuits !

Page 21: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 21

The downstream logistics business problem

An hybrid resolution method based on Bellman’s Algorithm and a business heuristics

State of the art and choice of an exact resolution method

Results

Questions & Answers

The business problem modelled in Graph Theory

The chosen exact resolution method: an adaptation of Eppstein’s Algorithm

Conclusion and perspectives

Agenda

Page 22: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 22

The exact resolution method:an adaptation of Eppstein’s Algorithm (1)

EPPSTEIN’S ALGORITHM IN A NUTSHELL: ILLUSTRATION OF THE DEVIATION ARC (also called SIDETRACK) FUNDAMENTAL CONCEPT

Given a destination node t, we define the delta function for each arc a of the graph in the following way: delta(a) = l(a) + d(head(a), t) – d(tail(a), t)l() yields the arc length, d() the minimal distance between two nodes, head() the head node of the (directed) arc and tail() its tail node.

Intuitively, delta(a) is a measure of the additional cost we have to pay if, instead of taking the shortest path from tail(a) to t, we are first sidetracked along the a arc and then follow the

shortest path from head(a) to t. If delta(a) > 0, a is a deviation arc. On the figure above, delta(a) = 6.

a

Page 23: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 23

The exact resolution method:an adaptation of Eppstein’s Algorithm (2)

This algorithm computes the k shortest paths between a source node s and a target node t.

It needs to know the shortest path connecting the nodes of each couple (source node, target node). These shortest paths can be computed and saved once and for all by the Floyd-Warshall Algorithm, whose complexity is O(n3).

Its main component is a priority queue. Each element of this priority queue is a succession of deviation arcs. We also will call such an element a succession of sidetracks.

EPPSTEIN’S ALGORITHM IN A NUTSHELL: PRESENTATION

Page 24: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 24

The exact resolution method:an adaptation of Eppstein’s Algorithm (3)

EPPSTEIN’S ALGORITHM IN A NUTSHELL: INITIALIZATION

a

A

Upon initialization, the priority queue contains only one succession of deviation arcs. And this succession contains only one deviation arc A which tails on the shortest path from s to t (shown in blue). This deviation arc is the smallest sidetrack - .i.e. the deviation arc for which delta() is minimal - among the sidetracks which tail on the shortest path from s to t. By the way, from this very sidetrack we can build the second shortest path (shown in red) from s to t: it goes from s to tail(A), then we have the arc A, and finally the shortest path from head(A) to t.

Second shortest path

Shortest path

Page 25: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 25

The exact resolution method:an adaptation of Eppstein’s Algorithm (4)

EPPSTEIN’S ALGORITHM IN A NUTSHELL: K-TH ITERATION

The k-th iteration of Eppstein’s Algorithm, which yields the k-th shortest path, consists of three steps:

- 1) the extraction from Eppstein’s Priority Queue of the succession of sidetracks that has the lowest priority. Let’s name S this succession. Let prefix(S) be S amputed from its last arc.

- 2) the building of the k-th shortest path, by linking up the Source Node to the Target Node using the sidetracks of this very succession S.

- 3) the building of several new successions of sidetracks, one built by adding an arc to S, the others built by adding an arc to prefix(S).And finally, these successions of sidetracks are inserted in Eppstein’s Priority Queue.

An illustrative schema of this process follows !

Page 26: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 26

The exact resolution method:an adaptation of Eppstein’s Algorithm (5)

EPPSTEIN’S ALGORITHM : ILLUSTRATION

Eppstein’s shortest path number 1: (3 arcs) ==> <value=5>ARC Arc__N1_N2__1 (1)ARC Arc__N2_N7__1 (1)ARC Arc__N7_N4__3 (3)

Succession of sidetracks number 2: <priority=2>ARC Arc__N7_N5__3 (3)Eppstein’s shortest path number 2: (5 arcs) ==> <value=7>ARC Arc__N1_N2__1 (1)ARC Arc__N2_N7__1 (1)ARC Arc__N7_N5__3 (3)ARC Arc__N7_N3__1 (1)ARC Arc__N3_N4__1 (1)

Succession of sidetracks number 3: <priority=5>ARC Arc__N7_N5__3 (3)ARC Arc__N5_N4__5 (5)Eppstein’s shortest path number 3: (4 arcs) ==> <value=10>ARC Arc__N1_N2__1 (1)ARC Arc__N2_N7__1 (1)ARC Arc__N7_N5__3 (3)ARC Arc__N5_N4__5 (5)

Succession of sidetracks number 4: <priority=11>ARC Arc__N1_N6__10 (10)Eppstein’s shortest path number 4: (4 arcs) ==> <value=16>ARC Arc__N1_N6__10 (10)ARC Arc__N6_N2__2 (2)ARC Arc__N2_N7__1 (1)ARC Arc__N7_N4__3 (3)

Succession of sidetracks number 5: <priority=13>ARC Arc__N1_N6__10 (10)ARC Arc__N7_N5__3 (3)Eppstein’s shortest path number5: (6 arcs) ==> <value=18>ARC Arc__N1_N6__10 (10)ARC Arc__N6_N2__2 (2)ARC Arc__N2_N7__1 (1)ARC Arc__N7_N5__3 (3)ARC Arc__N7_N3__1 (1)ARC Arc__N3_N4__1 (1)

1 23

4

5

1 day

5 days3 days

3 days

1 day1 day

Source Node

TargetNode

10 days

6

1 day

7

1 day

35 days

1st shortest path5th succession of sidetracks

5th shortest path

Page 27: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 27

The exact resolution method:an adaptation of Eppstein’s Algorithm (6)

OUR ADAPTATION: LIMITING EPPSTEIN’S ALGORITHM TO PATHS HAVING AT MOST P ARCS (General idea)

The adaptation for computing paths having at most P arcs consists in modifying the third step of Eppstein’s k-th iteration.

Thus, the Priority Queue, when running Eppstein’s Adapted Algorithm, will continuously have considerably less elements than it would have should we run the genuine algorithm.

The idea is to prevent Eppstein’s Algorithm to insert in its Priority Queue a succession of sidetracks with the following properties:a) It will yield a too long and/or not circuitless path when building the shortest paths from them by the linking process illustrated earlier.

b) All the children sidetracks built from it will have the same problem.

Page 28: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 28

The exact resolution method:an adaptation of Eppstein’s Algorithm (7)

OUR ADAPTATION: LIMITING EPPSTEIN’S ALGORITHM TO PATHS HAVING AT MOST P ARCS (part 1: the aim is to avoid too long shortest paths)

The first part of the adaptation is to insert a new built succession of sidetracks named S’ in the Priority Queue only if a necessary condition is satisfied.There are two cases:

If S’ was obtained by adding an arc to S, the condition that must be satisfied is:

it is possible to build using all the arcs of S a path having at most P-1 arcs starting from the Source Node to the head of the last arc of S !

Note: let’s still call S the succession of sidetracks that has the lowest priority, extracted

in the first step of the k-th iteration of Eppstein’s Algorithm.

If S’ was obtained by adding an arc to prefix(S), the condition that must be satisfied is:

it is possible to build using all the arcs of prefix(S) a path having at most P-1 arcs starting from the Source Node s to the head of the last arc of prefix(S) !

Page 29: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 29

The exact resolution method:an adaptation of Eppstein’s Algorithm (8)

OUR ADAPTATION: LIMITING EPPSTEIN’S ALGORITHM TO CIRCUITLESS PATHS HAVING AT MOST P ARCS (part 2: the aim is still to avoid too long shortest paths)

The second part of the adaptation is to insert a new built succession of sidetracks named S’ in the Priority Queue if an additional necessary condition is satisfied, regardless of how was obtained S’.

The necessary condition that must be satisfied to accept the insertion of S’ in Eppstein’s Priority Queue is the following:

If S’ has at least 2 arcs, let nbArcsMin1 be the minimum number of arcs between the source node s and the first arc of S’. Likewise, let nbArcsMin2 be the minimum number of arcs between the last but one arc of S’ and the target node t. Then we must have: nbArcsMin1 + nbArcsMin2 + NbSidetracks(S’) <= P !

Note: let’s still call S the succession of sidetracks that has the lowest priority, extracted

in the first step of the k-th iteration of Eppstein’s Algorithm.

Page 30: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 30

The exact resolution method:an adaptation of Eppstein’s Algorithm (9)

OUR ADAPTATION: LIMITING EPPSTEIN’S ALGORITHM TO CIRCUITLESS PATHS HAVING AT MOST P ARCS (part 3: the aim is to avoid some circuits)

The second part of the adaptation is to insert a new built succession of sidetracks named S’ in the Priority Queue if an additional necessary condition is satisfied, regardless of how was obtained S’.

The condition that must be satisfied to avoid S’ AND its children succession of sidetracks yielding surely a path with circuit, is:

If S’ has at least 3 arcs, S’ amputed of its last arc must not provoke surely a circuit when bulding a path because of its sidetracks. A trivial case: S’ amputed ot ils last arc does contain a circuit! But there are more subtle cases that are possible to test.

Note: let’s still call S the succession of sidetracks that has the lowest priority, extracted

in the first step of the k-th iteration of Eppstein’s Algorithm.

Page 31: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 31

The exact resolution method:an adaptation of Eppstein’s Algorithm (10)

OUR ADAPTATION: LIMITING EPPSTEIN’S ALGORITHM TO CIRCUITLESS PATHS HAVING AT MOST P ARCS (part 4: common sense)

It is always useful, if possible, to have the smallest possible graph when performing an Adapted Eppstein constrained shortest paths computation between a source node and a target node. We can note that it is possible before such a computation to temporarily delete from the graph:- ingoing arcs to the source node- outgoing arcs from the target node

We will obtain the same results, but using a reduced graph: this common sense observation was very useful to speed up significantly ourAdapted Eppstein Algorithm.

There are some other common sense observations we did use, which we will not explain here, and did help us.

Page 32: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 32

The exact resolution method:an adaptation of Eppstein’s Algorithm (11)

OUR ADAPTATION: LIMITING EPPSTEIN’S ALGORITHM TO PATHS HAVING AT MOST P ARCS (Which tool do we need ?)

Answer: it is necessary to compute the minimal number of arcs connecting the node A to the node B, for all possibles (A,B) couples, once and for all. This can be achieved using the Floyd algorithm, taking the number or arcs as the metric.This computation costs O(n3), n being as usual the number of nodes of the graph.

Question: in our adaptation, we always badly need, in order to decide whether the just mentioned conditions related to it can be satisfied, to know the minimal number of arcs necessary to connect a node A to another node B. It is not imaginable to compute this sort of information each time it is needed whilst Eppstein’s Adapted Algorithm is running. What can be done to make constantly available to the algorithm such an information ?

Page 33: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 33

The exact resolution method:an adaptation of Eppstein’s Algorithm (12)

Eppstein’s shortest path number 1: (3 arcs) ==> <value=5>ARC Arc__N1_N2__1 (1)ARC Arc__N2_N7__1 (1)ARC Arc__N7_N4__3 (3)

Succession of sidetracks number 2: <priority=2>ARC Arc__N7_N5__3 (3)

Succession of sidetracks number 2: <priority=11>ARC Arc__N1_N6__10 (10)

Succession of sidetracks number 2: <priority=13>ARC Arc__N1_N6__10 (10)ARC Arc__N7_N5__3 (3)

Succession of sidetracks number 2: <priority=40>ARC Arc__N1_N6__10 (10)ARC Arc__N6_N4__35 (35)Eppstein’s shortest path number 2: (2 arcs) ==> <value=45>ARC Arc__N1_N6__10 (10)ARC Arc__N6_N4__35 (35)

OUR ADAPTATION OF EPPSTEIN’S ALGORITHM: ILLUSTRATION (Here P=3, and K=5)

It is remarkable that the succession of sidetracks : Succession of sidetracks number 3: <priority=5>ARC Arc__N7_N5__3 (3)ARC Arc__N5_N4__5 (5)

does not appear any more.

1 23

4

5

1 day

5 days3 days

3 days

1 day1 day

Source Node

TargetNode

10 days

6

1 day

7

1 day

35 days

The first constrained shortest path The second constrained shortest path

Page 34: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 34

The downstream logistics business problem

An hybrid resolution method based on Bellman’s algorithm and a business heuristics

State of the art and choice of an exact resolution method

Results

Questions & Answers

The business problem modelled in Graph Theory

The chosen exact resolution method: an adaptation of Eppstein’s algorithm

Conclusion and perspectives

Agenda

Page 35: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 35

Results (1)

PROBLEM DATA:The transportation graph has hundreds of nodes, thousands of arcs, and currently 5666 couples (Departure node, Arrival node). 5 circuitless routes having at most 6 arcs were computed for each

couple for the delay metric. The same computations were performed for the cost metric.

Bellman’s Algorithm & Business heuristics (computation of 2 paths and building upon these 2 paths up to 3 supplementary paths using equivalent arcs):

25706 distinct routes were found (15133 for the delay metric, 13964 for the cost metric)Computation time: 52 seconds.

MAIN RESULTS:

Computer and compiler: AMD64 3400+. VC++ 8 in optimized mode; with sufficient RAM.

Eppstein’s Adapted Algorithm :

48826 distinct routes were found (26928 routes found for each metric)Computation time: 145 seconds. Note: an exact method must yield the same number of routes for each metric !

5526 routes found by the heuristic method are of POOR QUALITY, since they are « not even found » by the exact method.

The exact method yields 28646 good additional routes: HUGE BUSINESS IMPACT!

LESSONS LEARNT FROM THE MAIN RESULTS:

Page 36: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 36

Results (2)

This 128874 is the value of K in Eppstein’s Algorithm asymptotical complexity: O(m + n log(n) + K).

SECONDARY RESULTS:

When K is high for a couple (Departure node, Arrival Node), it is usually that the real (= not limited with at most P arcs) shortest path has more than P arcs…

The genuine Eppstein’s Algorithm (LVEA) is extremely fast, in practice.

ADDITIONAL REMARKS:

There is a couple (Departure node, Arrival node) for which the inner number of iterations of Eppstein’s adapted algorithm reaches 128874.

If we compute for the cost and the delay metrics the 5 shortest paths for all our 5666 couples (Departure node, Arrival node) with the genuine – i.e. circuits are allowed, and there is no « at most 6 arcs » constraint - Eppstein’s Algorithm in its lazy version (LVEA), the computation time is only a few seconds.

INTERESTING REMARK:

Page 37: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 37

The downstream logistics business problem

An hybrid resolution method based on Bellman’s algorithm and a business heuristics

State of the art and choice of an exact resolution method

Results

Questions & Answers

The business problem modelled in Graph Theory

The chosen exact resolution method: an adaptation of Eppstein’s algorithm

Conclusion and perspectives

Agenda

Page 38: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 38

CONCLUSION

The results of the Eppstein’s « adapted » Algorithm were shown to Renault’s Logistics Department recently. The decision was that it will go live by May 2007.

As an alternative to the Eppstein-based resolution method, we could also test in the future Yen’s algorithm with a post-filtering of its routes to keep only the ones having at most P arcs; and see whether it outperforms the present resolution method or not. It is less interesting now in January 2007 (It was not the case in February 2006) , since we improved – we hope to its maximum – the Adaptation of Eppstein’s Algorithm to a point that is satisfactory.

So, further research on this topic would be « Pour la Science » only…

Conclusion and perspectives (1)

PERSPECTIVES

Page 39: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 39

Conclusion and perspectives (2)

BIBLIOGRAPHY

[2] "M. Jiménez, Andrés Marzal: A lazy version of Eppstein’s K shortest paths algorithm. "Second international workshop, WEA 2003, Ascona, Switzerland, May 26-28, 2003. Proceedings.

[1] "Eppstein D.: Finding the k Shortest Paths. "IEEE Symposium on Foundations of Computer Science 1997.

[3] "P.Lacomme, C.Prins, M.Sevaux: Algorithmes de graphes. " Eyrolles 2003.

Page 40: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 40

The downstream logistics business problem

An hybrid resolution method based on Bellman’s algorithm and a business heuristics

State of the art and choice of an exact resolution method

Results

Questions & Answers

The business problem modelled in Graph Theory

The chosen exact resolution method: an adaptation of Eppstein’s algorithm

Conclusion and perspectives

Agenda

Page 41: Hervé BRICARD – Optimization Group - IT department 2007, January 26th, Bordeaux LABRI. An adaptation of Eppstein’s algorithm building, for a given directed

P / 41

Questions & Answers

Thank you for your attention.

Any question ?

Email: [email protected]