# Real-Time Self-Adaptive Traffic Management System for Optimal Vehicular Navigation in Modern Cities

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Related Work

- Traffic prediction and optimization: Machine learning algorithms, such as neural networks or support vector machines, can analyze traffic data from sensors, cameras, and other sources to predict traffic congestion and optimize traffic flow. These algorithms can learn patterns in the data and make predictions about future traffic conditions.
- Intelligent transportation systems (ITS): Advanced technologies, such as sensors, cameras, and communication networks, can be used to develop intelligent transportation systems (ITS) that improve the efficiency and safety of transportation. For example, traffic management systems can optimize traffic flow and reduce congestion, and autonomous vehicles can navigate roads and avoid collisions.
- Demand-based pricing: Real-time traffic data can be analyzed to adjust the price of transportation services based on demand, thereby encouraging the use of alternative modes of transportation or shifting demand to off-peak times.
- Public transit optimization: Optimization techniques, such as machine learning or statistical modeling, can analyze data based on rider demand, route performance, and vehicle utilization to improve the efficiency of public transit systems. These techniques can identify patterns in the data and suggest changes to routes or schedules to reduce congestion and improve overall performance.

## 3. Methodology

## 4. Nodes’ Determination and Data Collection

- An account is created for each taxi driver (Figure 3);
- The application automatically starts sending the exact position every 10 s;
- The application works fine on background and when the phone is locked, which helps getting less interruption in receiving data;
- The application is energy efficient (very small battery consumption).

#### 4.1. Holidays

#### 4.2. Special Days

#### 4.2.1. Christmas

#### 4.2.2. Ramadan

#### 4.2.3. Summer

#### 4.3. Congestion Determination and Data Processing

#### 4.4. Cost Determination

- Length of a route: the cost of a node could represent the distance that a vehicle needs to travel to reach that node.
- Travel time: the cost of a node might also represent the amount of time it takes for a vehicle to travel through that node.
- Maximum occupancy: the cost of a node could reflect the maximum number of vehicles that can pass through it at any given time.

_{1}, denoted as cost(i

_{1}), is the average time that the studied taxi drivers spend in the determined radius of node 0 within a certain time frame. According to Table 1, this time is 4 min within the time frame between 8:00 and 8:30. Similarly, the cost of node j

_{1}, denoted as cost(j

_{1}), is the average time that the studied taxi drivers spend in the determined radius of node 1 within the same time frame. For example, this time is 1 min within the time frame between 8:00 and 8:30.

_{1}to node j

_{1}is recorded as starting at 8:13:20 and ending at 8:16:26 as shows the Table 5. This duration can be approximately calculated as 0.051 h.

_{1}and j

_{1}, is defined as the average time spent by users traveling on that road as shows Table 6. If the time spent on the road is null or greater than 5 min, it is eliminated from the calculation as it is assumed that the vehicle is either not moving or parked. The cost of the road between i

_{1}and j

_{1}is calculated by averaging the remaining time spent on the road by users:

#### 4.5. Shortest Path Algorithm

#### 4.5.1. Dijkstra’s Algorithm

#### 4.5.2. Bellman–Ford’s Algorithm

#### 4.5.3. Floyd–Warshall Algorithm

#### 4.5.4. A Star Algorithm

#### Heuristic Function

- Speed or accuracy?

- Admissible heuristic:

- Scale:

- Set all point distances to infinity, with the exception of the initial point, which should be set to 0.
- Make all nodes, including the initial point, non-visited.
- Assign the current node “C” to the non-visited node with the shortest current distance.
- Add the current distance of “C” to the weight of the edge connecting “C”—“N” and the weight to the target point for each of the current node’s neighbors “N” (heuristic). Set it as the new current distance of “N” if it is less than the current distance of “N”.
- Check the box next to the current node “C” to indicate that it has been visited.
- Repeat steps 3–6 until one of the neighbor’s “N” becomes the goal’s location.

- Vehicle speed;
- Time;
- Source;
- Destination.

