# A Comprehensive Real-Time Traffic Map for Geographic Routing in VANETs
## 3 System Model
### CRT Map Framework  
In this section, we describe the basic format and operations of the proposed CRT Map. Each vehicle \(v_{i}\) maintains a local map, denoted as \(m_{i}\). Hence there are \(n\) maps, \(M=\{m_{1},\ m_{2},\ldots,m_{n}\}\), in the network, each of which represents a different view of the traffic information of each vehicle. Since there are \(x\) road segments, each \(m_{i}\) comprises \(x\) records, denoted as \(RT_{j}^{i}\), \(1\leq j\leq x\), which is a real-time traffic record of each road segment \(r_{j}\). Each record has two fields, i.e., \(RT_{j}^{i}=\left\{D_{j}^{i},\ T_{j}^{i}\right\}\), where \(T_{j}^{i}\) is the timestamp of when this record is made or updated, and \(D_{j}^{i}\) is the traffic density of \(r_{j}\), i.e., \(D_{j}^{i}=\left(\#\text{ of vehicle of }r_{j}\right)/\left(L_{j}\times LA_{j}\right)\). When vehicles are moving on roads, they overhe  
Figure 3: Issues when only the next road segment is considered where the red dotted lines show the wrong selections and the green dotted line shows the best choice: (**a**) move to a road away from the receiver; and (**b**) connect to a sparse road (marked by the question marks, respectively).  
vehicles' beacons and calculate how many cars on each road. Together with the load length and lane number, extracted from the digital map, traffic density of each road can be derived.  
Next, we describe how to merge two traffic density records. Initially, historical traffic statistics are loaded as the default traffic density of roads. Thus, the initial traffic information is different to the real-time traffic density. There are two possible timings for a record \(RT_{j}^{i}\) to be updated. One is when \(v_{i}\) receives another vehicle's map in which contains a record with regard to \(r_{j}\), and the other is when vehicle \(v_{i}\) actually drives through road \(r_{j}\). Here we describe the details of the first case. The latter case can be similarly completed. Since traffic is continuously changing over time, we should take the time decay effect into account. The value of a record should be inversely proportional to its grade of freshness, i.e., the elapsed time since the last update. Let \(\hat{T}\) denote the present time and then define \(\Delta T_{j}^{i}=\hat{T}-T_{j}^{i}\) as a freshness of \(RT_{j}^{i}\). The weight of \(RT_{j}^{i}\), \(W_{j}^{i}\) is defined as  
\[W_{j}^{i}=\left\{\begin{array}{ll}\frac{1}{1+\Delta T_{j}^{i}},\ \Delta T_{j}^{i}\leq T_{th}\\ \frac{1}{1+\Gamma_{th}},\ \Delta T_{j}^{i}>T_{th}\end{array}\right. \tag{1}\]  
where \(T_{th}\) is a threshold used to set a basic weight value. The purpose is to prevent any record from being omitted and make each record count. When merging \(RT_{j}^{i}\) and \(RT_{j}^{k}\) for the same road \(r_{j}\), different weights are set according to their freshness. Then, the new traffic density, denoted as \(D^{\prime}\), can be derived by  
\[D^{\prime i}_{j}=D^{\prime k}_{j}=\frac{\left(D_{j}^{i}\times W_{j}^{i}\right) +\left(D_{j}^{k}\times W_{j}^{k}\right)}{\left(W_{j}^{i}+W_{j}^{k}\right)} \tag{2}\]  
Then, \(T_{j}^{i}\) and \(T_{j}^{k}\) are updated to \(\hat{T}\). In the case where \(v_{i}\) actually drives through \(r_{j}\), we can simply treat the new observation of traffic density of \(r_{j}\) as \(RT_{j}^{k}\). To merge multiple records in the meantime is straightforward. The denominator in Equation (2) becomes the summation of all weights, and the numerator is the summation of all densities after weighting. Finally, we define each record as a reliability which will be used in the routing decision. Here we also take the time decay effect into consideration. A record that has not been updated for a long time has less reliability. The reliability \(P_{j}^{i}\) of \(RT_{j}^{i}\) is defined as \(P_{j}^{i}=\frac{1}{\ln\Delta T_{j}^{i}}\).