Simulation in the GPenSIM Environment of the Movement of Vehicles in the City Based on Their License Plate Numbers
Abstract
:1. Introduction
- -
- Places: Places are drawn as circles, inside which the token presented by the black dots can be placed. There can be any non-negative number of tokens in one place.
- -
- Transitions: Transitions are drawn with rectangles.
- -
- Arcs: Arcs can have weights greater than or equal to 1. Weights equal to 1 (default value) are not shown in the Petri net. The weight determines exactly how many tokens pass along the arc [8].
- -
- Petri net models are very large (number of data and structures) for real-life systems, even for simple systems. Such models are not small or compact [9].
- -
- Long simulation time: Simulation of Petri nets takes a long time as large matrix manipulations are involved (as a large Petri net model results in a large incidence matrix). In addition, every enabled transition is checked to determine whether it can start firing by checking the additional firing conditions.
- -
- Difficulty in model analysis: Due to the huge size, analyzing structural and behavioral properties becomes time-consuming.
- -
- “Explosion of states”: Possibility to obtain information (for certain Petri net classes) from the Petri net structure without exploring its state space. The Petri net tool automatically generates the state space, showing every possible state that can eventually be reached from the initial state. For real-life systems, this space is huge (and usually, it is of infinite size). Hence, analyzing such a huge or infinite state space is difficult and usually impossible [10,11,12,13].
- -
- Development of crossroad and road modules (algorithms and their construction in a simulation environment).
- -
- Proposing the concept of a modular colored Petri net to solve the given problem.
- -
- Comparison of the possibilities of a colored and uncolored network based on the assumptions of universal modules.
- -
- Allowing the user to define the appearance of the city and crossroads, as well as the number of vehicles, in a transparent and convenient way.
- -
- Visualization of the above data in graphical form.
- -
- Development of functions that automatically generate data and parameters necessary to perform simulations in the GPenSIM environment.
- -
- Using this tool to create a model and simulate sample input data.
2. Concept of Modular Colored Token Petri Net (MCTPN)
- PI—input places of the crossroad;
- PO—output places of the crossroad;
- TC—traffic light transitions at the crossroad;
- TG—colored token transitions of the crossroad;
- AC—arcs in the crossroad;
- MC—initial markings in the crossroad.
- TS—transitions between two crossroads;
- AS—arcs in the street (towards crossroads);
- MS—initial markings in the street.
- Colored: each vehicle (token) has a unique number (license plate).
- Modular: the network simulates the layout of crossroads in the city.
- Model define: The user can define what the city looks like. Data can be prepared in a spreadsheet. Users can also define the number of cars at each point.
- Constant speed: It means that vehicles cannot overtake each other.
- Shortest path: the cars follow the shortest path to their destination (defined randomly). The Dijkstra algorithm was used for this.
- Single-lane roads: all of them. Tokens congregate in a place in front of the traffic light and drive in any direction independently. There are no dedicated lanes for going straight or turning in either direction.
- No reverse: no vehicle can turn around at the crossroad. This situation is impossible due to the determination of the shortest paths using Dijkstra’s algorithm.
- Definition of routes: the routes of the cars are known based on the readings of traffic cameras (in reality). For simulation, this information will be asked from the database (see point 5).
- Reconfigurable: the simulation conditions may change each time. This does not include the starting and ending points of the vehicles, which are fixed. This means that vehicles may start at slightly different moments in time and that signals operate differently during each simulation.
- Only transitions can manipulate colors; output token colors can be added, removed, or changed in the preprocessor.
- By default, the system collects all the colored tokens from the input locations when a transition is fired and then moves the colored tokens to the output locations.
- An enabled transition can select specific input tokens based on color.
- An enabled transition can select specific input tokens based on time (e.g., when the creation time of the tokens is known).
- The token has the following structure: tokID, creation time, and color setting.
- Vehicle registration number (color);
- starting point (random);
- end point (random);
- the shortest path, containing information on consecutive crossroad numbers.
- Crossroad number combined with the direction of exit (according to geographical direction);
- registration numbers of vehicles to go in this direction to reach the next crossroad according to their shortest path;
- the direction of entry (from where they are coming).
- All crossing;
- for each crossroad i, the others are all crossroads j to which traffic is going (i ≅ j);
- all directions;
- all shortest paths from the sp (shortest path) matrix;
- information on whether the vehicle is moving on or pulling over to the destination parking lot.
3. Colored Petri Net Modeling Algorithm
- The junction module consists of the four fragments described earlier.
- The road module that connects crossroads located directly next to each other is in the crossmap file input.
Main program pseudocode. |
START User sets data: Car number, topography of city map, locations of parkings, and numbers of cars in each parking place. For each crossroad from MAP For each direction Generate transitions, places, and arcs in the CROSSROAD module For each pair of crossroads For each direction Generate transitions, places, and arcs in the STREET module, connected to CROSSROADS modules OR If it is not a pair Make connections to parking places For each car Generate random starting and ending points Generate the shortest path using the Dijkstra algorithm For each crossroad For each direction Generate data for transitions on Petri net about where moving tokens (cars) are Put tokens in places Set Arcs throughput Set all data for Transitions, Places, Arcs, firing time, simulation time, initial values, and others for Petri net in the GPenSIM library as a structure Generete colored Petri net model in GPenSIM Make simulation Show results (defined by the user) STOP |
4. Noncolored Petri Net Modeling Algorithm
5. Results
6. Discussion
7. Conclusions
- -
- Development of crossroad and road modules (algorithms and their construction in a simulation environment).
- -
- Proposing the concept of a modular colored Petri net to solve the given problem.
- -
- Comparison of the possibilities of a colored and uncolored network based on the assumptions of universal modules.
- -
- Allowing the user to define the appearance of the city and crossroads, as well as the number of vehicles, in a transparent and convenient way.
- -
- Visualization of the above data in graphical form.
- -
- Development of functions that automatically generate data and parameters necessary to perform simulations in the GPenSIM environment.
- -
- Using this tool to create a model and simulate sample input data.
- -
- Proposing further work related to the process of optimizing the control of both traffic lights and autonomous vehicles (or navigation in conventional vehicles).
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Droste, M.; Shortt, R.M. From Petri Nets to Automata with Concurrency. In Applied Categorical Structures; Kluwer Academic Publishers: Alphen aan den Rijn, The Netherlands, 2002; Volume 10, pp. 173–191. [Google Scholar]
- Jensen, K.; Kristensen, L.M.; Wells, L. Coloured Petri Nets and CPN Tools for modelling and validation of concurrent systems. Int. J. Softw. Tools Technol. Transf. 2007, 9, 213–254. [Google Scholar] [CrossRef]
- Peterson, J.L. Petri Net Theory and the Modeling of Systems; Prentice Hall PTR: Upper Saddle River, NJ, USA, 1981. [Google Scholar]
- Rzonca, D.; Rząsa, W.; Samolej, S. Consequences of the form of restrictions in Coloured Petri Net models for behaviour of arrival stream generator used in performance evaluation. In Proceedings of the 25th International Conference, CN 2018, Gliwice, Poland, 19–22 June 2018; Computer Networks; Proceedings 25. Springer International Publishing: Cham, Switzerland, 2018; pp. 300–310. [Google Scholar]
- Wang, C.; Feng, X.; Li, X.; Zhou, X.; Chen, P. Colored petri net model with automatic parallelization on real-time multicore architectures. J. Syst. Archit. 2014, 60, 293–304. [Google Scholar] [CrossRef]
- Riemann, R.C. Modelling of Concurrent Systems: Structural and Semantical Methods in the High Level Petri Net Calculus; Herbert Utz Verlag: Munchen, Germany, 1999. [Google Scholar]
- Davidrajuh, R. Modeling Discrete-Event Systems with Gpensim: An Introduction; Springer International Publishing: Cham, Switzerland, 2018. [Google Scholar]
- Reisig, W. Understanding Petri Nets: Modeling Techniques, Analysis Methods, Case Studies; Springer: Berlin/Heidelberg, Germany, 2013. [Google Scholar]
- Davidrajuh, R. Modular Petri net models of communicating agents. In Proceedings of the International Joint Conference SOCO’17-CISIS’17-ICEUTE’17, León, Spain, 6–8 September 2017; pp. 328–337. [Google Scholar]
- Valmari, A. The state explosion problem. In Advanced Course on Petri Nets; Springer: Berlin/Heidelberg, Germany, 1996; pp. 429–528. [Google Scholar]
- Clarke, E.; Grumberg, O.; Jha, S.; Lu, Y.; Veith, H. Progress on the state explosion problem in model checking. In Informatics; Springer: Berlin/Heidelberg, Germany, 2001; pp. 176–194. [Google Scholar]
- Baier, C.; Katoen, J.P. Principles of Model Checking; MIT Press: Cambridge, MA, USA, 2008. [Google Scholar]
- Davidrajuh, R. A New Modular Petri Net for Modeling Large Discrete-Event Systems: A Proposal Based on the Literature Study. Computers 2019, 8, 83. [Google Scholar] [CrossRef]
- Jensen, K. Coloured petri nets. In Proceedings of the IEE Colloquium on Discrete Event Systems: A New Challenge for Intelligent Control Systems, London, UK, 4 June 1993. [Google Scholar]
- David, R.; Alla, H. Discrete, Continuous, and Hybrid Petri Nets; Springer: Berlin/Heidelberg, Germany, 2005. [Google Scholar]
- Davidrajuh, R.; Joseph, J.F. Towards Modeling Road Tunnels: A Petri Nets based Approach. Int. J. Simul. Syst. Sci. Technol. 2022, 23. [Google Scholar] [CrossRef]
- Riouali, Y.; Benhlima, L.; Bah, S. Petri net extension for traffic road modelling. In Proceedings of the IEEE/ACS 13th International Conference of Computer Systems and Applications (AICCSA), Agadir, Morocco, 29 November–2 December 2016; pp. 1–6. [Google Scholar]
- Huang, Y.S.; Weng, Y.S.; Zhou, M. Modular design of urban traffic-light control systems based on synchronized timed Petri nets. IEEE Trans. Intell. Transp. Syst. 2013, 15, 530–539. [Google Scholar] [CrossRef]
- Davidrajuh, R. Petri Nets for Modeling of Large Discrete Systems; Springer: Berlin/Heidelberg, Germany, 2021; pp. 95–105. [Google Scholar]
- Wiseman, Y. Traffic Light with Inductive Detector Loops and Diverse Time Periods. Contemp. Res. Trend IT Converg. Technol. 2016, 4, 166–170. [Google Scholar]
- Mulay, S.; Dhekne, C.; Bapat, R.; Budukh, T.; Gadgil, S. Intelligent city traffic management and public transportation system. arXiv 2013, arXiv:1310.5793. [Google Scholar]
- Eamthanakul, B.; Ketcham, M.; Chumuang, N. The traffic congestion investigating system by image processing from CCTV camera. In Proceedings of the 2017 International Conference on Digital Arts, Media and Technology (ICDAMT), Chiang Mai, Thailand, 1–4 March 2017; pp. 240–245. [Google Scholar]
- Peppa, M.V.; Bell, D.; Komar, T.; Xiao, W. Urban traffic flow analysis based on deep learning car detection from CCTV image series. In SPRS TC IV Mid-Term Symposium “3D Spatial Information Science–The Engine of Change”; Newcastle University: Newcastle upon Tyne, UK, 2018. [Google Scholar]
- Joo, H.; Lim, Y. Intelligent traffic signal phase distribution system using deep Q-network. Appl. Sci. 2022, 12, 425. [Google Scholar] [CrossRef]
- Shi, Y.; Wang, Z.; LaClair, T.J.; Wang, C.R.; Shao, Y.; Yuan, J. A Novel Deep Reinforcement Learning Approach to Traffic Signal Control with Connected Vehicles. Appl. Sci. 2023, 13, 2750. [Google Scholar] [CrossRef]
- Feng, Y.; Huang, S.E.; Wong, W.; Chen, Q.A.; Mao, Z.M.; Liu, H.X. On the Cybersecurity of Traffic Signal Control System with Connected Vehicles. IEEE Trans. Intell. Transp. Syst. 2022, 23, 16267–16279. [Google Scholar] [CrossRef]
- Dotoli, M.; Fanti, M.P. An urban traffic network model via coloured timed Petri nets. Control Eng. Pract. 2006, 14, 1213–1229. [Google Scholar] [CrossRef]
- Tang, J.; Piera, M.A.; Guasch, T. Coloured Petri net-based traffic collision avoidance system encounter model for the analysis of potential induced collisions. Transp. Res. Part C Emerg. Technol. 2016, 67, 357–377. [Google Scholar] [CrossRef]
- List, G.F.; Cetin, M. Modeling traffic signal control using Petri nets. IEEE Trans. Intell. Transp. Syst. 2004, 5, 177–187. [Google Scholar] [CrossRef]
- Wang, J. Timed Petri Nets: Theory and Application; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2012; Volume 9. [Google Scholar]
- Statista. Available online: https://www.statista.com/statistics/1230664/projected-number-autonomous-cars-worldwide (accessed on 20 March 2023).
- Luo, J.; Huang, Y.S.; Weng, Y.S. Design of variable traffic light control systems for preventing two-way grid network traffic jams using timed Petri nets. IEEE Trans. Intell. Transp. Syst. 2019, 21, 3117–3127. [Google Scholar] [CrossRef]
- Kaid, H.; Al-Ahmari, A.; Li, Z.; Davidrajuh, R. Intelligent Colored Token Petri Nets for Modeling, Control, and Validation of Dynamic Changes in Reconfigurable Manufacturing Systems. Processes 2020, 8, 358. [Google Scholar] [CrossRef]
- Kaid, H.; Al-Ahmari, A.; Li, Z.; Davidrajuh, R. Single Controller-Based Colored Petri Nets for Deadlock Control in Automated Manufacturing Systems. Processes 2020, 8, 21. [Google Scholar] [CrossRef]
- Samolej, S.; Szmuc, T. Time Constraints Modeling And Verification Using Timed Colored Petri Nets. In Real-Time Programming 2004; Elsevier: Amsterdam, The Netherlands, 2005; pp. 127–132. [Google Scholar]
- Bevilacqua, M.; Ciarapica, F.E.; Giovanni, M. Timed coloured petri nets for modelling and managing processes and projects. Procedia CIRP 2018, 67, 58–62. [Google Scholar] [CrossRef]
- Ng, K.M.; Reaz, M.B.; Ali, M.A. A review on the applications of Petri nets in modeling, analysis, and control of urban traffic. IEEE Trans. Intell. Transp. Syst. 2013, 14, 858–870. [Google Scholar] [CrossRef]
- Di Febbraro, A.; Giglio, D.; Sacco, N. Urban traffic control structure based on hybrid Petri nets. IEEE Trans. Intell. Transp. Syst. 2004, 5, 224–237. [Google Scholar] [CrossRef]
- Di Febbraro, A.; Giglio, D. On adopting a Petri net-based switching modeling system to represent and control urban areas. In Proceedings of the 8th International IEEE Conference on Intelligent Transportation Systems, Vienna, Austria, 13–16 September 2005; pp. 185–190. [Google Scholar]
- Di Febbraro, A.; Giglio, D. Traffic-responsive signaling control through a modular/switching model represented via DTPN. In Proceedings of the IEEE Intelligent Transportation Systems Conference, Toronto, ON, Canada, 17–20 September 2006; pp. 1430–1435. [Google Scholar]
- Basile, F.; Chiacchio, P.; Teta, D. A hybrid model for real-time simulation of urban traffic. Control Eng. Pr. 2012, 20, 123–137. [Google Scholar] [CrossRef]
- Liang, X.; Dang, Y.; Hou, Y. Modeling and Analysis of Urban Traffic System Based on Colored Petri Nets. In Proceedings of the 2021 IEEE International Conference on Networking, Sensing and Control (ICNSC), Xiamen, China, 3–5 December 2021; Volume 1, pp. 1–6. [Google Scholar]
- Anas, A.M.; Terzioğlu, H.; Durdu, A. Intelligent Traffic Signaling Control Using Petri Nets. Artif. Intell. Stud. 2020, 3, 1–13. [Google Scholar]
- Soares, M.S.; Vrancken, J. A modular Petri net to modeling and scenario analysis of a network of road traffic signals. Control Eng. Pract. 2012, 20, 1183–1194. [Google Scholar] [CrossRef]
- Soares, M.S.; Vrancken, J. Responsive traffic signals designed with Petri nets. In Proceedings of the IEEE International Conference on Systems, Man, and Cybernetics, Singapore, 12–15 October 2008; pp. 1942–1947. [Google Scholar]
- Elidrissi, H.L.; Moh, A.N.S.; Tajer, A. Modular Design and Adaptive Control of Urban Signalized Intersections Systems Using Synchronized Timed Petri Nets. Comput. Inform. 2022, 41, 590–608. [Google Scholar] [CrossRef]
- Mohammadi, M.; Dideban, A.; Moshiri, B. A novel approach to modular control of highway and arterial networks using petri nets modeling. Int. J. Eng. 2023, 36, 1578–1588. [Google Scholar] [CrossRef]
Reference Number | Type of PN | Contributions |
---|---|---|
[27] | CTPN | A model of a real intersection to optimize the timed–colored Petri net for traffic control. |
[38] | HPN | Solve the problem of coordinating several traffic lights with the aim of improving the performance of some classes of special vehicles, i.e., public and emergency vehicles. |
[39,40] | DTPN | Minimize the number of vehicles in the network in PN (mathematical). |
[41] | HPN | Applied model predictive control to predict the number of vehicles (optimizing algorithm). |
[42] | CPN | A model with optimal routes for vehicles can be planned independently. |
[43] | PA | Traffic control is dependent on current density due to the traffic system’s mechanisms being dependent on a fixed time. |
[44,45] | p-timed PN | Implement traffic-responsive control by extending green time on main roads. |
[46] | TSPN | Models reduce the system complexity in terms of combinatorial explosion, and they could be adapted easily for any real intersection. |
[47] | TPN | Optimization methods to manage the timing of traffic lights at intersections and speed limitations. |
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. |
© 2024 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
Kossowski, T.; Samolej, S.; Davidrajuh, R. Simulation in the GPenSIM Environment of the Movement of Vehicles in the City Based on Their License Plate Numbers. Electronics 2024, 13, 683. https://doi.org/10.3390/electronics13040683
Kossowski T, Samolej S, Davidrajuh R. Simulation in the GPenSIM Environment of the Movement of Vehicles in the City Based on Their License Plate Numbers. Electronics. 2024; 13(4):683. https://doi.org/10.3390/electronics13040683
Chicago/Turabian StyleKossowski, Tomasz, Sławomir Samolej, and Reggie Davidrajuh. 2024. "Simulation in the GPenSIM Environment of the Movement of Vehicles in the City Based on Their License Plate Numbers" Electronics 13, no. 4: 683. https://doi.org/10.3390/electronics13040683