Abstract

We deal with an algorithm that, once origin and destination are fixed, individuates the route that permits to reach the destination in the shortest time, respecting an assigned maximal travel time, and with risks measure below a given threshold. A fluid dynamic model for road networks, according to initial car densities on roads and traffic coefficients at junctions, forecasts the future traffic evolution, giving dynamical weights to a constrained 𝐾 shortest path algorithm. Simulations are performed on a case study to test the efficiency of the proposed procedure.

1. Introduction

Traffic congestion on networks occurs in presence of an excess use of vehicles on a portion of roadway and is characterized by stopped or stop-and-go traffic, slower speeds, longer trip times, and increased queueing. Incidents (such as accidents or even a single car breaking heavily in a previously smooth flow) may cause ripple effects which then spread out and create a sustained traffic jam. The presence of hard congestions on urban networks provoke delays, which may result in late arrival and interference with emergency vehicles passage to reach their destinations. The shortest path is not often the less congested one and/or the most safe one, so it is crucial to forecast travel times and to find the shortest path taking into account the traffic conditions and the risks along the path.

Finding the 𝐾 shortest paths is a classical network optimization problem and it has a great practical interest, with a wide variety of real world applications, such as transport, communication, and distribution networks, for which finding alternative paths plays an important role, in particular when some nodes are temporarily unreachable through the optimal route, because some links are obstructed or unavailable.

In such a context, we propose an algorithm that, once an origin π‘œ and a destination 𝑑 on a graph are fixed, identifies the path that connects π‘œ and 𝑑 and minimizes forecasted travel times, satisfying a maximal travel time and a maximal accepted risks threshold. In particular, following [1] and considering additional constraints on risk levels and dynamical travel times, we use a particular extension of the generic label-correcting method for solving the classical single-origin all-destinations shortest path problem (see, e.g., [2, 3]). The aim is to satisfy the user request: a driver could prefer a route with minimal travel time even if the trip is not safe, a longer but with no risks trip, or a safe and short path.

Here the travel times are estimated using a fluid dynamic model (see [4, 5]), where the cars evolution on each road is given by a conservation law [6–8], while the dynamics at junctions is uniquely solved adopting the following rules: the incoming traffic at a node is distributed to outgoing roads according to some fixed distribution coefficients; drivers behave so as to maximize the flux through the junction. A further rule (yielding criterion) is needed if the number of incoming roads is greater than that of outgoing ones.

The algorithm, that allows to identify the optimal path, is as follows. Fix an origin π‘œ and a destination 𝑑 in a road network graph. From the initial densities on roads, we predict future densities and then travelling times on all network roads. The latter are the weights of a Constrained 𝐾-Shortest Paths algorithm (CKSPa). Using a further procedure (analyzed in [9]), that computes the trajectory of a car on a network, we compute the time 𝑑1 at which a car reaches the successive node 𝑠1. At 𝑑1, if the current density conditions are different from the forecasted ones, average density values on roads are computed invoking again the simulator with new initial conditions and the new densities are used as weights (travel times) that the CKSPa needs to select the optimal arc among those outgoing from 𝑠1. The time 𝑑2 a car needs to cover the latter arc is computed; at 𝑑2, new weights are obtained by the density values and the CKSPa indicates the new arc of the optimal path; and so on, until the destination π‘œ is reached.

The goodness of this procedure is studied via simulations (numerics are obtained using [10–12]). We consider the case study of a portion of the Caltanissetta urban network, in Italy, and determine through the CKSPa the optimal route connecting an origin π‘œ and a destination 𝑑. It is shown that the time to cross the optimal route is lower than times needed to cover all the other possible paths joining π‘œ and 𝑑. Notice that the optimal path is time-variable, as weights continuously change due to the densities evolutions on road. Hence different paths are found if the travel starts in different times with different traffic conditions.

We remark that the fluid dynamic model needs real traffic data as initial densities on the road network in order to obtain simulations reproducing real phenomena. Then, the idea is to get data detected by special sensors installed in some points of each road or by databases containing traffic information. A procedure to reconstruct the initial density by detected real traffic data and to calibrate the fluid dynamic model is shown in [13].

The paper is organized as follows. Section 2 reports the model for urban networks, giving details about the construction of Riemann Solvers at junctions and numerical schemes for densities on roads. In Section 3, the Constrained 𝐾-Shortest Paths Problem is described. The integration of the fluid dynamic model and the CKSPa is presented in Section 4. Finally Section 5 deals with simulations for the case study. The paper ends in Section 6 through conclusions.

2. Fluid-Dynamic Traffic Flow Model