## 5. Expanding Study to Other Cities

- Selection of nodes in both cities.
- Selection of factor elements in both cities.
- Selection of the studied area.
- Calculation of area weights.
- Matching of areas.
- Matching of nodes.
- Suggestion of the best road.

#### 5.1. Node’s Selection in Both Cities

#### 5.2. Factor Elements’ Selection in Both Cities

- Number of schools;
- Number of supermarkets;
- Number of restaurants.

- Element value V:

- Impact factor F:

- The estimated values are as follows:
- ○
- Schools: F = 41.6%.
- ○
- Restaurants: F = 27.2%.
- ○
- Supermarkets: F = 31.2%.

#### 5.3. Area Determination

#### Area Radius

#### 5.4. Area Weight Calculation

- The number of nodes in the selected area.
- The presence and element value (V) of schools, restaurants, and supermarkets in the selected area.

#### 5.5. Matching Areas

- Commercial areas:

- Residential area:

- Calculate the weight of each area in Tangier: the weight of SG is calculated using the same formula for calculating the weight of SC. Using the weight of both SC and SG, two areas are matched if

- Number of nodes;
- Element value (V) of schools;
- Element value (V) of restaurants;
- Element value (V) of supermarkets.

#### 5.6. Generating the Global Cost Matrix

#### 5.7. Extract the SG (Sub-Graph) Matrix from the Global Cost Matrix

#### 5.8. Mapping SG2 on SC1 and Matching Nodes

- The type of node.
- The number of exits and entries at each node as shows Figure 24.
- The maximum occupancy of the road connecting the two nodes.

- Light intersection: an intersection with traffic lights that control the flow of vehicles.
- Traffic point: a location with a high volume of traffic, such as a busy intersection or a roundabout.
- Normal intersection (no light): an intersection without traffic lights, where vehicles are expected to yield to each other based on the rules of the road.

#### 5.9. Determining the SC Matrix

_{1}and j

_{1}in SC, the algorithm uses information about the road’s length and width, as well as the average speed inside urban areas, which is assumed to be 40 km/h. Assuming a road’s length of 1.2 km, the algorithm calculates the cost of this road as follows:

#### 5.10. Path Determination Algorithm

## 6. Evaluation of the System

User | Accuracy Rate |

User1 | Very accurate |

User2 | Somewhat accurate |

User3 | Not very accurate |

User4 | Very accurate |

User5 | Not accurate at all |

User6 | Somewhat accurate |

User7 | Very accurate |

User8 | Not very accurate |

User9 | Very accurate |

User10 | Somewhat accurate |

… | … |

- Very accurate: 30%.
- Somewhat accurate: 50%.
- Not very accurate: 15%.
- Not accurate at all: 5%.

User | Accuracy Rate |

User1 | Very accurate |

User2 | Somewhat accurate |

User3 | Very accurate |

User4 | Not very accurate |

User5 | Very accurate |

User6 | Somewhat accurate |

User7 | Not accurate at all |

User8 | Somewhat accurate |

User9 | Very accurate |

User10 | Not very accurate |

… | … |

- Very accurate: 35%.
- Somewhat accurate: 40%.
- Not very accurate: 15%.
- Not accurate at all: 10%.

## 7. Conclusions

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## References

