**Simulation Daily Mobility in Rabat Region Using Multi-Agent Systems Models**

Khalid Qbouche^{1,}* and Khadija Rhoulami^{2}

^{1}LRIT associated unit to CNRST (URAC${}^{\circ}$29), Faculty of Science, Mohammed V University in Rabat, 4Av.Ibn Battouta B.P. 1014 RP, 10006 Rabat, Morocco

^{2}DESTEC, FLSHR Mohammed V University in Rabat, Morocco*E-mail: qbouchekhalid@gmail.com; rhoualmikhadija@yahoo.fr***Corresponding Author*

Received 30 January 2022; Accepted 11 March 2022; Publication 11 May 2022

Due to the rapid urbanization of the world, the issue of daily movement has become an important topic. It examines the daily movements of people and analyzes the behavior of individuals. This system is closely related to the urban area, especially traffic. This work will provide a mixed model of daily mobility and a person’s shifting condition. Bottom-up techniques, such as Markov Chain and Multi-agent Systems, allow the creation of individual or group displacements. Bayesian Belief Network combined with Markov Chain allow for designing and managing individual behavior displacements.

**Keywords:** Markov Chain Model, Bayesian Belief Networks, Gama Platform, Multi-Agent System, Daily Mobility.

Daily mobility is defined as a collection of population displacement activities in their natural setting, where these displacements are carried out by individuals over some time and are also characterized by (motives, a moment of the day, origin, destination, duration, speed, means of transport used, etc). As a result, these movements have implications for various topics and analyses, including geography, sociology, economics, urbanism, and transportation. The topic’s importance arises mainly from the difficulties of understanding human behavior in cities, predicting and forecasting mobility’s repercussions, and satisfying societal transportation and equipment infrastructure expectations. The population explosion might be seen as a driving force behind daily mobility. These mobility trends are growing in popularity and may pose a significant problem for sustainable cities. These issues can be dealt with using computer models. With their simulation and prediction capabilities, these models might be able to foresee these consequences and aid planners and decision-makers in evaluating whether urban policies have been successful based upon scenarios that models previously predicted. To study the displacement of people in the Rabat area, we used this model’s mathematics, which included: Markov Chain and Multi-Agent System. This paper’s remainder is as follows: Section 2 will present the model and its implementation in daily mobility. We will discuss the three methods we used, which are Markov Chain (MC), Multi-Agent System (MAS), and Bayesian Belief Network (BBN). Section 4 will describe our experiments and conclude.

Daily mobility is a social phenomenon that allows for changes in the urban environment and the lifestyles of diverse groups. Some academics have employed multi-agent systems and mathematical models to forecast future situations to model this phenomenon and predict future scenarios. We found MC and BBN among these models. Furthermore, in MAS, we find that the Gama-Platform can simulate the movement of people in an area studied. Such as, they used the Gama MAS to simulate daily travel in the Rabat region using 2014 census data [1]. BBN was used to develop a spatial model that replicates land-use change as a result of human decisions [2]. They utilized Cellular Automata Markov to forecast urban growth in 2059 and evaluated the urban area from 1984 to 2020. They discovered that Eskişehir, which is undergoing fast urbanization, will continue to increase in the future [3]. They devised a novel technique for predicting the next place based on this mobility model called n-MMC and expanded a mobility model called Mobility MC that permits adding the n previously visited sites [4]. Furthermore, we discovered that mobile data traces may be used to investigate a mobility prediction approach for movement in a wireless network, like [7]. They created a multi-agent system paradigm by simulating urban transportation systems with a layer of roadways, lights, parking, and forms of transportation. Based on INSEE statistics, this paradigm was implemented in the city of La Rochelle (the French National Institute of Statistics and Economic Studies) [11]. They worked on the use of MC model in the travel time to work between 7 am and 9 am of people in the region of Rabat, and this model is developed by the Gaml language [5].

The global system is considered a set of models that represent houses, urban spaces, roads, green spaces, and activities of people between their place of work and their place of residence. These models are called multi-agent systems. In addition, the agent concept has been studied for several decades in different disciplines. It is used in knowledge-based systems, robotics, natural language, chemistry, and other areas of artificial intelligence and humanities and social sciences disciplines such as geography, economics, etc. With the evolution of new technologies and the expansion of the Internet, this concept is more associated with several new applications among these models, we find the MC mathematical model; The entire system was modeled using BBN algorithms based on the system’s components and the Gama-Platform model to simulate the movement of people.

The MC is a mathematical model for predicting future land use patterns. Informally, a Markov Chain is a set of random variables (${X}_{n}$, n=0; 1; 2; 3; …) having values in the MC state space [12], which is a finite set of values. (${X}_{n}$; n $\succ $ 0) is referred to be a Markov Chain if:

$$\forall {i}_{0},{i}_{1},\mathrm{\dots},{i}_{n-1},i,j\in S,\forall n\ge 0,$$ | |

$$P({X}_{n+1}=j/{X}_{0}={i}_{0},\mathrm{\dots},{X}_{n}={i}_{n}=P({X}_{n+1}={i}_{n+1}/{X}_{n}={i}_{n})$$ | (1) |

Variables appear at random. The symbol ${X}_{n}$ represents the state of the system at step n. The MC process begins in one state and progresses to the others. The process then advances from i to j with a probability given by ${P}_{ij}$ in the following step. At step n, the system might be computed using syntaxes from state ${X}_{n}$.

${X}_{n\mathrm{+}\mathrm{1}}\mathrm{=}P\mathbf{}{X}_{n}$ |
(2) |

Transition probabilities make up ${P}_{ij}$, the transition probability matrix constructed using the formula. At step n, ${X}_{n}$ is the state vector.

$$P=\left[\begin{array}{ccccc}\hfill {P}_{11}\hfill & \hfill .\hfill & \hfill .\hfill & \hfill .\hfill & \hfill {P}_{1m}\hfill \\ \hfill .\hfill & \hfill .\hfill & \hfill .\hfill & \hfill .\hfill & \hfill .\hfill \\ \hfill .\hfill & \hfill .\hfill & \hfill .\hfill & \hfill .\hfill & \hfill .\hfill \\ \hfill {P}_{m1}\hfill & \hfill .\hfill & \hfill .\hfill & \hfill .\hfill & \hfill {P}_{mm}\hfill \end{array}\right]$$ | (3) |

${P}_{ij}$ is the probability of changing from type i to type j, and m denotes the number of different soil occupations. We can calculate the transition probability from state i to state j in exactly n steps using the Chapman-Kolmogorov, based on the Markov stochastic process theory.

$${P}_{ij}^{n}=\sum _{k\in S}{P}_{ik}{P}_{kj}^{(n-1)}$$ | (4) |

The initial transition probability matrix, where S is the MC state space, might build the n transition probability matrix.

In our work, we have implemented this model (MC) by the Gaml language under the Gama platform. We have based on the time variable, i.e., the duration of movement of people to the place of work between 7 am, and 9 am, and the period of exit between 4 pm and 6 pm.

The MAS consists of a collection of agents that act and interact in a shared environment, and agent-based modelling relies on simulating the actions and interactions of autonomous agents to assess their effects on the system. An autonomous agent is sociable, reactive and proactive. Such as, we illustrate in the following Figure 1.

The MAS method’s objective is to design the population dynamics of the city at the size of each actor [8]. In our approach, a cognitive agent represents each individual. Agents are, nevertheless, given information based on qualities (such as age, educational level, professional position, and kind of activity section). We determined each agent’s residence and job location using HCP data 2004 [6]. Such as, we illustrate in the class diagram in the following Figure 2, represent information of every individual.

To implement the MAS simulation, we can find several platforms in this context that makes it possible to propose a software framework facilitating the implementation and the execution of simulators. In this paper, we used the Gama platform to simulate the movement of people in the Rabat region; it is a simulation platform with a complete integrated modelling and simulation development environment to create spatially explicit agent-based models [10]. It also excels in simulating individuals in urban networks, such as [5].

The BBN is a probabilistic graphical model that describes a set of random variables and their conditional interactions using a directed acyclic graph [9]. We used BBN to create the displacement process in our model, which is based on explicit variables that let people to select whether or not they want to go to work. These variables presented in the class diagram which is represented in the figure above Figure 3.

The following equation is used to determine a person’s displacement propensity. For each ${X}_{j}$ that is ${X}_{i}$’s parent.

$P({X}_{1}..{X}_{n})={\prod}_{i=1}^{n}P({X}_{i}={x}_{i}/{X}_{j}={x}_{j})$

The workplace variable is based on the following variables from the BBN model, which we used as an example: Type of activity of the individual, professional status of each individual.

This paper used Gama plate-form MAS to simulate a person’s movement in the Rabat region, using an integrated Bayesian Belief Network model to choose a workplace and a MC to build a displacement scenario. Furthermore, this implementation includes a variety of residential and industrial structures and a highway network, all of which are incorporated in our simulation model. All of these elements represent the research field. The simulation of people’s daily mobility in the Rabat region was carried out using the Gama MAS, which is based on the Dijkstra algorithm, which is a method for finding the shortest path in a network, in this case, the network of streets in Rabat, is shown in the following Figure 4. Using data from HCP’s nationwide survey from 2014 [6] we simulated people’s journeys between their home and their place of employment.

The dwelling is represented by the black point, while the blue represents the workplace. We employed the MC model in our simulation, with the starting state being the place of residence and the next state being the place of employment, with a time factor of between 7 and 9 a.m. as the time to enter.

In the Figure 5 shows a graph depicting the distribution of the number of persons who have joined their workplace and the number of people who have yet to be reached owing to transportation concerns like traffic congestion.

In this article, we developed a model that enables the construction of a picture of the dynamics of everyday transportation in the urban area in the Rabat region. Our modelling is unique because we used the Gama platform, stochastic models, the MC model, and BBN to predict variable workplace for our instance. We simulated individual displacements based on each individual’s attributes, such as ”location of residence, place of employment, professional standing…”, as supplied by HCP [6]. Using the model we have created, we can test and simulate various scenarios for a specific region. For illustration, we might simulate people’s movement based on indicators such as ’time,’ allowing us to observe who has arrived at work and who is not causing traffic or other issues. Decision-makers and urban planners can use this data to determine if the city’s architecture fits mobility demands. The model’s validation will be delivered in future research, which will be evaluated by comparing daily mobility in the Rabat region using validation approaches.

This research is carried out as a part of the project Plateforme logicielle d’intégration de stratégies d’immunisation contre la pandémie COVID-19 funded by the grant of the Hassan II Academy of Sciences and Technology of Morocco.

[1] K. Qbouche, K. Rhoulami, (2021). Simulation Daily Mobility in Rabat region. 10.1145/3454127.3454128.

[2] K. Verda, D. Suzana. (2012). Bayesian networks and agent-based modeling approach for urban land-use and population density change: A BNAS model. Journal of Geographical Systems. 15. 10.1007/s10109-012-0171-2.

[3] A. Ersin, Ö. Merve, B. Rüya and Y. Mutlu. (2020). Eskişehir Kentsel Büyüme Alanın Hücresel Otomat ve CA-Markov Zincirleri ile Analizi (1984-2056).

[4] G. Sebastien, K. Marc-Olivier, N. Miguel. (2012). Next Place Prediction using Mobility Markov Chains. Proceedings of the 1st Workshop on Measurement, Privacy, and Mobility, MPM’12.10.1145/2181196.2181199.

[5] K Qbouche, K Rhoulami. (2022) Towards for an Agent-Based Model to Simulate Daily Mobility in Rabat Region. In: Saidi R., El Bhiri B., Maleh Y., Mosallam A., Essaaidi M. (eds) Advanced Technologies for Humanity. ICATH 2021. Lecture Notes on Data Engineering and Communications Technologies, vol 110. Springer, Cham. https://doi.org/10.1007/978-3-030-94188-8\_1.

[6] Institutional site of the High Commission for Planning of the Kingdom of Morocco https://www.hcp.ma/.

[7] H. Rfah, S. Ariffin, S. Hafizah, F. Norsheila. (2016). Mobility prediction method for vehicular network using Markov chain. Jurnal Teknologi. 78. 10.11113/jt.v78.8885.

[8] A. Giret, V. Botti. (2021). Multi Agent Systems of Multi Agent Systems.

[9] Monti, Stefano, and Gregory F. Cooper. “Learning Bayesian belief networks with neural network estimators.” Advances in Neural Information Processing Systems (1997): 578–584

[10] An official website Gama Platform: https://gama-platform.github.io/.

[11] N. Tuan, B. Alain, E. Pascal. (2012). Multi-agent Architecture with Space-time Components for the Simulation of Urban Transportation Systems. Procedia - Social and Behavioral Sciences. 54. 365–374. 10.1016/j.sbspro.2012.09.756.

[12] J. Agbinya. (2020). Markov Chain and its Applications an Introduction.

**Khalid Qbouche** obtained the bachelor’s degree in mathematics and computer science from the faculty of sciences of Rabat in the kingdom of Morocco, the Mohamed V University of Rabat in 2015, and also obtained a master’s degree in computer science, option Computer Science and Telecommunications Multimedia Content at the Faculty of Sciences of Rabat in 2018. Currently, i am a doctoral student at the Faculty of Sciences of Rabat in a research laboratory in computer science and telecommunications.

**Khadija Rhoulami** Professor of computer science, Mohammed V University, Faculty of Letters. I am a member of the laboratory of computer science and telecommunications research, which belongs to the Faculty of Sciences of Mohammed V University in Rabat, Morocco. I have several scientific publications in the field of computer systems

*Journal of ICT Standardization, Vol. 10_2*, 293–304.

doi: 10.13052/jicts2245-800X.10210

© 2022 River Publishers