A road network is described by a couple (ℐ,π’₯), where ℐ is the set of roads, modelled by intervals [π‘Žπ‘–,𝑏𝑖]βŠ‚β„, 𝑖=1,…,𝑁, and π’₯ the collection of junctions. On each road, the traffic evolution is given by the conservation law:πœ•π‘‘πœŒ+πœ•π‘₯𝑓(𝜌)=0,(1) where 𝜌=𝜌(𝑑,π‘₯)∈[0,𝜌max] represents the cars density, 𝜌max is the maximal density, while 𝑓(𝜌)=πœŒπ‘£(𝜌) is the flux with 𝑣(𝜌) the average velocity. We assume that(F)𝑓 is a strictly concave 𝐢2 function such that 𝑓(0)=𝑓(𝜌max)=0.

Choosing a decreasing velocity function 𝑣(𝜌)=𝑣max(1βˆ’πœŒ/𝜌max), 𝜌∈[0,𝜌max], and setting 𝑣max=𝜌max=1, a flux function ensuring (F) is[],𝑓(𝜌)=𝜌(1βˆ’πœŒ),𝜌∈0,1(2) which has a unique maximum 𝜎=1/2.

Dynamics at junctions is described solving Riemann Problems (RPs) and Cauchy Problems with a constant initial datum for each incoming and outgoing road (see [4, 5]).

Fix a junction 𝐽 of π‘›Γ—π‘š type (𝑛 incoming roads πΌπœ‘, πœ‘=1,…,𝑛, and π‘š outgoing roads πΌπœ“, πœ“=𝑛+1,…,𝑛+π‘š) and an initial datum 𝜌0=(𝜌1,0,…,πœŒπ‘›,0,πœŒπ‘›+1,0,…,πœŒπ‘›+π‘š,0).

Definition 1. A Riemann Solver (RS) for the junction 𝐽 is a map RS∢[0,1]𝑛×[0,1]π‘šβ†’[0,1]𝑛×[0,1]π‘š that associates to 𝜌0 a vector Μ‚πœŒ=(Μ‚πœŒ1,…,Μ‚πœŒπ‘›,0,Μ‚πœŒπ‘›+1,…,Μ‚πœŒπ‘›+π‘š) so that the solution on an incoming road πΌπœ‘ is the wave (πœŒπœ‘,0,Μ‚πœŒπœ‘) and on an outgoing one πΌπœ“ is the wave (Μ‚πœŒπœ“,πœŒπœ“,0). We require the following conditions hold: (C1) RS(RS(𝜌0))=RS(𝜌0); (C2) on each road πΌπœ‘ the wave (πœŒπœ‘,0,Μ‚πœŒπœ‘) has negative speed, while on each road πΌπœ“ the wave (Μ‚πœŒπœ“,πœŒπœ“,0) has positive speed.