- Market-Reports/Intelligent-Transport-Systems-Its-Market-764. Available online: https://www.marketsandmarkets.com/Market-Reports/intelligent-transport-systems-its-market-764.html (accessed on 9 January 2023).
- Prodanov, S. Identification of non-material damages caused by road traffic accidents–ethical and financial aspects. Econ. Arch.
**2017**, 4, 3–14. [Google Scholar] - McCubbin, D.R.; Delucchi, M.A. The Health Costs of Motor-Vehicle-Related Air Pollution. J. Transp. Econ. Policy
**1999**, 33, 253–286. [Google Scholar] - Zeroual, A.; Harrou, F.; Sun, Y. Road Traffic Density Estimation and Congestion Detection with a Hybrid Observer-Based Strategy. Sustain. Cities Soc.
**2018**, 46, 101411. [Google Scholar] [CrossRef] - Šelmić, M.; Teodorović, D.; Vukadinović, K. Locating inspection facilities in traffic networks: An artificial intelligence approach. Transp. Plan. Technol.
**2010**, 33, 481–493. [Google Scholar] [CrossRef] - Louati, A.; Lahyani, R.; Aldaej, A.; Mellouli, R.; Nusir, M. Mixed Integer Linear Programming Models to Solve a Real-Life Vehicle Routing Problem with Pickup and Delivery. Appl. Sci.
**2021**, 11, 9551. [Google Scholar] [CrossRef] - Bevrani, B.; Burdett, R.; Bhaskar, A.; Yarlagadda, P.K. A multi-criteria multi-commodity flow model for analysing transportation networks. Oper. Res. Perspect.
**2020**, 7, 100159. [Google Scholar] [CrossRef] - Zheng, Y.; Li, Y.; Own, C.-M.; Meng, Z.; Gao, M. Real-time predication and navigation on traffic congestion model with equilibrium Markov chain. Int. J. Distrib. Sens. Netw.
**2018**, 14, 1550147718769784. [Google Scholar] [CrossRef] - Filho, G.P.R.; Meneguette, R.I.; Neto, J.R.T.; Valejo, A.; Weigang, L.; Ueyama, J.; Pessin, G.; Villas, L.A. Enhancing intelligence in traffic management systems to aid in vehicle traffic congestion problems in smart cities. Ad Hoc Netw.
**2020**, 107, 102265. [Google Scholar] [CrossRef] - Jiang, P.; Liu, Z.; Zhang, L.; Wang, J. Advanced traffic congestion early warning system based on traffic flow forecasting and extenics evaluation. Appl. Soft Comput.
**2022**, 118, 108544. [Google Scholar] [CrossRef] - Huang, Y.; Wang, L.; Hou, Y.; Zhang, W.; Zhang, Y. A prototype IOT based wireless sensor network for traffic information monitoring. Int. J. Pavement Res. Technol.
**2018**, 11, 146–152. [Google Scholar] [CrossRef] - Al-Sakran, H.O. Intelligent Traffic Information System Based on Integration of Internet of Things and Agent Technology. (IJACSA) Int. J. Adv. Comput. Sci. Appl.
**2015**, 6, 37–43. [Google Scholar] - Rizwan, P.; Suresh, K.; Babu, M.R. Real-time smart traffic management system for smart cities by using internet of things and big data. In Proceedings of the International Conference on Emerging Technological Trends (ICETT), Kollam, India, 21–22 October 2016; IEEE: Piscataway, NJ, USA, 2016. [Google Scholar]
- Xie, X.-F.; Smith, S.F.; Chen, T.-W.; Barlow, G.J. Real-time traffic control for sustainable urban living. In Proceedings of the 17th International IEEE Conference on Intelligent Transportation Systems (ITSC), Qingdao, China, 8–11 October 2014. [Google Scholar]
- Hossain, A.K.M.M. Geographical and Fingerprinting Data to Create Systems for Indoor Positioning and Indoor/Outdoor Navigation; Elsevier: Amsterdam, The Netherlands, 2019. [Google Scholar]
- Shefer, D. Congestion, air pollution, and road fatalities in urban areas. Accid. Anal. Prev.
**1994**, 26, 501–509. [Google Scholar] [CrossRef] [PubMed] - Kalafat, U.; Topacoglu, H.; Dikme, O.; Dikme, O.; Sadillioglu, S.; Erdede, M. Evaluation of the impact of the month of Ramadan on traffic accidents. Int. J. Med. Sci. Public Health
**2016**, 5, 543. [Google Scholar] [CrossRef] - Batterman, S.; Cook, R.; Justinc, T. Temporal variation of traffic on highways and the development of accurate temporal allocation factors for air pollution analyses. Atmos. Environ.
**2015**, 107, 351–363. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Varughese, J.; Allen, R.P. Fatal accidents following changes in daylight savings time: The American experience. Sleep Med.
**2001**, 2, 31–36. [Google Scholar] [CrossRef] - Thomson, I.; Bull, A. Urban traffic congestion: Its economic and social causes and consequences. CEPAL Rev.
**2002**, 2002, 105–116. [Google Scholar] [CrossRef] [Green Version] - de Dios Ortúzar, J.; Willumsen, L.G. Modelling Transport; John Wiley & Sons: Hoboken, NJ, USA, 1994. [Google Scholar]
- Zhang, Y.; Ye, N.; Wang, R.; Malekian, R. A method for traffic congestion clustering judgment based on grey relational analysis. ISPRS Int. J. Geo-Inf.
**2016**, 5, 71. [Google Scholar] [CrossRef] - Wang, W.-X.; Guo, R.-J.; Yu, J. Research on road traffic congestion index based on comprehensive parameters: Taking Dalian city as an example. Adv. Mech. Eng.
**2018**, 10, 1–8. [Google Scholar] [CrossRef] [Green Version] - de Dois Ortuzar, J.; Willumsen, L.G. Modeling Transport, 2nd ed.; John Wiley and Sons: New York, NY, USA, 1994. [Google Scholar]
- He, F.; Yan, X.; Liu, Y.; Ma, L. A traffic congestion assessment method for urban road networks based on speed performance index. Procedia Eng.
**2016**, 137, 425–433. [Google Scholar] [CrossRef] [Green Version] - Javaid, A. Understanding Dijkstra’s Algorithm. 2014. Available online: https://ssrn.com/abstract=2340905 (accessed on 9 January 2023).
- Walden, D. The Bellman-Ford Algorithm and Distributed Bellman-Ford. 2018. Available online: https://www.semanticscholar.org/paper/THE-BELLMAN-FORD-ALGORITHM-AND-%E2%80%9CDISTRIBUTED-Walden/2b40d5098fbbf65db31dca86796ac541bccb64f0#citing-papers (accessed on 9 January 2023).
- Bukhori, D.; Dengen, N. Floyd-warshall algorithm to determine the shortest path based on android. IOP Conf. Ser. Earth Environ. Sci.
**2018**, 144, 012019. [Google Scholar] - Foead, D.; Ghifari, A.; Kusuma, M.B.; Hanafiah, N.; Gunawan, E. A Systematic Literature Review of A* Pathfinding. Procedia Comput. Sci.
**2021**, 179, 507–514. [Google Scholar] [CrossRef] - Moroccan Cities Face Challenges in Urban Mobility. Available online: https://oxfordbusinessgroup.com/reports/morocco/2020-report/economy/on-the-move-changes-in-population-and-movement-patterns-have-led-the-public-and-private-sectors-to-come-up-with-new-urban-mobility-solutions (accessed on 9 January 2023).
- Agence Urbaine de Tanger. Available online: https://www.aut.gov.ma/ (accessed on 9 January 2023).
- Li, Q.; Li, X. Generalized Triangular Fundamental Diagram in the Congestion Regime. J. Transp. Eng. Part A Syst.
**2020**, 148. [Google Scholar] [CrossRef] - Maaroufi, M.M.; Stour, L.; Agoumi, A. Striving for smart mobility in Morocco: A case of lanes designated to heavy goods vehicles in Casablanca. Eng. Manag. Prod. Serv.
**2021**, 13, 74–88. [Google Scholar] [CrossRef] - Chowdhury, M.M.; Hasan, M.; Safait, S.; Chaki, D.; Uddin, J. A traffic congestion forecasting model using cmtf and machine learning. In Proceedings of the 2018 Joint 7th International Conference on Informatics Electronics and Vision (ICIEV) and 2018 2nd International Conference on Imaging Vision and Pattern Recognition (icIVPR), Kitakyushu, Japan, 25–29 June 2018. [Google Scholar]

