# Managing Emergency Situations in VANET Through Heterogeneous Technologies Cooperation
## 5 Distributed ITS Tasks
### Road Management  
In this sub-section we introduce the way the considered geographical area has been modeled in order to apply the proposed idea. The aim of proposing a novel road model is out of the scope of this paper, so we refer to many works in literature [48; 49; 50] in which the following approach has been introduced.  
The road network is modeled as a weighted oriented graph, \(G=<V,E>\), where \(V\) is the set of vertexes, \(||V||=1,\ldots,c\) and \(E\) is the set of edges, \(||E||=1,\ldots,m\).  
Each edge \(e\in E\) represents a lane segment between two vertexes and it has an associated weight \(w\in W\) the number of vehicles on the lane, each vertex \(v\in V\) represents a cross roads or two lane junction. Figure 12 illustrates the considered model. To be noted that the graph is unidirected, \(e_{i,j}\
eq e_{j,i}\).  
Based on the definition and studies in [51] a density term can be defined as follows:  
\[(\pi_{k})_{i,j}=\frac{(w_{k})_{i,j}}{length(e_{i,j})} \tag{1}\]  
\[\Pi_{i,j}=\sum_{k=1}^{N_{i,j}}(\pi_{k})_{i,j} \tag{2}\]  
where \(\pi_{k_{i,j}}\) is the traffic density of the \(k\)-th sub-lane of the lane segment \(e_{i,j}\) (see Figure 12 Lane 7-\(>\)8), defined as the ratio of \(w_{k_{i,j}}\) (that is the weight of the \(k\)-th sub-lane of the lane segment \(e_{i,j}\)) and the length \(l_{i,j}\) of the lane \(e_{i,j}\), while \(\Pi_{u,z}\) is the average density for the edge \(u\), \(z\) and \(N_{i,j}\) is the number of  
Figure 11: Example of sensors working in the case of a pedestrian starting to cross the road when a car is passing.  
considered lane segments (i.e., in Figure 12 it is possible to note that a road between node 7 and node 8 is composed of 3 lanes) with \(k=1,...,N_{i,j}\). It is necessary to introduce \(k\) in order to take into account the possibility to have more lanes with same direction in a same road. In particular, from [52; 53] it can be written that for a motorway the capacity \(c_{i,j}\) of the lane \(e_{i,j}\) is:  
\[c_{i,j}=C_{i,j}\cdot FHW_{i,j}\cdot FW_{i,j}\cdot FP_{i,j} \tag{3}\]  
where \(C_{i,j}\) is the ideal capacity, \(FHW_{i,j}\) is related to the probability of having heavy vehicles, \(FW_{i,j}\) is a factor related to the width of \(e_{i,j}\), and \(FP_{i,j}\) is a factor related to the driver population. The criterion for choosing the best path is now illustrated. The algorithm (based on _Shortest Path First_ (SPF)) is based on reducing the instantaneous road density on all segments and, consequently, the time spent on the road segments. The best path is chosen by:  
\[BEST\_path_{k}(D)=\arg\min_{k}\{MCARS(path_{k}(D))\} \tag{4}\]  
where \(path_{k}(D)\) is the \(k\)-th available path to reach the destination \(D\). The \(MCARS\) term represents the considered metric. Considering the lane \(e_{i,j}\) belonging to the \(path_{k}(D)\), it is defined as:  
\[MCARS_{i,j}=\alpha\cdot\left[\frac{w_{i,j}/length(e_{i,j})}{max\_\pi\_path(D )}\right]+(1-\alpha)\cdot\left[\frac{length(e_{i,j})/\bar{\
u}_{i,j}}{max\_ delay\_path(D)}\right] \tag{5}\]  
where \(\alpha\) is a weight term (for giving more emphasis to density or to travel delay), \(max\_\pi\_path(D)\) and \(max\_delay\_path(D)\) are the maximum density and delay terms over all paths to destinations and \(\bar{\
u}_{i,j}\) is the average speed on lane \(e_{i,j}\). Given a \(path(D)\) composed by a sequence of segments, the total \(MCARS[path_{k}(D)]\) is just the sum of the each \(MCARS_{i,j}\) associated to each segment of \(path(D)\).