If π‘šβ‰₯𝑛, a possible RS at 𝐽 is defined by the following rules:(A)Car traffic is distributed at 𝐽 according to some coefficients, collected in a traffic distribution matrix 𝐴=(π›Όπœ“,πœ‘), πœ‘=1,…,𝑛, πœ“=𝑛+1,…,𝑛+π‘š, 0<π›Όπœ“,πœ‘<1, βˆ‘π‘›+π‘šπœ“=𝑛+1π›Όπœ“,πœ‘=1. The πœ‘ column of 𝐴 indicates the percentages of traffic that, from the incoming road πΌπœ‘, distribute to the outgoing roads.(B)Fulfilling (A), drivers maximize the flux through 𝐽.If 𝑛>π‘š, a further rule (a yielding criterion) is necessary:(C)Assume that not all cars can enter the outgoing roads, and let 𝐢 be the amount that can do it. Then, π‘πœ‘πΆ cars come from the first incoming road πΌπœ‘, where π‘πœ‘βˆˆ]0,1[ is the right of way parameter of road πΌπœ‘, πœ‘=1,…,𝑛, and βˆ‘π‘›πœ‘=1π‘πœ‘=1.Assuming an initial datum 𝜌0 and the flux function (2), the solution Μ‚πœŒ=π‘“βˆ’1(̂𝛾) to the RS at 𝐽 is defined by Μ‚πœŒπœ‘βˆˆβŽ§βŽͺ⎨βŽͺβŽ©ξ€½πœŒπœ‘,0ξ€Ύβˆͺξ€»πœξ€·πœŒπœ‘,0ξ€Έξ€»,1,if0β‰€πœŒπœ‘,0≀12,12ξ‚„1,1,if2β‰€πœŒπœ‘,0≀1,Μ‚πœŒπœ“βˆˆβŽ§βŽͺ⎨βŽͺβŽ©ξ‚ƒ10,2ξ‚„,if0β‰€πœŒπœ“,0≀12,ξ€½πœŒπœ“,0ξ€Ύβˆͺξ€Ίξ€·πœŒ0,πœπœ“,01ξ€Έξ€Ί,if2β‰€πœŒπœ“,0≀1,(3) where 𝜏∢[0,1]β†’[0,1] is the map such that 𝑓(𝜏(𝜌))=𝑓(𝜌) for every 𝜌∈[0,1] and 𝜏(𝜌)β‰ πœŒ for every 𝜌∈[0,1]⧡{1/2}.

2.1. Riemann Solvers

Focus on a junction 𝐽 of π‘›Γ—π‘š type. We indicate the cars density on incoming and outgoing roads, respectively, by πœŒπœ‘(𝑑,π‘₯)∈[0,1], (𝑑,π‘₯)βˆˆβ„+Γ—πΌπœ‘, πœŒπœ“(𝑑,π‘₯)∈[0,1], (𝑑,π‘₯)βˆˆβ„+Γ—πΌπœ“. From condition (C2), fixing the flux function (2) and assuming 𝜌0=(𝜌1,0,…,πœŒπ‘›,0,πœŒπ‘›+1,0,…,πœŒπ‘›+π‘š,0) as the initial datum of an RP at 𝐽, the maximal flux values on roads are defined byπ›Ύπœ‘max=⎧βŽͺ⎨βŽͺβŽ©π‘“ξ€·πœŒπœ‘,0ξ€Έ,if0β‰€πœŒπœ‘,0≀12,𝑓121,if2β‰€πœŒπœ‘,0𝛾≀1,πœ“max=⎧βŽͺ⎨βŽͺβŽ©π‘“ξ‚€12,if0β‰€πœŒπœ“,0≀12,π‘“ξ€·πœŒπœ“,0ξ€Έ1,if2β‰€πœŒπœ“,0≀1.(4)

2.1.1. A 1Γ—1 Junction

For a 1Γ—1 junction, with incoming road indicated by 1 and outgoing one by 2, the flux solution to the RP at 𝐽 is ̂𝛾=(Μ‚π›Ύπ‘Ž,Μ‚π›Ύπ‘Ž), where Μ‚π›Ύπ‘Ž=min{π›Ύπ‘Žmax,𝛾𝑏max}.

2.1.2. A 1Γ—2 Junction

Consider a 1Γ—2 junction and label the incoming road by 1 and outgoing roads by 2 and 3. If π›Όβˆˆ]0,1[ and 1βˆ’π›Ό indicate, respectively, the percentage of cars that, from road 1, goes to the outgoing roads 2 and 3, the flux solution to the RP at 𝐽 is ̂𝛾=(̂𝛾1,𝛼̂𝛾1,(1βˆ’π›Ό)̂𝛾1), where ̂𝛾1=min{𝛾1max,𝛾2max/𝛼,𝛾3max/(1βˆ’π›Ό)}.

2.1.3. A 2Γ—1 Junction

Fix a 2Γ—1 junction and indicate by 1 and 2 the incoming roads, and by 3 the outgoing road. In this case, we have only a right of way parameter, 𝑝. Since, from rule (B), the aim is to maximize the through traffic, we set ̂𝛾3=min{𝛾1max+𝛾2max,𝛾3max}. Introduce the following conditions:(A1)𝑝𝛾3max<𝛾1max; (A2)(1βˆ’π‘)𝛾3max<𝛾2max.

If ̂𝛾3=𝛾1max+𝛾2max, then ̂𝛾=(𝛾1max,𝛾2max,𝛾1max+𝛾2max). If ̂𝛾3=𝛾3max, we have the following:(i)̂𝛾=(𝑝𝛾3max,(1βˆ’π‘)𝛾3max,𝛾3max), when (A1) and (A2) are both satisfied;(ii)̂𝛾=(𝛾3maxβˆ’π›Ύ2max,𝛾2max,𝛾3max), when (A1) is satisfied and (A2) does not hold;(iii)̂𝛾=(𝛾1max,𝛾3maxβˆ’π›Ύ1max,𝛾3max), when (A1) is not satisfied and (A2) holds.

Conditions (A1) and (A2) are never both false, otherwise 𝛾3max>𝛾1max+𝛾2max.

2.1.4. A 2Γ—2 Junction

For a junction of 2 × 2 type, with incoming roads 1 and 2, and outgoing roads 3 and 4, the traffic distribution matrix 𝐴 assumes the form:βŽ›βŽœβŽœβŽπ›Όπ΄=3,1𝛼3,2𝛼4,1𝛼4,2⎞⎟⎟⎠(5) where 𝛼3,1 and 𝛼3,2 are the probabilities that drivers go, respectively, from road 1 and road 2 to road 3 and 𝛼4,1=1βˆ’π›Ό3,1, 𝛼4,2=1βˆ’π›Ό3,2. Let us suppose that 𝛼3,1≠𝛼3,2 in order to ensure uniqueness of solutions.

From rule (A), it follows that ̂𝛾3=𝛼3,1̂𝛾1+𝛼3,2̂𝛾2, ̂𝛾4=(1βˆ’π›Ό3,1)̂𝛾1+(1βˆ’π›Ό3,2)̂𝛾2. From rule (B), we have that the incoming fluxes Μ‚π›Ύπœ‘, πœ‘=1,2, are solutions of the linear programming problem max (𝛾1+𝛾2), with 0β‰€π›Ύπœ‘β‰€π›Ύπœ‘max, πœ‘=1,2, 0≀𝛼3,1𝛾1+𝛼3,2𝛾2≀𝛾3max, 0≀(1βˆ’π›Ό3,1)𝛾1+(1βˆ’π›Ό3,2)𝛾2≀𝛾4max.

Observe that, for all the examined junctions types, once ̂𝛾 is known, Μ‚πœŒ is found by (3).

2.2. Numerical Approximations

To construct numerical approximations for the density 𝜌(𝑑,π‘₯), whose evolution is ruled by (1), we apply the Godunov scheme (see [10–12]). Assume the flux (2). We introduce a numerical grid with(i)Ξ”π‘₯ being the space grid size on each road 𝐼𝑖;(ii)Δ𝑑 being the time grid size on the time interval [0,𝑇];(iii)𝐿 and 𝑀, respectively, being the number of time and space nodes of the grid;(iv)(𝑑𝑙,π‘₯π‘š)=(𝑙Δ𝑑,π‘šΞ”π‘₯), for 𝑙=0,1,…,𝐿 and π‘š=0,1,…,𝑀, being the grid points.

Using the notation πœŒπ‘™π‘š=𝜌(𝑑𝑙,π‘₯π‘š), the Godunov scheme is expressed as follows:πœŒπ‘šπ‘™+1=πœŒπ‘™π‘šβˆ’Ξ”π‘‘ξ€·π‘“Ξ”π‘₯πΊξ€·πœŒπ‘™π‘š,πœŒπ‘™π‘š+1ξ€Έβˆ’π‘“πΊξ€·πœŒπ‘™π‘šβˆ’1,πœŒπ‘™π‘š,𝑙=0,1,…,πΏβˆ’1,π‘š=0,1,…,𝑀,(6) where Δ𝑑 and Ξ”π‘₯ satisfy the CFL condition Δ𝑑≀Δπ‘₯/2, and 𝑓𝐺(𝑒,𝑣) is the numerical flux given byπ‘“πΊβŽ§βŽͺβŽͺ⎨βŽͺβŽͺ⎩1(𝑒,𝑣)=min(𝑓(𝑒),𝑓(𝑣)),𝑒≀𝑣,𝑓(𝑒),𝑣<𝑒<2,𝑓121,𝑣<21<𝑒,𝑓(𝑣),2<𝑣<𝑒.(7)

Boundary conditions are imposed for incoming roads not linked on the left and outgoing roads not linked on the right. In particular, for roads connected at the right endpoint, the interaction at a junction is given byπœŒπ‘€π‘™+1=πœŒπ‘™π‘€βˆ’Ξ”π‘‘ξ€·Ξ”π‘₯Μ‚π›Ύπœ‘βˆ’π‘“πΊξ€·πœŒπ‘™π‘€βˆ’1,πœŒπ‘™π‘€,ξ€Έξ€Έ(8) while, for roads connected at the left endpoint, we have𝜌0𝑙+1=πœŒπ‘™0βˆ’Ξ”π‘‘ξ€·π‘“Ξ”π‘₯πΊξ€·πœŒπ‘™0,πœŒπ‘™1ξ€Έβˆ’Μ‚π›Ύπœ“ξ€Έ,(9) where Μ‚π›Ύπœ‘ and Μ‚π›Ύπœ“ are the fluxes, respectively, on incoming and outgoing roads, computed using RSs at junctions.

3. Constrained K-Shortest Paths Problem

Consider a road network (ℐ,π’₯) and an integer 𝐾>1. Assigned an origin π‘œ and a destination 𝑑, according to the user profile and hence the available travelling time and the maximal accepted risk, the problem of finding 𝐾 alternative paths from π‘œ to 𝑑 is known as Constrained 𝐾-Shortest Paths Problem, CKSPP. In particular, we refer to a specified constraints class, the Recursive Path Constraints, RPC, which considers more arcs in one time, evaluating their admissibility, conditioned on the presence of previous arcs in the path.

We deal with a modification of the study proposed in [1], taking into account(i)an origin π‘œ and a destination 𝑑;(ii)a maximal number 𝐾max of paths to generate;(iii)time instant in which the request by the user occurs;(iv)predicted travel times 𝑑𝑖𝑗, dependent on the day hours, for the arc 𝐼=(𝑖,𝑗)βˆˆβ„, that connects nodes 𝑖 and 𝑗belonging to π’₯;(v)risk π‘Ÿπ‘–π‘— for the arc 𝐼=(𝑖,𝑗)βˆˆβ„, joining nodes 𝑖 and 𝑗in π’₯; the risk measure goes from 0 (extremely safe) to 10 (extremely unsafe);(vi)a maximal time 𝑇 to complete the path;(vii)a maximal risk level 𝑅.

The aim is to individuate 𝐾 paths (𝐾≀𝐾max) from the origin π‘œ to the destination 𝑑 which minimize the travelling time, under constraints on the maximal path time and the risk level. We indicate by π‘Ÿπ‘—(π‘˜) the risk to reach the node 𝑗 through the π‘˜-th path 𝑃(π‘˜), by 𝑀𝑗(π‘˜) the number of occurrence of node 𝑗 in the π‘˜-th path, and by 𝑑𝑗(π‘˜) an upper bound for the length of the π‘˜-th path from the origin π‘œ to the node 𝑗.

A π‘˜-th path is admissible if π‘Ÿπ‘—(π‘˜)≀𝑅 and 𝑀𝑗(π‘˜)≀1 for all π‘—βˆˆπ’₯.

In what follows we use the following dominance criterion: let 𝑃1(π‘˜) and 𝑃2(π‘˜) be two π‘˜-th paths to which labels (𝑑1(π‘˜),π‘Ÿ1(π‘˜),𝑃1(π‘˜)) and (𝑑2(π‘˜),π‘Ÿ2(π‘˜),𝑃2(π‘˜)) are associated. Then, 𝑃1(π‘˜) dominates 𝑃2(π‘˜) if: 𝑑2(π‘˜)β‰₯𝑑1(π‘˜); π‘Ÿ2(π‘˜)β‰₯π‘Ÿ1(π‘˜); |𝑃2(π‘˜)|β‰₯|𝑃1(π‘˜)|; at least one inequality is satisfied in strict sense.

We report the pseudocode of the proposed algorithm. Initially,π‘‘π‘œ(π‘˜)=0,π‘˜=1,…,𝐾max,𝑑𝑑(π‘˜)=∞,βˆ€π‘‘β‰ π‘œ,π‘˜=1,…,𝐾max,π’₯(1)={π‘œ},π’₯(π‘˜)=βˆ…,βˆ€π‘˜β‰ 1.(10) For all πœ‰=1,…,𝐾max,(1)remove a node 𝑖 from π’₯(πœ‰);ξ‚†βˆ€π‘—βˆˆπ’₯⧡{π‘œ}:(𝑖,𝑗)βˆˆβ„,𝑀𝑗(πœ‰)𝑑=0,𝑖(πœ‰)+𝑑𝑖𝑗≀𝑇,π‘Ÿπ‘–(πœ‰)+π‘Ÿπ‘–π‘—ξ‚‡;≀𝑅(11) find, if it is possible, the smallest index π‘˜β‰€πΎmax such that(a)if𝑑(π‘—π‘˜)=𝑑𝑖(πœ‰)+𝑑𝑖𝑗,𝑑𝑖(πœ‰)+𝑑𝑖𝑗,π‘Ÿπ‘–(πœ‰)+π‘Ÿπ‘–π‘—,𝑃(πœ‰)𝑑βˆͺ𝑗dominates(π‘—π‘˜),π‘Ÿ(π‘—π‘˜),𝑃(π‘˜),(12) set𝑑(π‘—π‘˜)βŸ΅π‘‘π‘–(πœ‰)+𝑑𝑖𝑗;π‘Ÿ(π‘—π‘˜)βŸ΅π‘Ÿπ‘–(πœ‰)+π‘Ÿπ‘–π‘—;𝑀(π‘—π‘˜)βŸ΅π‘€π‘—(πœ‰)𝑑+1;(π‘—π‘˜)βŸ΅π‘‘π‘–(πœ‰)+𝑑𝑖𝑗;𝑃(π‘˜)βŸ΅π‘ƒ(π‘˜)βˆͺ𝑗.(13) Erase the paths (𝑑𝑗(π‘˜),π‘Ÿπ‘—(π‘˜),𝑃(π‘˜)), π‘˜=Μƒπ‘˜π‘˜+1,…,, dominated by (𝑑(π‘—π‘˜),π‘Ÿ(π‘—π‘˜),𝑃(π‘˜)), where Μƒπ‘˜ is the greatest index such that Μƒπ‘˜π‘˜β‰€, and 𝑑(Μƒπ‘˜)𝑗<∞.

Update in coherent way 𝑑𝑗(π‘˜), π‘Ÿπ‘—(π‘˜), and 𝑀𝑗(π‘˜) for all π‘˜ such that (𝑑𝑗(π‘˜),π‘Ÿπ‘—(π‘˜),𝑃(π‘˜)) is not dominated;(b)if𝑑(π‘—π‘˜)>𝑑𝑖(πœ‰)+𝑑𝑖𝑗,𝑑𝑖(πœ‰)+𝑑𝑖𝑗,π‘Ÿπ‘–(πœ‰)+π‘Ÿπ‘–π‘—,𝑃(πœ‰)𝑑βˆͺ𝑗dominates(π‘—π‘˜βˆ’1),π‘Ÿ(π‘—π‘˜βˆ’1),𝑃(π‘˜βˆ’1),(14)

set𝑑(π‘—π‘˜)βŸ΅π‘‘π‘–(πœ‰)+𝑑𝑖𝑗;π‘Ÿ(π‘—π‘˜)βŸ΅π‘Ÿπ‘–(πœ‰)+π‘Ÿπ‘–π‘—;𝑀(π‘—π‘˜)βŸ΅π‘€π‘—(πœ‰)𝑃+1;(π‘˜)βŸ΅π‘ƒ(π‘˜)βˆͺ𝑗.(15) Erase the paths (𝑑𝑗(π‘˜),π‘Ÿπ‘—(π‘˜),𝑃(π‘˜)), π‘˜=Μƒπ‘˜π‘˜+1,…,, dominated by (𝑑(π‘—π‘˜),π‘Ÿ(π‘—π‘˜),𝑃(π‘˜)), where Μƒπ‘˜ is the greatest index such that Μƒπ‘˜π‘˜β‰€, and 𝑑(Μƒπ‘˜)𝑗=∞.

Update in coherent way 𝑑𝑗(π‘˜), π‘Ÿπ‘—(π‘˜), and 𝑀𝑗(π‘˜) for all π‘˜ such that (𝑑𝑗(π‘˜),π‘Ÿπ‘—(π‘˜),𝑃(π‘˜)) is not dominated; for all π‘˜=Μƒπ‘˜,…,π‘˜+1: if (𝑑𝑗(π‘˜),π‘Ÿπ‘—(π‘˜),𝑃(π‘˜)) has been erased, remove 𝑗 from π’₯(π‘˜); otherwise, if π‘—βˆ‰π’₯(π‘˜), add 𝑗 to π’₯(π‘˜).(2)if π’₯(πœ‰)β‰ βˆ…, go to Step 1.

According to the node selection policy adopted in Step 1, a label setting method is used (see [1]), in which, at each iteration, the node 𝑖 exiting π’₯(πœ‰), πœ‰=1,…,𝐾max is the node with the minimum label. Due to the assumption of the nonnegative arc lengths, node 𝑖, once removed, has a permanent label value.

4. Integration of Traffic Flow Simulator with CKSPa

Fix an origin π‘œ and a destination 𝑑 in a urban network graph. The optimal route, joining π‘œ and 𝑑, is found using the CKSPa and weighting the arcs with travel times.

As risk coefficients we consider earthquakes, high accidents rate, landslides, floods, high crime zones, and so forth. To each arc we associate a risk, given as the average value on all risk parameters related to the arc with values ranging from 0 to 10. The latter are obtained from historical series.

Variable travel times are computed using the fluid-dynamic model. Fixing the arc 𝐼=(𝑖,𝑗)βˆˆβ„, that connects nodes 𝑖 and 𝑗 belonging to π’₯, the time to cross 𝐼, namely, the weight 𝑑𝑖𝑗, follows the relation:𝑑𝑖𝑗(ξ€œπ‘‘)=𝐼𝑑π‘₯π‘£ξ€·πœŒπΌξ€Έ,(𝑑,π‘₯)(16) with 𝑣(𝜌𝐼)=1βˆ’πœŒπΌ being the velocity and 𝐿𝐼 being the length of 𝐼.

Since the traffic conditions can change during the trip, when the passenger is near a junction, a new simulation is invoked if current densities are different from those predicted by the model. The time in which a single vehicle reaches the junctions is estimated considering that the position of the car driver, π‘₯=π‘₯(𝑑), along a arc is obtained solving the Cauchy problem:⎧βŽͺ⎨βŽͺ⎩π‘₯𝑑̇π‘₯=𝑣(𝜌(𝑑,π‘₯)),inξ€Έ=π‘₯in,(17) where π‘₯in is the initial position at the initial time 𝑑in (see [9]).

For finding the optimal route on the network in a generic time instant 𝑑0, the CKSPa individuates, among all possible arcs exiting from the origin π‘œ, the arc πΌπœ“ with minimal travel time π‘‘π‘œπœ“(𝑑0) connecting π‘œ with the node πœ“. The second arc of the optimal path is found estimating the time 𝑑1 a car needs to cross the arc πΌπœ“ according to (17). At the time instant 𝑑1, arc weights are updated using (16) invoking a new simulation if it is necessary and the CKSPa indicates, among all arcs exiting from the node πœ“, the arc πΌπœ“β€², that connects the nodes πœ“ and πœ“ξ…ž with weight π‘‘πœ“πœ“β€²(𝑑1). The time 𝑑2 a car needs to cover πΌπœ“β€² is computed again using (17); at 𝑑2, new arc weights (if it is necessary) are obtained and the CKSPa determines the new arc of the optimal path; and so on, until the destination 𝑑 is reached.

Notice that the choice of the initial time 𝑑0 strongly influences the evolution of the optimal path. This is a direct consequence of the temporal evolution of densities on arcs.

5. A Case Study

The case study is a portion of the real urban network in Caltanissetta, Italy. In Figure 1, we report the geographical map of the chosen network, inside the rectangle, with origin and destination points.

The network as in the graph of Figure 2 consists of 47 nodes, labelled as 𝑗𝑖, 𝑖=1,…,47, and 13 roads, identified by 86 segments (see Table 1). We have 10 incoming roads (1, 5, 24, 35, 40, 47, 52, 57, 69, 83) and 11 outgoing ones (2, 4, 22, 26, 30, 36, 38, 45, 51, 55, 65), while the others are inner.

Fixing the origin π‘œ=𝑗2 and the destination 𝑑=𝑗32, four different paths 𝑃𝑖, 𝑖=1,2,3,4, indicated as sequential ordered sets of roads, connect π‘œ and 𝑑:𝑃1=Ξ›1βˆͺΞ›2,𝑃2=Ξ›1βˆͺΞ›3,𝑃3=Ξ›4βˆͺΞ›2,𝑃4=Ξ›4βˆͺΞ›3,(18) where Ξ›1, Ξ›2, Ξ›3, and Ξ›4 are defined asΞ›1={7,9,11,12,13,15,17},Ξ›2Ξ›={18,19,20,21},3=Ξ›{67,68,70,71,76,82,84,21},4={7,43,44,46,48,50,53,56,58,60,13,15,17}.(19) Risk parameters for all road segments are in Table 2.

The analysis of the various paths is made considering six different simulation cases whose characteristics are the following.

Case A
Initial conditions are zero for all roads (namely empty network); boundary data: 0.1 for road 35; 0.2 for roads 1, 5, 40, 47, 52, and 57; 0.4 for road 24, 69, and 83; 1 for all outgoing roads; and maximal time 𝑇 and maximal risk level 𝑅 equal to 200 and 100, respectively.

Case B
Initial conditions are zero for all roads; boundary data: 0.1 for road 35; 0.2 for roads 1, 5, 40, 47, 52, 57, 69, and 83; 0.4 for roads 24; 1 for all outgoing roads; and maximal time and maximal risk as in Case A.

Case C
Initial conditions are zero for all roads, with the exception of roads 70, 71, 76, and 82 with initial datum 0.3; roads 67 and 68, for which the initial datum is 0.4; roads 9, 11 and 12 with initial datum 0.7; boundary data: 0.01 for roads 47, 52, and 57; 0.1 for road 35; 0.2 for roads 1, 5, and 40; 0.3 for roads 69 and 83; 0.4 for road 24; 1 for all outgoing roads; and maximal time as in Case A and maximal risk level 𝑅=400.

Case D
Initial conditions are zero for all roads, with the exception of roads 13 and 15 with initial datum 0.5; roads 9, 11, and 12, for which the initial datum is 0.7; roads 18, 19 and 20 with initial datum 0.9; boundary data: 0.01 for roads 52, 57, 69, and 83; 0.1 for roads 1, 5, 24, 35, 40, and 47; and 1 for all outgoing roads. Maximal time as in Case A and maximal risk level 𝑅 are equal to 500.

Case E
Initial conditions, boundary data, and maximal time are as in Case A; maximal risk level is 𝑅=29.

Case F
Initial conditions, boundary data, and maximal time are as in Case A; maximal risk level is 𝑅=31.

Notice that a boundary datum equal to 𝜌max=1 on outgoing roads indicates that high congestion phenomena may occur when the car traffic flows out of the network. Moreover, the difference in initial conditions discriminates the traffic behaviour, hence leading to a probable different choice of the optimal path.

For all previous simulation cases, right of way parameters and distribution coefficients are chosen as in Tables 3, 4, and 5.

5.1. Simulation Results

Densities on network roads are evaluated numerically by the Godunov scheme, with space step Ξ”π‘₯=0.1 and time step determined by the CFL condition.

For each simulation case we have a different optimal path, as reported in Table 6, due to the different evolution of densities when different maximal risk levels and initial and boundary conditions are used. The maximal travel time constraint is satisfied in all cases by the optimal path.

The goodness of the obtained results is also confirmed estimating the time π‘‡π‘œπ‘‘ a car needs to reach the destination 𝑗32, starting from the origin 𝑗2 (numerics are in [9]), in the different cases for all the alternative paths (see Table 7, where lengths in Kilometers and the sum of risks along paths, Sr, are also reported).

First of all, notice that, as maximal risk levels are very high for Cases A, B, C, and D, the computation of the optimal path in such cases is influenced only by times π‘‡π‘œπ‘‘. In Case A, the optimal path is the shortest one, 𝑃2, unlike Case C, where the optimal route has the highest length. In fact for Case C, 𝑃2 is more congested than 𝑃1, 𝑃3, and 𝑃4.

Cases A, E, and F have the same times π‘‡π‘œπ‘‘ as they have the same initial conditions and boundary data but a different maximal risk level. However, while Cases A and F have the same optimal route 𝑃2, since it respects risk constraint, in Case E, due to the maximal risk level, lower than those of Cases A and F, 𝑃1 is the better path. Notice that the determination of 𝐾-Shortest Paths together with the computation of the total risk associated to each path allows to choose not the optimal path in terms of travel times but the one with a lower level risk, and a π‘‡π‘œπ‘‘ not far from the lowest one.

We make a further analysis on the density evolutions for some roads of the junction 𝑗5. Notice that, from road 7, a driver can choose road 9 or 43. In Figures 3 and 4, we report the behaviour of densities on such roads for simulation Cases B and C.

In Case C, road 43 belongs to the optimal path 𝑃3 and its density grows slowly, as the one of road 9 does. Indeed, the density values on the two roads are very different; road 9 has a higher traffic due to the superpositions of more rarefaction traffic waves with respect to road 43 with 0.060828 and 0.413329 maximal densities on roads 43 and 9, respectively.

Case B is more interesting. Road 9 belonging to the optimal path 𝑃1 has a quick evolution of density with respect to the one of road 43. High-density fluctuations are the result of dynamics at junctions 𝑗4,𝑗5, and 𝑗6: road 8 shock waves coming from roads 41 and traffic flow coming from road 40. In particular the maximal value of the density reached on road 9 is 0.346572, while on road 43 the density is less than or equal to 0.060384. This does not contradict the fact that the average travel time is minimized going on road 9, since the path 𝑃1 is less congested than the paths 𝑃3 and 𝑃4, determined by the choice of road 43 at junction 𝑗5.

6. Conclusions

In this paper, it is proposed an algorithm that, given an origin π‘œ and a destination 𝑑 on a road network graph, computes the 𝐾 optimal paths to follow using a modified version of a CKSPa, whose weights are determined by a fluid-dynamic model for road networks.

The procedure for finding the best paths has been tested via simulations on a real portion of the urban network in Caltanissetta, Italy. The optimal path connecting π‘œ and 𝑑 has been evaluated using as weights the predicted travel times along roads, respecting the constraints on the maximal travelling time and the maximal risk coefficient accepted on the path. The goodness of the optimal path has been confirmed determining the trajectory of a car on it; it is proven that the time to cross the optimal route is lower than times needed to cover all the other possible paths connecting π‘œ and 𝑑. The dependence of the algorithm from the traffic conditions has been analyzed.