Paper Title and Reference | Key Points |
---|---|

A multi-criteria, multi-commodity flow model for analyzing transportation networks [7] | This work proposes a new mathematical model called the MCMCNF model for assessing various types of transportation systems. The model allows the analysis of the effects of expansions, tolls, congestion levels, and accidents on a transportation network’s resilience and vulnerability, emissions distribution, and risk. It employs multiple objectives to maximize the flow of commodities and minimize travel-related costs. |

Real-time prediction and navigation to mitigate traffic congestion based on a model with equilibrium Markov chain [8] | This work discusses a method for mitigating traffic congestion in busy and crowded cities by using advanced prediction and navigation models on a dynamic traffic network. It divides real-time GPS data from taxis in Shenzhen city into 50 regions and uses an equilibrium Markov chain model to dispatch the vehicles in an effort to alleviate congestion. The results of the field experiments suggest that this method can effectively and efficiently reduce traffic congestion in city traffic networks while maintaining system performance. |

Enhancing intelligence in traffic management systems to aid in vehicle traffic congestion problems in smart cities [9] | This work discusses a solution for maximizing the flow of vehicles in large cities through the use of inter-vehicle communication and AI methods. It proposes TRAFFIC, which uses an ensemble of classifiers to estimate the congestion level in a transport system, and a dissemination mechanism to propagate this information between vehicles. It claims that this approach has advanced the state of the art by achieving a higher success rate in estimating traffic congestion; reducing travel time, fuel consumption, and CO2 emissions; and providing a high coverage rate with a low packet transmission rate. |

