Some propositions to find optimal conditions to simulate a flexible transport using an Agent-Based Model 1

1 The first objective of this paper was to find out the best conditions for simulating a flexible transport using an Agent Based Model (AMB). However, by doing so along, we noticed that the transport efficiency was improved using vehicles with poor cognitive capacity. We also compared different typical networks to set that the topological structure of those has an influence on transport efficiency. This is the story told in this paper. We first give a few definitions in the experimental context. Then we detail the flexible transport model and the simulation protocol we designed. Finally, we provide a set of results, including several thresholds over which the model performance significantly increase or decrease.


Introduction
The first objective of this paper was to find out the best conditions for simulating a flexible transport using an Agent Based Model (AMB).However, by doing so along, we noticed that the transport efficiency was improved using vehicles with poor cognitive capacity.We also compared different typical networks to set that the topological structure of those has an influence on transport efficiency.This is the story told in this paper.We first give a few definitions in the experimental context.Then we detail the flexible transport model and the simulation protocol we designed.Finally, we provide a set of results, including several thresholds over which the model performance significantly increase or decrease.

Flexible and self-organized transports
Flexibility is a concept widely developed in complex system science and operational research (Billaut et al., 2005).It has many facets.A flexible transport is a public or private transportation service, whose schedules and routes can vary according to client needs (Castex, 2007).Flexibility depends on the kind of transport: a regular line which is activated with at least a single customer, up to a fleet of responsive taxis which define their routes on the fly, according to random reservations.A flexible transport must be able to adapt to different (i) needs of mobility, (ii) types of networks, (iii) technological and financial constraints of customers and carriers.There exist indeed several types of flexible transport.On the one hand, Demand Responsive Transports (DRT) (Castex et al. 2004;Castex & Josselin, 2007) are able to adapt to demand.On the other hand, they are supervised by a local authority which manages the system and often optimizes vehicle routing according to different criteria.
In flexible transportation, vehicles can behave in co-operation or competition in order to satisfy the mobility needs of the population.This kind of service is frequently observed in many African cities where private and self-organized services compensate the public transport inadequacy (Godard, 2002;Cervero & Golub, 2007).In his PhD thesis, A. Lammoglia (2013) studied a set of self-organized services that are currently operating in Dakar (Senegal) such as regular taxis, "taxis clandos", "cars rapides", etc.The model presented below is inspired from the self-organized Senegalese mini-bus service called "cars rapides" (cf.fig.1).They are old vehicles with about 10 or 20 seats.In each vehicle, there are a driver, and a "coxeur" generally standing up at the back of the bus, searching and calling clients.During busy hours, the service operates on regular routes because the demand is more important than the supply and vehicles can easily find clients.Otherwise, when demand is low, vehicles must adapt.They move in the streets to pick up many clients and to minimize the traveled distance (cf.fig.1).This kind of flexible transport is studied in the paper.(Sources: http://www.voyagoo.fr/senegal/transports/les-celebres-cars-rapides.php and http:// blog.sustainablecities.net/2011/06/14/dakar-public-transit-choose-your-way)

Robustness and model sensitivity
Robustness is a methodological issue.An estimator is considered as robust when it is affected by (i) a large set of little deviations or (ii) a little quantity of large deviations from the theoretical law or from an empirical data distribution (Hoaglin et al 1983;Hampel et al., 1986).In the case of transportation, this means that the system can remain stable and efficient when some unexpected demands occur (outliers).A transport can be considered as robust when it ensures a good quality of service, by resisting to mobility demand fluctuation, in real time.We propose to tune some criteria while others remain fixed and to figure out some thresholds over which transport efficiency falls.This process is often used to assess the sensitivity of the system to disruption (Drezner, 1986;Labbé et al., 1990;Querriau et al., 2004).
In this paper, we propose a simple sensitivity analysis of a model (Faivre et al. 2013), by changing some model parameters (number and frequency of generated individuals).We estimate the influence of these two key parameters on the system performance and we define the conditions for getting an efficient virtual transport system in simulation.The number of individuals who are generated at each step of the simulation provides a certain quantity of pedestrians who can become clients who are picked up by vehicles.It is somehow an estimation of the "scalability", concept often used in computer science.The frequency of individuals generation translates a concept of "space-time granularity" of the flows.When it is high, it means than the clients are added regularly in the simulation.Mixing both criteria allows to fix a kind of "density".An average density of clients can be obtained with a large quantity and a low frequency or in an opposite case.What are the range of the values for these parameters?Is the simulation similar in different situations?This is the main objective of this paper.Another exploratory objective is to study different kinds of networks and to evaluate whether or not an agent based modeling can help in improving flexible transport efficiency.

Agent-Based Model in NetLogo
Agent-Based Models (ABM) is indeed a powerful approach for simulating mobility systems (Meister et al., 2010).By analyzing agent behavior (e.g. reacting, communicating, learning, etc., Ferber, 1995), we simulate various flexible transportation systems and we observe how the global transport performs.ABM is especially useful to model non-corporate and flexible transportation systems due to the spontaneous behavior of vehicle drivers and the lack of data in operational conditions (Lammoglia, 2011;Lammoglia et al. 2012).
The model was implemented and simulated using the NetLogo multi-Agent platform (Tisue & Wilensky, 2004).Netlogo provides functions to design agents and their behavior and enables to monitor such models.Indeed, NetLogo allows to follow the mobility system, according to a set of pertinent statistical parameters (Amblard & Phan, 2006;Lammoglia, 2013).

Flexible transport optimization and modeling
Many geocomputation algorithms and methods for simulating and optimizing DRTs have been provided in the literature as mentioned in several papers (Garaix et al. 2011, 2007, Chevrier et al. 2008).In our case, there is no dedicated kernel to optimize auto-organized flexible transport such as "car" rapides".Our transport model can be considered as flexible for two reasons.First, vehicles never use any preset routes.They do not have any cognitive capabilities.Secondly, they do not handle any information about client locations, though they share information with other vehicles.They neither have information about the demand location.That is why they systematically need to check the mobility demand by randomly exploring the road network.So, the system is truly self-organized and we apply an exploratory approach to evaluate the robustness of the simulated transport.
Concerning our virtual "cars rapides" experiments, the transport service efficiency is defined by three indicators explained below (cf.§3.2.).Several components are considered: (i) evolution of individuals quantity, (ii) road network structure and (iii) spatial distribution of urban places of interest.We performed many simulations, according to a series of virtual client quantities, several road network patterns and a suitable set of statistical indicators of efficiency.

A model of cooperative transportation system
To describe and to explain how the model operates, we use the standard ODD protocol (Grimm et al., 2006;Grimm et al., 2010).

Purpose
From the K.I.S.S. ("Keep It Simple and Short") approach, we developed an Agent-Based Model (ABM) that reproduces a cooperative transportation system.The main objective of the model is to evaluate the ability of cooperating agents (vehicles) to respond to a spontaneous and non-organized demand of mobility.Throughout hundreds of simulations, we want to evaluate a flexible transport efficiency, using statistical criteria and visualizing spatial patterns of mobility, including flows, destination attractiveness and vehicle behavior.

Entities, state variables and scales
As we can see in the class diagram (cf.fig.2), there are two types of individuals in our model: pedestrians and vehicles.Each type is instantiated by a population of agents (one agent is an individual).Agents of a given type have the same behavior, which is a piece of code (method) assigned to an object class.They move on a virtual territory made up of continuous land and a road network.We design four different theoretical networks (cf.§3.1.).For each of them, the graph is non-planar, not complete, not directed.Stops (where vehicles can pick up pedestrians) and destinations (where pedestrians want to go) are vertices or nodes of the edges of the graph.
All the simulations run during 15 000 time steps (the discrete time unit in most of the ABMs) because the process often converges beyond 5 000 steps, although it may change a little during the last 10 000 steps.

Agent behavior overview
Pedestrians are randomly and regularly created in a constant quantity.After their creation, they randomly choose a destination and walk to the most attractive stop.They wait at the stop to catch a transport to reach their destination.Clients are "satisfied" when they arrive at the destination and then they are taken off the simulation (cf.fig.3).
The attractiveness potential of a stop is proportional to how much the stop is frequented by the vehicle and the pedestrians, divided by the euclidean distance between the agent and the stop.The attractiveness potential of each stop is added during the routing process and depends on the way used.More the stop is visited, more it is attractive.Along the network, vehicles continuously move from stops to stops and pick up pedestrians to carry them to their destination.In our experiments, the transport service involves only 3 vehicles and each vehicle can carry a maximum of 10 passengers (equivalent to the smallest buses of "cars rapides").When they pick up customers and if there are still some pedestrians waiting, they tag the stop to inform all the other vehicles (cf.fig.4), as insects let pheromones on their paths (cf.Ant Colony Optimization, Dorigo et al. 2006).Vehicles move randomly on the network and target the tagged stops as a priority.The section 2.1.7provides more details about agent behavior with coding examples.
Cybergeo : European Journal of Geography The cooperation process was inspired from the driver's behaviors of informal mini buses and collective taxis in Dakar.Thanks to an investigation of 3 month in Dakar we learnt that, waiting drivers often discuss about client location and traffic and flow conditions (Lammoglia, 2012).So, the cooperation process implemented in this model aims at simplifying and simulating this communication process.

Design concepts
Objectives: Each type of agents owns a single objective.(i) Pedestrians want to reach their destination.(ii) Vehicles want to pick up the maximum of clients.
Basic principles: (i) Pedestrian targets the most attractive stop by using a gravity model.(ii) Vehicles communicate and cooperate using indirect interactions via pheromones.
Sensing: (i) Pedestrians can feel the attractiveness of stops.(ii) Vehicles can target the tagged stops.
Interactions: There is no direct interaction between agents, but pedestrians and vehicles interact when they meet at a stop.They deal about their destination: if the vehicle is empty, it picks up clients who have a common destination.Otherwise, it picks up the client(s) who share the same destination.
Stochasticity: Individuals are randomly and regularly generated in a constant quantity during the simulation.Vehicle move randomly on the road network, except when a stop is tagged.
Emergence: During the simulation, the spatial structure emerges and evolves, according to agents journeys.Road width is drawn proportionally to the transport flows.Stop and destination size is also proportional to the number of vehicles and to the client visits.So at the end of the simulations, we can observe the most frequented roads and the most attractive stops and destinations.

Initialization
We defined 124 scenarios of simulation.For all the simulations, parameters are previously fixed, such as the number of vehicles (3), their maximum capacity (10 passengers), the Cybergeo : European Journal of Geography number of stops ( 100) and the number of destinations (3).Some parameters vary: number and frequency of pedestrians generated during the simulation, spatial distribution of stops and destinations.The scenarios are described below (cf.§3.1).

Input data
Due to scenarios, parameters do not vary during the simulation and the model is completely reset before each simulation.

Details of the optimization process
In this last section, we explain the two major optimization processes of the model.Two algorithms respectively define how vehicles and pedestrians choose stops to move on the network.

NetLogo code Explanation
START If the vehicle is empty and no stop is tagged, it randomly chooses an adjoining stop.This stop is necessarily different from the previously crossed stop.
Otherwise, the vehicle chooses the nearest tagged stop (using list functions of NetLogo) If the vehicle is already carrying customers, it chooses the nearest stop of the destination.END

START
The pedestrian chooses randomly a destination and the most attractive stop included in a delimited area (defined by the maximum walking distance) END

Protocol of simulation
The robustness of such a transport system lies in its capacity to properly serve the territory through the network, whatever the conditions.Using a set of relevant scenarios and indicators, it is possible to evaluate the efficiency variation in the different configurations due to some parameter changes.

Scenarios
To study the efficiency of the model, we simulated and analyzed how vary three main parameters along a large set of simulations.All the parameters concerning the transport service are fixed (e.g.§2.1.).In parallel, the initial number of pedestrians (from 5 to 1500) and the frequency of pedestrian generation (from 5 to 500 steps) can vary.After a large number of simulations, we selected 124 scenarios presented in the figure 5 to reduce the simulation cost and to cover the parameter range in the best way.It both performs a scalability process and a progressive change of time granularity, linked to the mobility demand of the virtual population.
To complete our analysis, we could change the number of vehicles, but such experiments are not developed in this paper.
This experimental plan is designed according to two main features: (i) the complex system we study and (ii) the computing power limitation.The range of pedestrian frequency and quantity follows a logistic law often observed in transportation.Nevertheless, the model exploration is limited by technical issues.When the number of agents increases too much (over 2000), simulations slow down and freeze.It is the consequence of the NetLogo 4.0.5 limitation.Nevertheless, it is a useful framework to quickly develop models, to test a hypothesis, and to change the model structures and rules.In spite it does not support large samples, NetLogo capacity is sufficient to test the (KISS) transport models.
Furthermore, we systematically simulated each combination of frequency and number of pedestrians (see the dark squares in the figure 4) on four types of network (cf.fig.6).On the first network, the three destination places are close to each other.The roads are somewhat dense in this area.For the second network, a destination place is situated in the densest area of the network and the two other destinations are located on the edge of the space extent.The third network shows three hot spots (spatial polarities), looking like three small cities.
The three random networks are automatically designed, using the same algorithm and conditions.They strictly own the same number of nodes and the number of roads do not vary that much, due to the random dispersion of nodes (stops).Last, the fourth configuration is a theoretical Manhattan Street Network (MSN) (Maxemchuk, 1987), showing a destination place in the center and two destinations on the edges of the network extent.These models are not representative of urban networks, but they show some variety and particularity in their structure.We simulated many others but they are not presented in this paper.

32
To analyze the global performance of the model, we use three main indicators: • the pedestrian-station rate is the number of pedestrians who are waiting at a stop, divided by the total number of pedestrians generated.A low value shows a good transport efficiency; • the servicing rate is the ratio between the number of pedestrians arrived at a destination and the total number of pedestrians generated during the simulation.A high value indicates a good service efficiency, e.g. a 100% value shows that all pedestrians reach their destination, using the transport; • the bus-occupancy rate is depicted by the distribution of the number of passengers in the vehicles, processed for the whole steps.Let us remind that a bus can carry a maximum of ten customers.Highest the frequency in the important occupancy rates, better the service efficiency.

Results -Statistical analysis of the simulated scenarios
For each scenario, we processed the servicing rate, the pedestrian-station rate and the occupancy rate (with a total of 124 plots by indicator).Some statistics are gathered in a single graph to compare how efficient were the simulated transport on the four networks.
Cybergeo : European Journal of Geography 4.1.Influence of the frequency and the number of pedestrians generated Globally, the results show that the transport model is relatively sensitive to the various parameters related to the individual generation.Indeed (cf.fig.7), the servicing rate strongly depends on the frequency and on the number of individuals initiated.For the whole simulations, the smallest value of this indicator is lower than 10% (scenario 23), whereas the best rate reaches 80% (scenario 19).The worst results concern the scenarios with extreme parameters, i.e. the scenarios either (i) with a very low quantity of pedestrians rarely generated (for example the scenario 23 with 5 pedestrians created every 500 steps), or (ii) with a very high quantity of pedestrians frequently generated (for example the scenario 4 with 50 individuals created every 5 steps).In the first case, the efficiency is weak because potential clients are too scarce to fill the vehicle.Since buses always travel with at the most one or two passengers (this is confirmed by bus-occupancy rate), the transport is very slow and only a few pedestrians arrive at a targeted destination.The second case is the opposite.Too many individuals are present at the same time and the transport does not succeed in picking up them all, despite very good bus-occupancy rates.In this case, the service would need more vehicles or a larger capacity of seats.The best configuration shows intermediate values of parameters.For instance, the servicing rate ranges from 60% to 80% (cf.scenarios 9, 18, 26).For a given transport fleet, there exists indeed an optimal ratio linking the demand quantity and frequency, that allows to save time in looking for the best conditions of simulation of such virtual transports.As the curves presented in the figure 6 show, this ration also depends on the kind of networks.The pedestrian-station rate is easier to analyze because it depends on the number of individuals generated during the simulation.The best results (corresponding to the lowest rate) are obtained in the scenarios with little groups of individuals.In this case, buses can easily carry most of the pedestrians.The best rate obtained is around 5% (scenario 23).The worst case is above 90% (scenario 15): too many individuals are generated during the simulation.In such a configuration, the transport cannot empty the stops and we can conclude that the system is completely saturated.
Concerning the bus-occupancy rate, we observe three different shapes of distributions, characterized by the number of pedestrians generated (cf.fig.8).The first one shows a clear peak in the first class of occupancy rate (close to 0%), occurring each time that the individual density is too low.In this particular case, most of the time buses are empty.In the best configurations, they only carry 2 customers.It happens when the time granularity is loose or when the number of pedestrians is not sufficient (e.g.scenario 16).However, these simulations provide better results in terms of servicing and pedestrian-station rates.
A second kind of distribution enhances two opposite peaks (respectively the lowest and the highest occupancy rates, and between those, a slow decrease in values).This was often observed for many previous simulations.It corresponds to an intermediate case of efficiency (cf.Scenario 14).
Finally, a third distribution stands at the opposite of the first case, where a peak in the highest occupancy rate is visible.In this case, the pedestrian density is rather high and buses do not need to drive a lot to get new clients.When they arrive at a station, they directly fill the vehicle and go to their destination.This process is repeated during all the simulations and, unfortunately, provides a very limited exploration of the territory.However, these scenarios do not correspond to the most efficient transport, due to the global system saturation we already explained.Another interesting observation is the similar occupancy rate in some distributions, illustrated in the figure 9. Indeed, there seems to be a specific ratio between times granularity (pedestrian generation frequency) divided by the scale (quantity of pedestrians).For instance, a ratio of 1 or 2 between these two parameters generally induces a bimodal distribution of equivalent occupancy rate (P 0 =P 10 ).Beyond, when this ratio is about 5 or 10, the transport efficiency allows very good grouping in the vehicles (P 0 <P 10 ).All the other cases (with generation frequency / number of pedestrians less than 1) correspond to a lower efficiency in terms of occupancy rate (generally (P 0 >P 10 ), because the buses often travel with available seats.This means that the relation between the number of pedestrians and their generation frequency is an important criterion for finding an optimal service configuration.This conveys a good balance between the quantity and the frequency of pedestrians (potential clients) generated by the system, whatever the network shape.Occupancy rate with P 0 <P 10 ** Important difference between vehicles 0 identifies the peak of travels without any passenger in the bus (P 0 ), 10 corresponds to a peak of frequency with 10 passengers (P 10 ), P 0 >P 10 means that there is more frequently no passenger in the vehicle than 10 (in average), P 0 <P 10 tells the opposite, P 0 =P 10 means that the two peaks are somewhat similar.

Influence of the network on transportation efficiency
We can observe that the network shape influences the service efficiency in a certain way.The resulting differences are not very visible for the three random networks although they were considered as typical in terms of destination locations and topology structure.This means that the randomness of the operating system permits to easily adapt to these networks and to the spatial distribution of the demand.Moreover, some variations in the efficiency due to the network structure appear obvious.The most visible differences concern the (4 th ) rectilinear network (cf.fig.10), which reduces the connectivity due to arcs shape.This rectilinear network is often less performing than the others, especially regarding the servicing and pedestrianstation rates, in any of the simulated configurations, sometimes with noticeable differences (about 20%).This means that the topological structure plays a non-negligible role in transport efficiency.This factor seems to have more influence than any change in the demand or places of interest locations (cases of the 3 random networks).
The comparison between the 4 networks, as depicted in the figure 10, shows that: • for the 3 random patterns (1, 2 and 3), there is almost no difference in convergence; randomness is probably the explanation; • but the rectilinear network (4) has a lower servicing rate, because it impairs the shortest path efficiency.In the figure 11, we use the servicing rate to classify the simulations on the whole networks.In complement (cf.fig.12), we process the deviation between the best and the worst simulations of the servicing rate, the worst simulation always being the one of the network 4 (rectilinear).[0 ;8[ [8 ;16[ [16 ;32] From these figures (cf.fig.12) and simulations, we can get a few interesting results.Firstly, the simulations with the lowest deviations involve two distinct "extreme" cases.In a saturated situation, the transport does not succeed in managing too many pedestrians.We conclude that these critical situations are not valid for studying the network influence.Secondly, let us notice that all the simulations with valuable servicing rates are close to each other and generally belong to the middle class of the classification, except the simulations S7 and S12 (for those, the network 4 shows a worse servicing rate value).This confirms that the network 4 is less efficient than the other networks.Thirdly, intermediate simulations between ideal and critical conditions globally show important deviations of servicing rates (i.e. a large variability).At the opposite, pedestrian density is so weak that vehicles remain almost always empty and any cooperation becomes useless, whatever the networks simulated.

44
By comparing the figures 10 and 11, we can conclude that: • whatever the network shape (cf.fig.6), networks created randomly have a low influence on the system performance; • the Manhattan network implies a certain agent behavior and impairs the efficiency: vehicles reach less easily the targeted stops on such a rectilinear network; • this study enables to define a range of optimal conditions according to two parameters (steps frequency and number of generated individuals); it corresponds to a set of configurations (s5, s6, s9, s10, s11, s18, s19, s20, s26, s27, s28), all having more or less similar ratio between the two parameters.

Conclusion and discussion
This paper deals with a complex methodological issue composed of three interacting dimensions: the scalability, tested with regular increase of generated pedestrians, the spacetime granularity, represented by the frequency of these generations, and the space effect, realized by a few specific topological networks.It provides some methodological propositions to find the best conditions to simulate a self-organized transport system using ABM.The analysis is fruitful and shows that it is possible to improve transport efficiency thanks to a set of weakly cognitive co-operating agents in a virtual networked environment.However, an important part of this efficiency is included in a few determinant parameters.Indeed, there somehow exist optimal conditions to simulate flexible transport efficiency.This corresponds to an optimal ratio between pedestrian quantity and frequency.Thence, this ratio can be the reference variable to test the system.However, this optimal ratio strongly depends on the territory to serve, described by its topological network structure.
Moreover, this theoretical work shows that it is convenient to figure out some threshold values in transport model efficiency using a sensitivity analysis process.Those thresholds can significantly vary according to the transport configuration.It is indeed quite difficult to state whether or not a flexible transport is efficient without considering all its parameters, and tuning them on their whole validity interval(s).It takes a long time to perform these kinds of analysis (many agents generated and many scenarios of simulation), but it seems to us a relevant way to test the system efficiency, focusing on key parameters and especially their relation.
Another interesting contribution of our work is the efficiency of such a flexible transport ("car rapide") modeled by simple and non cognitive agents.It is noticeable that the efficiency rates which were processed during the simulations enable to improve the transport without any global optimization objective function.Indeed, a simple behavior that leads to a very basic cooperation between agents (vehicles and pedestrians) seems to be sufficient to reach correct efficiency rates, compared to those observed in the real world of demand responsive transportation.

Résumés
This paper presents a method to assess the sensitivity of a flexible transport model based on agents and simulated using NetLogo.We simulate and we analyse a set of 124 transportation scenarios on several virtual networks and we assess their performance.Our main objective is to detect thresholds in the system scalability and efficiency.The research leads to three main results: (i) using Agent-Based Model, it is possible to significantly improve the global transport efficiency without any general objective function, (ii) there exists an optimal balance between the demand frequency and the number of simulated agents to simulate and perform a good flexible transport, (ii) to some extent, the network topological structure plays a nonnegligible role in transport efficiency.

Notes de l'auteur
To access to the code, click here

Figure 1 :
Figure 1: non-corporate and self-organized transport services in Dakar (Senegal).

Figure 2 :
Figure 2: class diagram of the model.

Figure 3 :
Figure 3: activity diagram of the two types of agents.

Figure 5 :
Figure 5: matrix of parameters of the pedestrian generation (number and frequency) and simulation IDs.Frequency (steps)

Figure
Figure 7: comparison of servicing rates for various numbers of pedestrians generated every 100 steps.

Figure 8 :
Figure 8: three different shapes of the occupation rate distribution (the number of steps is equal to the statistical frequency).

Figure 11 :Figure 12 :
Figure 11: classification of the simulations according to the average servicing rate for the 4 networks (for instance, S21 in the figure 9 belongs to the second class [40; 60[ of servicing rate).Frequency (step)