# Optimal Routing in Urban Road Networks: A Graph-Based Approach Using [PERSON]'s Algorithm
## 4 Shortest Path Improvement by Applying [PERSON]'s Algorithm on a Sparse Counter Network
### Graph Edge Weights Determination  
In the simplest case, the weight of an edge in a graph can be represented by its length. Given the structure of the urban traffic network, the length of the streets that form it satisfies this requirement, but the purpose and operation of the network itself necessitate the introduction of additional conditions. These relate to the unevenness of traffic speeds, the volume of traffic signals regulating the time distribution for street use, and the \"interference\" caused by other participants in performing the required maneuver. All of these factors can be evaluated in terms of the time required to execute them, thus affecting the overall result of the path selection.  
Since all these factors are not independent of each other and are not strictly defined, they need to be reduced to the domain of the smallest deviation from the real situation when calculating the path. Furthermore, these factors are time-varying and can be observed at different levels, from minute-by-minute to annual intervals.  
For an ideal solution, it would be necessary to achieve full coverage of the urban area with a service that would provide values for flow (Q), density (G), and speed (V) at every given moment in time, which is currently an unattainable task. The existing infrastructure, which in some way reflects the use of the traffic network, can be used to form a pattern that would be incorporated into the more detailed definition of street weights. For this purpose, a traffic counter network can be utilized, which, in addition to counting vehicles, also provides data on the speeds at which the counted vehicles were traveling. As a case study, this research focuses on the city of Sarajevo in Bosnia and Herzegovina, with its network of sparsely distributed traffic counters (Figure 3).  
Figure 3: Street map—the City of Sarajevo.  
Obtaining the vehicle speed along a street is significant, because it eliminates the need to know the other two parameters (Q and G) as intermediaries in determining the speed, V. However, the network of traffic counters is not widely distributed in any area, so considering only individually located counters cannot provide the complete picture. Instead, the idea of this work is to define a zone where it can be assumed that the conditions are the same as those achieved at the counter, and such conditions can be used to determine the travel time on streets where the counter is not physically present. Regular users of the urban network use it based on their habits and experience, and they are the main factors behind the results obtained from the measurements. Transient urban traffic with a smaller volume can disrupt or affect the usual pattern.  
Given that counters are generally placed on roads that have a greater tendency to attract traffic and, therefore, a higher traffic frequency, they can be viewed as fictitious movement targets where speed measurement is also carried out. Analogous to the goal, there must be sources, which are all streets that gravitate toward a counter, meaning that they direct traffic to higher-ranking roads. A street will gravitate toward the counter to which it has the shortest path.