AI-powered IoT for traffic management [10] | This work conducted research that combines both IoT and AI to more effectively manage traffic through the voluminous data collected and generated by vehicles and other devices. It proposes a system that can be combined with information from traffic lights to minimize traffic congestions, bring greater efficiency to the road system in the city, and reduce pollution. |

Advanced traffic congestion early warning system based on traffic flow forecasting and extenics evaluation [11] | This work proposes a traffic congestion early warning system that uses machine learning and statistical analysis to accurately forecast traffic flow parameters and predict the level of traffic congestion. The system consists of four components: point forecasting, characteristic estimation, interval prediction, and comprehensive assessment. It uses extenics evaluation theory to evaluate traffic congestion level. |

Traffic monitoring system for optimizing road traffic flow [12] | Several traffic congestion monitoring and management systems based on the Internet of Things have been proposed in the literature. The design of a modern traffic monitoring system can optimize road traffic flow to meet current and future road traffic needs. |

Pheromone-based traffic management framework [13] | This work proposes a new pheromone-based traffic management framework to reduce traffic congestion and unify dynamic vehicle diversion and traffic light control strategies. It presents a scheme that uses WSN to control traffic signal roads, and intelligent traffic controllers are used for traffic infrastructure operations. The simulation results prove the rationality of the scheme, solve the traffic congestion problem of the average waiting time and average queue length at a single intersection, and effectively control the global traffic flow at multiple intersections. |

Smart traffic management system [14] | This work proposes a model for a smart traffic management system that aims to improve traffic flow and reduce congestion in smart cities. It utilizes real-time traffic data and intelligent algorithms to optimize traffic flow, reduce travel time, and minimize congestion. It incorporates various data sources, including video cameras, sensors, and social media, to provide comprehensive and accurate traffic information. |

X | Y | Time |
---|---|---|

35.780986 | −5.8168828 | 08:13:20 |

35.7809994 | −5.8168148 | 08:13:30 |

35.7809685 | 5.8168177 | 08:13:40 |

… | … | … |

… | … | … |

… | … | … |

35.7547584 | −5.8240698 | 08:16:20 |

ID of Node | TAXI 1 | … | TAXI N |
---|---|---|---|

1 | 4 | … | 3 |

2 | 0 | … | 4 |

3 | 6 | … | 2 |

… | … | … | … |

N | 3 | … | 5 |

ID of Node | Average |
---|---|

1 | 3.5 |

2 | 4 |

3 | 2 |

… | … |

N | 4 |

