Brahim Aboutaib
email: brahim.aboutaib@gmail.com

Lahoucine Bahili

Cyril Fonlupt

Virginie Marion

Sébastien Verel

Urban traffic modeling and simulation: Moroccan capital case study

Keywords: Urban traffic modeling, simulation, Multiagent simulation, synthetic population, activity-based traffic demand

Due to its major role in assuring services based on transportation, urban traffic is no more a facultative subject. The common step between all existing work related to this area is modeling urban traffic. Different approaches are available, and each one has benefits and drawbacks, but the main obstacle behind many of existing approaches is the availability of data to use in model building. In this paper we propose a dataless solution based on activities to model traffic demand of a generated synthetic population, and a microscopic multiagent system to simulate and analyze urban traffic in Moroccan capital Rabat.

I. INTRODUCTION

Nowadays, many researchers are studying problems related to urban areas in hope to build more sustainable and intelligent uses of existing resources. One of those areas is urban traffic, where two main question arised, the first one is how urban traffic works? the goal here is to understand the causes or mechanisms of some behavior (example: what cause congestion of traffic in some junctions?), the second question deals with solving a problem related to urban traffic, like how to efficiently use a network resources? All these paths of research require a preliminary work, which is a model of the urban traffic [START_REF] Van Wageningen-Kessels | Genealogy of traffic flow models[END_REF]. Modeling urban traffic could be approached from different perspectives related to the level of details a model can capture. From a highorder perspective, macroscopic models, a model is designed to capture few aggregated variables related to traffic like (average) density, (average) flow, and (average) speed. The result is a continuum flow representing traffic. The opposite of high-order perspectives models, microscopic model, in the other hand describes and traces the behavior of individuals vehicles (almost each one should be represented). The gap between microscopic and macroscopic models, is filled by mesoscopic models, where a probability distribution is used to represent vehicle movements. We limit the scope of our work in this paper to microscopic models.

Deciding to build a microscopic model, requires a detailed description of traffic components, where each vehicle (we also use agent to describe vehicle as we use a multi-agent system to simulate the result model) should be described with some details. To describe an agent in the context of urban traffic two main questions should be answered, what are some dominant characteristics of an agent that decide on the use of traffic? And how an agent uses urban traffic? The first question will gather details about agents (like age, driving license, education level) that will help to answer the second question, that is how a given agent will use urban traffics resources (it is clear that driving a vehicle needs a driving license, and some jobs, that is usually the cause of traveling, need some education level). By answering to these two questions we are building two models, the first model describes agents, this is the problem of representing population (agents), that may be solved depending on availability of data, if we already have data that describe some characteristics of each agent, the problem results to expand those characteristics to the rest of agents, if a detailed description of agents is not available and only some atomic characteristics are on hand (like age, level of education, but not aggregated in one ?), the task results to aggregating those atomic data in one for each agent. The second model describes how all ready agents will use urban traffics resources, like urban network. The models in result have to be simulated to understand the state of the traffic in function of built models, this task was assured by using a multi-agent environment (MATSIM) [START_REF] Horni | The Multi-Agent Transport Simulation Title of Book: The Multi-Agent Transport Simulation MATSim Subtitle positioned below[END_REF].

The rest of this paper is organized as follow: in the next section II we present some relevant works related to synthetic population generation and traffic demand modeling. Our method is then presented in section III, and related results are exposed in section V, the work is then concluded in section VI.

II. RELATED WORK

In this section we present some relevant background and existing work related to synthetic population generation, and activity based model for traffic demand.

A. Synthetic population generation

Urban traffic is the result of interaction between agents themselves and between agents and urban traffics resources. Usually, in the real-life scenarios the number of agents could attend millions, which make the task of getting each ones information impossible to realize. A solution may be to generate synthetic (artificial) population using available aggregated data. Two classes to get this problem solved exist in the literature [START_REF] Mller | Population synthesis for microsimulation: State of the art[END_REF]:

• Sample based methods: where a sample of individuals studied zones characteristics is combined with some aggregated global data (demographic indicators) to generate a synthetic population. It has the benefit to produce a reliable representation of the real characteristics of individuals [START_REF] Moeckel | Creating a synthetic Population[END_REF], [START_REF] Swarup | Generating Synthetic Populations for Social Modeling[END_REF], [START_REF] Auld | Efficient Methodology for Generating Synthetic Populations with Multiple Control Levels[END_REF]. • Non-Sample based methods: sample based methods depend on representability and reliability of the used sample, this could be avoided by only aggregating global demographic data to get characteristics of a population, the drawback her is the reliability of the result vs the implementation as we dont need investing time to prepare a sample, but only using demographics indicators, which is in general available [START_REF] Barthelemy | Synthetic Population Generation Without a Sample[END_REF].

B. Traffic demand modeling

Modeling traffic demand of individuals (agents, vehicles) may be achieved in different ways. In the literature, the four-stages trip-based models for travel demand forecasting, whose four steps are:

• Trip generation determining the frequency of trips origins and destinations; • Trip distribution matching origins with destination;

• Modal choice computing the transportation mode;

• And route assignment. The drawback of this model is the fact of ignoring the relations between all trips and activities, and only focusing on individuals trips and ignoring the travel demand as being derived from activity seeking. More details about drawbacks are studied in [START_REF] Spear | Application of new travel demand forecasting techniques to transportation planning: a study of individual choice models[END_REF], [START_REF] Oppenheim | Urban Travel: From Individual Choices to General Equilibrium[END_REF]. In other hand activity based modeling could be seen as the current trend, based on idea that traveler user traffic networks to carry out activities they need our wish to perform. It has the possibility to reflect the scheduling of activities performed by individuals in time and space and the sequence of activities. This approach is now widely used and accepted, and continuously attract more attention. After the step of traffic demand was completed, the ultimate goal is reproducing the mobility behaviors of a large population, this could be attended by massive multiagents micro-simulations. This has been made easier by the development of powerful open source agent-based simulation systems such as MATSim. Other platforms exits to perform the same task, with some different in implementation or in required data, see [START_REF] Hgerstrand | What about people in regional science[END_REF], [START_REF] Chapin | Human activity patterns in the city: Thing people do in time and space[END_REF] for more details.

III. METHOD

In this section we present our method used to model traffic demand of a Rabat citys synthetic population, and the simulation of dynamic assignment using MATSim.

A. Synthetic population generating

Our method uses the minimalist available data to characterize a population, by using data of census of population done by HAUT-COMMISSARIAT AU PLAN in 2014 [START_REF]Site institutionnel du haut-commissariat au plan du royaume du maroc[END_REF]. The main steps of developed generator is given in the figure 2.

The problem of synthetic population could be formulated as following: Found a sample S =< p 1 , p 2 , p 3 , ..., p n > of population, where the vector p i =< c 1 , c 2 , c 3 , ..., c m > is the characteristics of an individual p i , where S is representable as possible of the real population. The task of aggregating marginal distribution was done by applying Iterative Proportional Fitting Procedure (IPFP). The IPFP is used to estimate a k-way joint-distribution table based on known marginal distributions, it was proposed in [START_REF] Deming | A least squares adjustment of a sampled frequency table when the expected marginal totals are known[END_REF]. Let π i, j corresponds to the number of individuals with characteristics i and j. And let x i , x j be the marginal distributions for each i and j. The IPFP iteratively updates the cell's values depending on the marginal distributions of the target until the margins of the computed table match the targets one, i.e. π i, * = x i and π , j * = x j . The adjustment at iteration l are computed by the equations:

π l i j = π l-1 i j . x * j π l-1 * j (1)
π l i j = π l i j . x i * π l i * (2)
The complete synthetic population should contain information about location of individuals household, thats way, and by proceeding by the same approach of individuals characterization, we generate information about households, using HCPs data. The result S hh =< h 1 , h 2 , h 3 , ..., h n > is the sample of households with h i =< ch 1 , ch 2 , ch 3 , , ch k > is the h i s characteristics and take values from: (location, type, number of individuals). The last step is the matching of individuals sample S ind with households sample S hh .

The result is a synthetic population S pop . The algorithm 1 formalize all the above steps. while is not filled(hh i ) do 7:

ind temp = get ind(S ind );

8:

hh i = add ind(hh i , ind temp);

9:
end while 10:

S pop = add hh(hh i ); 11: end for 12: End

The output of this algorithm is a synthetic population of Rabat studied case.

B. Activity based model for travel demand

Starting from synthetic population generated, we can now generate traffic demand based on activities model. In this work we study two main activities of functionaries(selected from generated synthetic population): (i) the task of getting to home is selected and tagged as Home-activity, as the dominant one in general. And (ii) the task of going to work is the second activity and tagged as Work-activity. The result is a chain: Home-Work-Home to describe the way agents make use of traffic networks to carry those activities in the given order. A An activity A could be defined as a quadruplet (α p ; α l ; α s ; α d ) where

• α p is the purpose of the activity, • α l is the location (where it takes place),

• α s is the start time of the activity, • α d is the duration Of the activity. A chain of activities A * = (A n ) n∈1,...,k is a sequence A 1 , ..., A k of activities. In this work we define activities by: 1) Purpose: the purpose in this work could take two values. Work-activity, to describe the activity of work.

Or, Home-activity to describe the activity of going, or leaving, home. We choose those two activities, because they are the most dominant in the daily life, and the only possibility the disposable data gave. 2) Localization: to locate individuals activities, we uniformly distribute over coordination in the map, the location of each selected. That is for the activity workactivity we pick uniformly its coordination from the selected area, figure fig illustrates selected areas to study, the same process is used to locate Home-activity. The principal idea is to let synthetic agents act in virtual word, that represent the infrastructures (i.e. network roads). Each agent has its daily activity plan, which describes the chain of activities that it needs to perform in the virtual world (i.e. the Home-Work-Home chain). Each agent tries to perform optimally according to a utility function that defines what is useful for an agent. One virtual day is iteratively simulated. From iteration to iteration, a predefined number of agents are allowed to change some of their daily decisions to try to obtain a higher utility. The iterative process continues as long as the overall score of the population increases. The equilibrium reached represents what real individuals do in the real world (this iterative process is illustrated in figure 3). To use MATSim three principal files should be specified: It is clear that to converge to the state of equilibrium, enough time of running is then required until the criteria of convergence is reached, in this case the average of traveling time, that is no agent could only improve his travel time by only changing/improving its plans. And that is the drawback of building simulation over analytical models is the time consuming of simulations, which will be more pronounced in case of large scenarios studied. The second result we present her is the state of the traffic in function of time in the city of Rabat, see figure 5. It shows different states of traffic in a day. We can see that for in pick hours (i.e. between 7h30 and 9h00) the traffic jam occurs in built model, and in normal hours traffic is more fluid.

VI. CONCLUSIONS

In this paper we studied the case of modeling and simulating urban traffic of Moroccan capital, Rabat, in case of the minimum data are available. Using a synthetic population and an activity based model to depict the demand of traffic, the two main approaches that have been presented, they have the benefits to be easily reproducible to other scenarios with a minimum effort. As we are convinced that the approach should improved, we engage by this work to keep improving the reliability of the method and the scope and the scale of the case studied. This work, also, could be seen as a way to convince persons in charge to invest in data gather about urban traffic, in the goal to study in more details this subject motivated by its huge impact and interest in human's daily life in general.

Fig. 1 :

 1 Fig. 1: Synthetic population generator of Moroccan Capital

Algorithm 1

 1 Synthetic population generator 1: Begin 2: S ind = ip f p to aggregate synthetic ind(hcp data); 3: S hh = ip f p to aggregate synthetic hh(hcp data); 4: S pop = initialize synthetic population(); 5: for i = 0; i < size(S hh ); i + + do 6:

3 )Fig. 2 : 2 8 : 9 :

 32289 Fig. 2: Selected areas in Moroccan capital, the red zone is for home activities and the green for work activities

•Fig. 3 :

 3 Fig. 3: Graphic representation of MATSim simulation framework.

Fig. 4 :Fig. 5 :

 45 Fig. 4: Convergence to the equilibrium state of the simulation

ACKNOWLEDGMENT

The first author expresses his acknowledgement to AR-CUS E2D2 project.