X | Y | Time | |
---|---|---|---|

i_{1} | 35.762827 | −5.838593 | 08:13:20 |

35.763311 | −5.838022 | 08:13:30 | |

35.763699 | −5.837544 | 08:13:40 | |

35.764120 | −5.837035 | 08:13:50 | |

35.764762 | −5.836169 | 08:14:20 | |

35.765238 | −5.83487 | 08:16:20 | |

j_{1} | 35.765926 | −5.834450 | 08:16:26 |

Time Spent | |||||
---|---|---|---|---|---|

Road | Distance | Taxi 1 | Taxi 2 | … | Taxi N |

[i_{1}, j_{1}] | 0.53 km | 0.051 h | 0.055 h | … | 0.030 h |

[i_{1}, j_{2}] | 0.88 km | 0 | 0.065 h | … | 0.083 h |

[i_{1}, j_{3}] | 1.2 km | 0.045 h | 0.032 h | … | 0.055 h |

… | … | … | … | … | … |

[i, j] | 0.66 km | 0.040 h | 0.029 h | … | 0.052 h |

α | Number of Nodes | V of Schools | V of Supermarkets | V of Restaurants | Weight |
---|---|---|---|---|---|

SC1 | 200 | 12.38 | 20.16 | 38.2 | 141.83 |

SC2 | 312 | 10.2 | 17.32 | 27.61 | 194.05 |

… | … | … | … | … | … |

SCn | ∑ nbr_nodes | ∑ Vschools | ∑ Vsupermarkets | ∑ Vrestaurants | ∑ (nbr_nodes) ∗ NI + (∑ Vi ∗ Fi) ∗ EI |

α | Number of Nodes | V of Schools | V of Supermarkets | V of Restaurants | Weight |
---|---|---|---|---|---|

SG1 | 300 | 19.83 | 27.92 | 65.32 | 214.50 |

SG2 | 208 | 15.36 | 13.10 | 50.66 | 149.05 |

… | … | … | … | … | … |

SGn | ∑ nbr_nodes | ∑ Vschools | ∑ Vsupermarkets | ∑ Vrestaurants | $\sum \text{}\left(\mathrm{nbr}\_\mathrm{nodes}\right)\text{}\ast \text{}\mathrm{NI}\text{}+\text{}\left(\sum \mathrm{Vi}\text{}\ast \text{}\mathrm{Fi}\right)\text{}\ast \text{}\mathrm{EI}$ |

Order of Node | ID of Node | Weight |
---|---|---|

1 | 143 | 19 |

2 | 202 | 18 |

3 | 35 | 18 |

4 | 4 | 16 |

5 | 198 | 12 |

… | … | … |

140 | 56 | 9 |

141 | 101 | 3 |

… | … | … |

208 | 9 | 2 |

Order of Node | ID of Node | Weight |
---|---|---|

1 | 52 | 21 |

2 | 157 | 20 |

3 | 123 | 17 |

4 | 201 | 13 |

5 | 47 | 12 |

… | … | … |

140 | 93 | 12 |

141 | 107 | 10 |

… | … | … |

208 | 130 | 3 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Benmessaoud, Y.; Cherrat, L.; Ezziyyani, M.
Real-Time Self-Adaptive Traffic Management System for Optimal Vehicular Navigation in Modern Cities. *Computers* **2023**, *12*, 80.
https://doi.org/10.3390/computers12040080

**AMA Style**

Benmessaoud Y, Cherrat L, Ezziyyani M.
Real-Time Self-Adaptive Traffic Management System for Optimal Vehicular Navigation in Modern Cities. *Computers*. 2023; 12(4):80.
https://doi.org/10.3390/computers12040080

**Chicago/Turabian Style**

Benmessaoud, Youssef, Loubna Cherrat, and Mostafa Ezziyyani.
2023. "Real-Time Self-Adaptive Traffic Management System for Optimal Vehicular Navigation in Modern Cities" *Computers* 12, no. 4: 80.
https://doi.org/10.3390/computers12040080