Tangramob: an agent-based simulation framework for validating urban smart mobility solutions
Carlo Castagnari, Flavio Corradini, Francesco De Angelis, Jacopo de Berardinis, Giorgio Forcina, Andrea Polini
aa r X i v : . [ c s . M A ] M a y INTERNAL VERSION FOR ARXIV.ORG 1
Tangramob: an agent-based simulation frameworkfor validating urban smart mobility solutions
Carlo Castagnari, Flavio Corradini, Francesco De Angelis, Jacopo de Berardinis, Giorgio Forcina, Andrea PoliniSchool of Science and Tecnology, University of Camerino, via Madonna delle Carceri 9, Camerino MC, Italy
Abstract —Estimating the effects of introducing a range ofsmart mobility solutions within an urban area is a crucialconcern in urban planning. The lack of a Decision SupportSystem (DSS) for the assessment of mobility initiatives, forceslocal public authorities and mobility service providers to basetheir decisions on guidelines derived from common heuristics andbest practices. These approaches can help planners in shapingmobility solutions, but given the high number of variables toconsider the effects are not guaranteed. Therefore, a solutionconceived respecting the available guidelines can result in afailure in a different context. In particular, difficult aspects toconsider are the interactions between different mobility servicesavailable in a given urban area, and the acceptance of a givenmobility initiative by the inhabitants of the area.In order to fill this gap, we introduce Tangramob, an agent-based simulation framework capable of assessing the impactsof a Smart Mobility Initiative (SMI) within an urban area ofinterest. Tangramob simulates how urban traffic is expected toevolve as citizens start experiencing the newly offered travelingsolutions. This allows decision makers to evaluate the efficacy oftheir initiatives taking into account the current urban system. Inthis paper we provide an overview of the simulation frameworkalong with its design. To show the potential of Tangramob, 3mobility initiatives are simulated and compared on the samescenario. This shows how it is possible to perform comparativeexperiments so as to align mobility initiatives to the user goals.
Index Terms —Smart City, Smart Mobility, Agent-Based TrafficSimulations, Reinforcement Learning, Smart Urban Planning
I. I
NTRODUCTION
According to the United Nations [1], in 2016, world’spopulation was 7.4 billions inhabitants and about 54.5% ofthem lived in urban areas. Despite all the benefits histori-cally brought by urbanization, like poverty reduction, longerlife expectancy and economic wealth, such an uncontrolleddemographic growth is pushing cities to deal with severalmanagement problems. In particular, focusing on urban mo-bility, transport infrastructures are close to saturation andthis comes with a bunch of problems like car dependence,spatial footprint, traffic congestion, air and noise pollution.Novel smart mobility solutions need to be introduced, andinvestments have to be carefully assessed in relation to theireffective potential to improve the mobility ecosystem.Novel mobility initiatives are generally shaped, and theiradoption assessed, considering common guidelines and bestpractices. Nevertheless it is not seldom the case that the ob-served effects, after the concrete deployment of a solution, arenot satisfactory. In particular, there are two complex aspects
Manuscript under revision.Corresponding author: F. De Angelis ([email protected]). that are difficult to assess when following such approachesto planning. The first one relates to how the new mobilitysolution will interact with the already available ones, whereasthe second one relates to citizens acceptance. Indeed as manyarticles report ([2, 3, 4, 5, 6, 7, 8]), there are many casesin which the adoption of a smart mobility initiative did notbring the expected benefits. In particular, many real scenariosfrom Europe ([5, 7, 2]), China ([6]) and U.S.A ([3, 4, 8])demonstrated how proposed smart mobility services failed,since they were not accepted by communities. As argued by[2], the carsharing failure in London is attributed to a badservice configuration. Similarly, [3, 4, 5] argue how initiallypromising bikesharing solutions for the city of Salerno (IT)and Seattle (USA) have not been adopted by the population.The lack of a formal way to estimate the impacts of a range ofsmart mobility services and their interactions is also reportedin [9] and [10], remarking both the importance, and the actualabsence of a “common framework” for this purpose. Indeed,decision makers are in urgent need of innovative approachesproviding quantitative forecasts in relation to the differentaspects connected with the introduction of a novel mobilityinitiative. Resulting Decision Support Systems (DSS) willcomplement already available approaches in the definition andshaping of the smart mobility solution to adopt.This considerations motivated us in developing a novelDSS named Tangramob. This is an agent-based simulationframework capable of assessing the impacts of the intro-duction of a novel smart mobility initiative (i.e. a range ofeither homogeneous or heterogeneous smart mobility services)within an urban area of interest taking into account the currentmobility ecosystem, as well as salient features of citizens inrelation to the usage of mobility services. Indeed, agent-basedapproaches are considered effective for searching a solutionwithin huge state spaces when the domain to represent can beeasily conceived as a composition of heterogeneous entitiesinteracting in a distributed setting [11, 12]. This is certainly thecase of a mobility ecosystem in which many different entitiescan be identified, each one with its specific characteristics(e.g. commuters, transport means, roads, etc.), and the systembehaviour and its features emerge from the interactions amongsuch entities. Tangramob will simulate one day of mobilitystarting from a description of the population of interest andof the mobility resources available in the considered area,including the ones related to the initiative to evaluate. Theday will be simulated many times over many iterations toderive a final configuration and the corresponding output. Theiterations are needed since learning mechanisms are applied in
NTERNAL VERSION FOR ARXIV.ORG 2
Tangramob to let commuter agents try out the different avail-able mobility solutions. After each iteration each commuterwill provide a score for the travel experience according to itsown profile, and taking into account quantitative parameters,such as travel times. In this way, a commuter agent willlearn which are the transportation solutions that better fitits profile. Notably, the possibility to change transportationmeans in relation to the different segments of a travel allowsintermodality and multimodality within a simulation. Clearly,the more the provided data input are effectively representativeof the reality of interest, the more the returned data set willapproximate the possible effects introduced by the mobilitysolution under evaluation. From the output data it will bepossible to derive quantitative analysis in relation to changesin emissions, costs etc, as detailed in the following sections.Summarizing, Tangramob is a DSS that helps decisionmakers in planning SMIs. The DSS is distinguishable fromother proposals in relation to two main aspects: (i) it supportsthe simulation of intermodal and multimodal transport ser-vices; and (ii) it makes it possible to reflect the diversities ofcommuters with respect to their personal characteristics (e.g.gender, age, travel demand).The simulator is built over MATSim, a powerful trafficsimulator [13]. Tangramob is aimed at all people involved indefining and planning new mobility services: urban planners,who are in charge of improving urban mobility; transport com-panies, which need to ponder their investments; researchers,aiming at testing and validating new mobility solutions.The rest of the paper is organized as follows: Section IIoutlines the idea behind the Tangramob simulator and how itis expected to address the research problem. In section III weprovide an overview of the agent-based model of Tangramoband section IV describes its architecture. Finally, section Vproves the effectiveness and the potentialities of Tangramobby reporting an example of use. Section VI shows the currentattempts in supporting urban planners and mobility serviceproviders in urban mobility planning. and section VII reportssome conclusions and opportunities for future work.II. T HE T ANGRAMOB SIMULATOR
Tangramob is an agent-based simulation framework thatintends to support public and private decision makers in thetask of shaping smart mobility initiatives for a specific urbanarea of interest. It can be considered as a Decision SupportSystem (DSS) for smart mobility validation, focusing on theability to capture and reproduce the mobility behaviour of eachsingle commuter belonging to the selected sample population.For this purpose, Tangramob is organized as a simulationenvironment that the urban planner can easily use in orderto understand if introducing a smart mobility initiative, i.e.a collection of mobility services, can improve the travelingexperience of citizens as well as the performance of theurban transport system. Since the simulator is based on anAgent-Based Model (ABM), for each person in the samplepopulation, represented as an autonomous reasoning agent,we can observe whether or not it will make use of the newmobility services. These fine-grained results also provide users with a measure concerning the expected adoption rate of thesimulated mobility initiative, so as to figure out beforehand ifthe initiative can potentially succeed or not.Technically, a Tangramob simulation requires four inputs: • the urban road network of the area under study, • a representative population of the area with the mobilityagendas of people. An agenda summarizes what a persondoes during an ordinary working day (i.e. activities) andhow he moves from one place to the next one (i.e. legs ). • the description of the mobility services already offered by the city: public transport timetable, etc.; • the smart mobility initiative to evaluate, that is a list ofgeographically located containers (called tangrhubs ) ofone or more smart mobility services. Each smart mobilityservice belongs to a tangrhub and it comes with a numberof mobility resources (e.g. vehicles), as well as a servicecharge (i.e. cost per km and cost per hour).It is worth mentioning that the definition of an agent popula-tion is certainly the most complex and critical information tosupply, in particular in relation to profiles, and details on dailytravels. Obviously, the more the population is representativeof the reality of interest the more the results of the simulationcan be considered a good approximation. Strategies for thederivation of a population are out of scope for this paper,nevertheless different sources are available to define a repre-sentative synthetic population. Relevant data can be certainlycollected from periodic census or questionnaires distributed toa sample population. Particularly effective nowadays is MobileCrowd Sensing (MCS) [14] that uses mobile apps developedfor large scale sensing, and involve the contribution from acrowd of people that behave as probes of the dynamics of themobility in the city [15]. GPS data produced by the crowd arean excellent source of planning and transport information, andthey are widely used in mobility project (e.g., the communitybased GPS navigator Waze that tracks usersto understand roadway congestion). Activity recognition oftravel demand models can also be derived using Input-OutputHidden Markov Models (IOHMMs) to infer travelers’ activitypatterns from call detail records as suggested in [16].Starting from the provided information, the execution ofTangramob can be thought of as performing a comparativeexperiment. The experiment consists in introducing the smartmobility initiative (i.e. applying the treatment) into the urbanarea of interest (i.e. the treated system) while observing thesame reality as it is today, namely with no smart mobilityinitiative (i.e. control system). In the end, we can observe howthese systems differ with respect to the following measures: • travel distance , expressed in metres and referred to thedistance traveled by each commuter; • travel time , expressed in seconds and referred to the timespent traveling for each commuter; • CO emissions , expressed in grams and referred to thequantity of CO produced by each commuter accordingto the used means of transport; • cost of mobility , expressed in euros and referred to thecost of mobility for each commuter; • urban traffic levels , expressed as the number of traveling NTERNAL VERSION FOR ARXIV.ORG 3 vehicles on each road at a given moment in time band.This statistic is a picture of the road infrastructure understudy and it is useful when one needs to understand whichare the most congested roads within a time slot.Such a comparison would allow the user to understand if theproposed mobility initiative is in line with their expectations.In case they are not satisfied with the achieved results, the usercan change the configuration of the mobility initiative (e.g.relocating tangrhubs , adding/removing one or more tangrhubs ,modifying the parameters of a mobility service and so forth)in order to repeat the experiment as before.
A. The tangrhub
In Tangramob, the actual placement of smart mobilityservices within the urban area under study is made possibleby tangrhubs . A tangrhub can be defined as a geo-locatedentity providing citizens with one or more mobility services.A tangrhub collects one or more smart mobility services, eachof which is offered by either private or public providers. Forinstance, a carsharing service provided by two different com-panies, results in two different characterizations of resourcesand their usage deployed within the tangrhubs of interest.Considering the typical urban conformation, such a flexibleand modular abstraction allows urban planners to representall the existing transport facilities like railway stations, busstops and so forth, and to introduce intermodality among themobility services. Indeed, a bus stop could be represented asa tangrhub where only the bus service is available.Examples of smart mobility services that the user can addto a tangrhub are: dynamic public transport, shared transportservices (e.g. carsharing, bikesharing), dynamic ridesharing,autonomous taxis and so forth [17]. However, each smartmobility service m i provided by a tangrhub th j must belongto only one of the following service types: • intra-hub services, used for moving people to and fromth j thereby serving first mile trips, e.g. from a commuter’shome-place (departure) to th j , as well as last mile trips,e.g. from th j to a commuter’s workplace (destination). • inter-hub services, for moving commuters from th j toanother tangrhub th k supporting the service type of m i .From the simulator’s perspective, we can think of a tan-grhub as an entity with which people interact every time theyneed to travel. As a result of such interactions, tangrhubs areexpected to collaborate with each other in order to providecommuters with a list of valid traveling solutions. Thus, it isup to each person to evaluate and choose the most suitablesolution according to their own needs and preferences. B. Smart Mobility Initiative (SMI)
According to the concept of tangrhub seen before, shapinga Smart Mobility Initiative (SMI) is about placing a numberof tangrhubs within the urban area of interest, adding one ormore smart mobility services to each of them, and providing aspecific characterization for the added mobility services. Thus,it is up to the user (e.g. an urban planner) to design a listof candidate SMIs according to the goals and the availablefinancial resources of his local authority. To define a smart mobility service for a tangrhub , suchas carsharing, the user has to specify the service type (i.e.intra-hub or inter-hub), the initial number of vehicles and theservice charge (i.e. cost per km, per hour, and fixed), the CO footprint, and other parameters depending of the type ofvehicles. Therefore, in Tangramob, a mobility service providedby an organization is represented as a whole as the sum of allthe services made available by the same organization withinthe selected tangrhubs . It is worth noticing that the cost of amobility service does not need to correspond to a real currency.In fact, we can consider cost in terms of “points” since suchan approach fits the idea of mobility as a service [18, 19].These cost-related parameters are expected to affect themobility decisions of commuters. More precisely, commutersare more inclined to choose the most convenient services,i.e. the ones with the greatest efficiency / cost trade-off. Thus,leveraging the cost of mobility services allows urban plannersto achieve a mobility policy, thereby promoting some servicesagainst others. For instance, a cheap bikesharing service wouldhopefully be more preferable for commuters than an expensivecarsharing service in case of short trips. C. Tangramob commuting patterns
Fig. 1: 3-trip path Fig. 2: 2-trip path IFig. 3: 2-trip path II Fig. 4: Direct path
As new mobility opportunities are introduced, commutersare expected to change their daily commuting patterns. A commuting pattern is the intermodal representation of howa person moves from one place to another. Such a tripcan be either simple (e.g. by car) or more complex (e.g.by a combination of travel modes). A clear example of acommuting pattern is a route provided by Google Maps.In Tangramob, the complexity of commuting patterns can belimited thanks to the direct interconnection of tangrhubs viatheir inter-hub mobility services. Commuters are never offeredwith traveling solutions made up of more than three sub-trips.Letting
T H o , T H d be tangrhubs respectively close to origin o and destination d of a trip, we can group all the possiblecommuting patterns in four classes. In the first class (Figure1) a person p is expected to reach T H o either by walk or usingan intra-hub mobility service provided by the same tangrhub ;once arrived at T H o , an inter-hub mobility service will bring p at T H d ; finally, the commuter will be able to reach hisdestination d either by walk or using an intra-hub mobilityservice offered by T H d . Analogously, the second and the thirdclasses (Figures 2 and 3) represent a combination of two modaltrips performed either by intra-hub services or by personaltraveling modes. Finally, the last class (Figures 4) correspondseither to a direct trip (e.g. by car, bike, walk), or to the casea single inter-hub service is used. NTERNAL VERSION FOR ARXIV.ORG 4
III. T
ANGRAMOB A GENT -B ASED M ODEL OVERVIEW
Starting from the idea of Tangramob, we present the Agent-Based Model (ABM) on which it is conceived. The TangramobABM is composed of two agent types: commuter and tan-grhub . A commuter agent is the computational representationof a single person that is part of the sample populationunder study. Every commuter agent comes with some relevantpersonal characteristics, like gender and age, affecting theoutcomes of the actions taken during the simulation. Theseeffects also impact on the behavior of commuters. For instance,an elderly person will be less prone to travel by bicycle forlong trips, since this would take too long for him. Moreimportantly, every commuter has a personal mobility agenda,i.e. a sequence of daily activities (e.g. home, work, etc.)interleaved by mobility segments that tells how the agentmanages to get from one activity location to the next one.On the other hand, a tangrhub agent can be defined as alocal mobility service provider with the ability to improve itsservices as the simulation iterates; in the real-world, this activebehaviour might corresponds to a daily enhancement.Both agents live and operate, albeit with different per-ceptions, in a composite environment that is made of threedifferent spaces: the temporal space, the geographical spaceand the smart mobility services’ state space. Specifically, thetemporal space reflects the passage of time in seconds. The ge-ographical space can be defined as the directed weighted graphresulting from the road network infrastructure of the urbanarea under study; in particular, nodes represent intersectionsand edges denote streets. Such a space is the actual core ofthe transport simulation, since the physical limitations of theroad infrastructure can create bottlenecks and delays as peoplemove with a certain pace. Finally, the last sub-environment ismeant to represent the status of all the smart mobility serviceswhich are currently provided by tangrhubs . This space can beconceived as a tuple space in which the status of each mobilityservice breaks down into a number of smaller sub-states. Forinstance, the status of a carsharing service can be expressedas the combination of the states of all its vehicles.This complex environment allows agents to perform actionsthat can eventually alter the state of affairs of one or moresub-environments. In particular, as depicted in Figure 5, everytime a commuter needs to move from one place to another,an interaction with the surrounding tangrhubs takes place.During this interaction, a smart mobility negotiation occurs:the tangrhubs collaborate with each other in order to providethe commuter with a number of traveling alternatives. Atraveling alternative can be thought of as a combination ofone or more (up to three) mobility segments, each of whichcan involve a smart mobility service and it is based on theTangramob commuting patterns seen in section II-C. Next, thecommuter agent will perform a decision-making process so asto select the traveling alternative that is expected to maximizehis performance criteria.The alternative selection process is organized as follows:first, every single travelling alternative is evaluated accordingto the expected performance of each segment it is made of;then, the cost is introduced to influence such preference- ordered rank; finally, a travelling alternative is selected andthen simulated. Once the commuter agent has reached his finaldestination, he is expected to assign a score to every singlecommuted mobility segment to record its traveling experienceso as to make more informed decisions for the next iterations.As soon as a traveling alternative is chosen, the involved tangrhubs will reserve the required mobility services so thatthe commuter can start his journey. Finally, once the commuterhas reached his destination, he will be asked to leave afeedback for each smart mobility service used.
Fig. 5: Commuter-Tangrhub interaction loop
The behaviour of a commuter revolves around four actions:(i) synchronizing his mobility agenda with the closest tan-grhubs, to obtain a list of traveling alternatives for reaching thelocation of the forthcoming activity; (ii) choosing a travelingalternative out of the proposed ones; (iii) performing thechosen traveling alternative; and finally (iv) leaving as manyfeedback as the number of mobility services used in the courseof the day. A commuter will then try to maximize his/hertraveling experience minimizing travel time, covered distance,emissions and the cost of mobility. More precisely, this isdone by selecting the traveling alternative that is expected tooptimize such criteria from time to time.On the other hand, the tangrhub agent has the following twogoals: to maximize the traveling experience of commuters andminimize the number of mobility resources for each service.Thus, in order to achieve these objectives, a tangrhub canperform the following actions: (i) building a list of travelingalternatives in collaboration with other tangrhubs , (ii) providea commuter with a list of valid traveling alternatives, (iii)update the status of its own mobility services, (iv) improveand optimize its own mobility services.The tangrhub ’s service adaptation process is made possibleby commuters feedback. In particular, each feedback qualifiesthe traveling experience of a commuter using a specific mo-bility service. Collecting and averaging all the feedback of amobility service can give a metric concerning the performanceof that service, thereby contributing to its improvement andoptimization. For instance, if all the daily-collected carsharingfeedback are negative, a tangrhub would have a valid indicatorof such an inefficiency to run for cover. Therefore, the purposeof a feedback is twofold: on one hand, it pushes the commuteragent to reason about the quality of the mobility services tomake more informed decisions for the next iterations; on the
NTERNAL VERSION FOR ARXIV.ORG 5 other hand, it enables tangrhubs to align to the actual mobilityneeds of the population.Tangramob simulations are thus iterative: each iterationcorresponds to a typical day in which commuters experimentwith the introduced smart mobility services in order to recordtheir performance, while tangrhubs can improve their servicesiteration by iteration. This time-evolving behaviour, driven byfeedback, enables commuters to make more informed deci-sions every time they are offered a list of traveling alternatives.Therefore, commuters are modeled as proactive agents sincethere is need of an iteration-persistent memory structure, i.e.a knowledge base , to implement such an experience-basedlearning capability. With that idea, the decision-making pro-cess of commuters exploits their personal knowledge base inorder to evaluate the expected score of a traveling alternative,thanks to the experience accumulated from past iterations. Thisis achieved by updating the knowledge base, by means ofa Hebbian-like learning function. This will permit to grad-ually accumulate scores so as to let the commuter maturatean experience-based perception for every segment. Similarly, tangrhubs are modeled as self-adaptive agents which can usedifferent strategies and optimization methodologies to enabletheir travel improving behavior at the end of each iteration andby means of feedbacks.IV. D
ESIGN & I
MPLEMENTATION O VERVIEW
Considering the Tangramob agent-based nature, the frame-work has been developed on an already validated and robustagent-based traffic simulator named MATSim [13] (MultiAgent Transport Simulation). Such a design choice is due tothe fact that it is possible to represent the characterizations andthe behaviors of both our agent types in MATSim. Moreover,such a simulator can be adapted to support all the sub-environments of the model, allowing Tangramob to evaluatethe performance criteria as outcomes from the interactionsamong such spaces and agents.
A. Multi Agent Transport Simulation: MATSim
MATSim [13] is an activity-based multi-agent simulationframework for implementing large-scale agent-based transportscenarios. It is an open-source project implemented in Javaunder the GNU public license. As in Figure 6, the frameworkconsists of several modules which can be combined, usedstandalone, or replaced by own implementations.
Fig. 6: MATSim modules
MATSim is designed to model a single day and it isbased on a co-evolutionary approach in order to reproducereal-life scenarios. Every agent repeatedly optimizes its dailyactivity schedule while in competition for space-time slotswith all other agents on the transportation infrastructure. Thisoptimization follows an iterative process and it is based on different choice dimensions such as route selection, timechoice and mode choice. A MATSim run consists of a numberof iterations in which the steps in Figure 6 are repeated in acyclical manner. The initial demand arises from the study ofthe area to simulate, and it comprehends its topology (i.e. thenetwork), the mobility habits of its inhabitants and their per-sonal features. Every citizen possesses a memory containing afixed number of daily plans, each of which is composed of adaily activity chain and an associated score, i.e. the utility ofthat plan. Once the features of the scenario’s components areacquired, and before the MATSim mobility simulation, everyagent selects a plan from its memory according to the scoreassociated with each of them: higher score plans are morelikely to be selected.Afterwards, the selected plans are executed by means of themobility simulation module; the latter relies on the conceptof queue simulation, which was demonstrated to efficientlyapproximate real-life traffic flows. In particular, MATSimmodels roads as FIFO queues with a limited vehicle capacity;every time a vehicle asks permission to access a road, thecorresponding road agent can either respond positively, in casethere still is space, or negatively, if the queue capacity isreached. Thus, in case a commuter is not allowed to enter aroad segment a delay is produced in the system as long as theregular flow is restored. Finally, when a commuter managesto enter a road, he is added to the queue tail until he reachesits head in order to move to the next segment.The score computation is made after every mobsim run,and it is performed on the last executed plans by means of a scoring function. The score represents a measure about howthe traveling choices made by agents affected the execution oftheir activities: the higher the score the better the day.Once all plans have been scored, the replanning phase takesplace, as a portion of the population is allowed to modifytheir plans, in accordance with the co-evolutionary approach.Then, such plans are modified by applying a mutation operatoraccording to the previously mentioned choice dimensions.Finally, in the last iteration the replanning phase is notexecuted anymore and it is replaced with the analysis module.In fact, MATSim is strongly based on events stemming fromthe mobsim and this allows to record every action in thesimulation for further analysis . These events’ records can beaggregated to evaluate any measure at the desired resolution.MATSim can be applied in large scenarios. We show anexample considering a small city in the paper, neverthelessscalability to bigger cities should not be much a problemsince MATsim simulations of large-scale agent-based microsimulation models are proved scalable [20]. An experimentmade by MATSim developers with 1.62 million agents and163K links in the area of Zurich city were simulated in about20 minutes in a machine with 128GB RAM and 8 dual-core AMD Opteron CPUs. Also the Switzerland traffic wasmodeled in about 3 hours for a single MATSim iteration: onemillion roads and 7.3 million agents clearly show that large-scale, multi-agent micro-simulation can reasonably be used.
NTERNAL VERSION FOR ARXIV.ORG 6
B. Tangramob meets MATSim
Our framework has been implemented on top of MATSim,taking advantage of its flexible and modular architecture andtrying to maintain the same design principles. We redefinedand extended the behavior of some original MATSim modules,whereas other remarkable contributions were introduced insuch a way to capture all the features of the Tangramob ABmodel of Section III.
Fig. 7: Tangramob architecture
In particular, the module initial demand , in which thesimulation input data are collected and validated, is integratedwith the specification of the SMI, describing the locations ofthe tangrhubs on the map as well as the list of the mobilityservices available on each of them. Making this integrationpossible required us to implement the concepts of tangrhubagent , a new static but active entity that is responsible bothfor managing and offering new traveling opportunities to thenearby population, and for managing the associated mobilityservices, which can be seen as services provided by private orpublic companies/organizations and that overall constitute theinfrastructure of the SMIs available in the urban area.The mobsim module, specialized in simulating the urbantraffic, has been integrated with the MATSim “multimodal”extension, that allows to deal with different transport modesas well as simulating the overtaking of vehicles. This way,Tangramob can also evaluate the impact on the urban systemcaused by unconventional kinds of vehicles (e.g. scooters,bicycles, etc.). For this purpose, we redesigned the originalconcept of MATSim’s vehicles, and we introduced the char-acterization of mobility services with the ability to managesuch vehicles. Furthermore, our characterization takes intoaccount the most relevant vehicles features like: dimension,velocity, fuel type and consumption; all these specificationsare expected to impact on the traffic simulation, especially forwhat concerns travel delays and times, and thus are relevantinformation in relation to the mobility decisions of commuters.Concerning the scoring module, Tangramob still exploits theoriginal Charypar-Nagel scoring function [13]. This allowed usto validate the new learning process of Tangramob, exploitingthe existing MATSim’s validation work.The replanning phase designed for Tangramob is completelydifferent from that followed by MATSim. Whereas MATSimadopts a co-evolutionary algorithm, our framework is based on a reinforcement learning approach, allowing each commuterto evaluate his past traveling experience in order to improvetheir daily personal mobility. This is made possible by theimplementation of iteration-persistent memory structures, thatevery commuter can exploit as knowledge base, in order toaccumulate the score given for each mobility service usedduring the simulation. Thus, the score of a service acts asa reward for the action of choosing that service for a certaintrip. Such a different approach allows commuters to maximizethe expected utility of their mobility decisions. In particular,during the last iteration of the simulation, each commuter willdecide to either use the new mobility services, or not to acceptthe mobility initiative, according to the collected knowledge.Finally, the analysis module has been integrated with newstatistical collectors to gather all data useful to comparethe legacy urban mobility with the one emerging after theintroduction of a SMI. Some stats correspond to the agents’performance criteria described in section III, and others arefocused on the urban system as a whole. In particular, weaim at collecting the following statistical data: (i) urban trafficlevels, (ii) CO emissions, (iii) traveled distances, (iv) traveltimes, (v) land use levels, (vi) cost of mobility, (vii) numberof adopters, and (viii) resource usage level.As depicted in Figure 7, all these redefined modules formthe core of Tangramob, sitting on the top of MATSim andsome of its well-known extensions. Moreover, to make thesimulator more accessible and user-friendly, we have designedand implemented the following features: • a census data converter , namely a tool for translatingItalian census data into suitable input mobility agendas; • a population generator , for synthesizing a sample popu-lation from some statistical data about an urban area forwhich neither census nor plans are available; • tangrhub aided placement , a tool that analyzes the loca-tions of people daily activities in order to spot the mostpopulated urban areas. By using clustering algorithms,this tool supports users in the task of placing tangrhubs in a more rational way, since keeping them close to thepopulation is expected to minimize micro-mobility. • a web-based Graphical User Interface (GUI) , whichallows users to select the geographical area of interestto automatically retrieve the urban road network of theselected area from
OpenStreetMap . In case the usercannot generate the data of the sample population understudy from the census data converter, the user is expectedto load the mobility agendas manually or to generatea synthetic but realistic population from other sources.Finally, once the geographical context is defined, the usercan shape a smart mobility initiative by geographicallyplacing a number of tangrhubs and configuring each ofthem with one or more mobility services.The resulting architecture is fully extensible in every layer,providing the possibility to develop extensions over both theMATSim layer and the Tangramob codebase.V. T
ANGRAMOB : AN EXAMPLE OF USE
In order to show an example of use of Tangramob, we reportsome experiments performed on a real scenario in the city of
NTERNAL VERSION FOR ARXIV.ORG 7
Ascoli Piceno (Italy). Ascoli Piceno is a small city with about50.000 inhabitants over 158 km and several other thousandof people who live in near places outside the city perimeter. Fig. 8: Ascoli Piceno network with tangrubs positioning for SMI’s
As depicted in Figure 8 the network represents all the cityroads and infrastructures including the city center and theroads that connect the city with other places. Starting fromavailable statistics, we identified 15 areas and for each onewe identified inhabitants and jobs as described in Table I.
Areas People JobsP.ta Solest´a 5009 3170P.ta Romana 1839 700Centro 7740 6760Piazzarola 409 250C. Parignano 3368 2170P.ta Maggiore 11500 10900Monticelli 10633 8000Brecciarolo 645 1300 Areas People JobsP. di Bretta 1694 500Battente 103 3000Marino 576 1400Villa Pigna 3000 2000Z. Industriale 500 6500C. di Lama 3000 5000Frazioni 6242 6000
TABLE I: Population and jobs in the city areas
In the experiment, we modeled the whole population con-sidering the suburbs with 56.000 agents. Using the statisticsof the municipality we have built a normally distributedpopulation age with a 45% in range 25-49. Female are 52%and male 48%. These parameters are expected to affect theact of travelling of commuters, thus impacting on their score.Basically, mobility agendas has been organized with threedaily activities in the following order: home, work, home .Thus, a commuter moves from its home to a workplace inanother area and viceversa. For sake of clarity, we consider inthis experiment as work each kind of activity different to stayat home . We also do not consider multi-trip commutes.As a typical real-case scenario, peak activity hours canbe split into two different moments: 8:00 a.m. commutersstart moving towards the workplaces; while at 16:00 p.m.commuters come back home from work. The first activity inthe morning is distributed in the 5:00 a.m. - 13:00 a.m. timeslot with 45% included in the 07:00 a.m. - 08:00 a.m. hour.The homecoming happens at the end of the work activity. Thattime is modeled using a Gaussian distribution centered over 6hour of duration.In this scenario, we aim at investigating the impacts ofthree different smart mobility initiatives that integrate trans-port services: a bikeshare, an electric carshare, and an e-scootersharing service. All vehicles used are zero emissions.We use 11 tangrhubs in the city areas as several locations in the city center can be served by the same hub. Each hub ischaracterized as in Table II, for readability we use the sameresources for each tangrhub in this example.As shown in Table II, each SMI shares the same numberof tangrhubs , each of which is provided with the same choiceset of mobility services. Even the geographical location of tangrhubs is the same for all the initiatives, and it is denotedby the triangles depicted in Figure 8. For each tangrhub wespecify the dimension of the fleet the hub manage at the startof the simulation, its total capacity to store vehicles is seta 25% more than the initial fleet. What differs among theseinitiatives is just the number of mobility resources, which inthis case, correspond to the vehicle fleet of each service.
FleetMobility Services SMI-1 SMI-2 SMI-3TH bikesharing 10 10 50carsharing – 10 50e-scootersharing – 10 50Total bikesharing 110 110 550carsharing – 110 550e-scootersharing – 110 550
TABLE II: Grid network: tangrhubs experimental setup
For each mobility service we specify costs. For this experi-ment, we set the costs of the chosen mobility services, whichin turn were set according to the actual average service chargesin Europe, as summarized in Table III.
Cost per h Cost per km Fixed CostBikesharing 0.5 e e e Carsharing 13 e e e e-scootersharing 2,5 e e e TABLE III: Grid network: mobility services’ costs
As argued in Section II, understanding how the proposedSMIs impact both commuters and the transport system re-quires a comparative experiment. In particular, considering thatcommuters in this scenario are used to move by private cars,first we simulate the current urban mobility (i.e. the pre-SMI simulation), then we simulate each SMI separately (i.e.
SMI-1 , SMI-2 and
SMI-3 simulations). Afterwards, we compare thesesimulations with respect to the following variables: traveleddistance, travel time, CO emissions, cost of mobility andurban traffic levels; all these values are collected during the lastiteration of each simulation. The first 4 variables are intendedas per-capita indicators (averaged values) and summarize thetraveling experience of commuters, whereas the last one canbe seen as a performance measure of the urban system. A. Experimental results
In this section, we show and discuss the results obtainedfrom our simulations to compare them according to thejust mentioned indicators. We also provide some interestinginsights concerning the impact of the 3 SMIs on peopleacceptance and on mobility resource usage levels.
1) Number of tangrhubs’ subscribers: A subscriber is aperson who uses the mobility services provided by tangrhubs .This value may measure the success of a SMI in terms ofpeople acceptance. As noticeable in Figure 9, the number of NTERNAL VERSION FOR ARXIV.ORG 8
Fig. 9: Tangrhubs subscriptions Fig. 10: Traveled distances comparison Fig. 11: Travel times comparisonFig. 12: Emissions comparison Fig. 13: Mobility costs comparison Fig. 14: Mobility resources usage subscribers increase as the SMI has more mobility resources,where the horizontal line denotes the entire population.
2) Commuters’ performance measures:
The first variableinvolved in the comparison is the traveled distance of com-muters shown in Figure 10. In the 3 SMI simulations, com-muters are expected to travel shorter distances than the pre-SMI ones even if the differences are not so marked. For whatconcerns travel times (Figure 11), in the simulations of SMI-1 and SMI-2 commuters spend less time traveling. This is agood indicator of the effectiveness of the SMIs. Conversely,in SMI-3 commuters spend much more time traveling thanbefore. This indicates that SMI-3 has some problems either inthe configuration or in moving people respect to the pre-SMI.Concerning the comparison of CO emissions produced bycommuters, we found that the carbon footprint of the 3 SMIssimulations tends to decrease in directly proportional way withthe number of subscribers. Therefore, we can affirm that themore the SMI satisfies a large section of the population, themore the simulation becomes eco-friendly if we use greenvehicles. SMI-1, SMI-2 and SMI-3 reduce CO respectivelyof 20%, 25% and 35%. Besides the environmental impact, wealso found that there exists an inverse relationship between thenumber of subscriptions and the daily costs of mobility . As canbe seen in Figure 13, a commuter in the pre-SMI simulationspends on average e e e e
3) Mobility resources usage:
Tangramob can provide statsconcerning the level of mobility resources usage of the SMIs(Figure 14). The analysis of these data allows to understand ifa SMI is efficiently configured, so as to refine it for obtainingsimilar results with fewer mobility resources. In our case, itturns out that SMI-1 and SMI-2 are properly configured andthey resources are used. SMI-3 have a large number of unused vehicles, we can reduce its fleets in other simulation attempt.A closer look to the resource usage of SMI-3 in Figure 15shows the incorrect sizing for the car and scooter serviceshighlighting however the right usage of bikes.
Fig. 15: Mobility resource usage SMI-3
Gathering together all the results, we can conclude thata properly configured SMI helps reducing several urbanproblems, like traffic congestion levels and consequently airpollution. The experiment conclude that SMI-2 shortly reduceddistances by 20% mantaining substantially the same traveltimes but lowering significantly emissions and costs. Moreoverits application actually use all the resources associated withservices. The same conclusion can be made for SMI-1 alsoif the benefit is less noticeable. SMI-1 and SMI-2 could beevaluated in relation to their implementation costs by a urbanplanner and a decision maker. SMI-3 on the contrary increasesthe travel time while maintaining important benefits in traveldistances, emission and costs. However, its implementationrequires many resources, many of which are left unused.The 3 simulations of this experiment took about two and ahalf hours each, with 110 iterations on a Linux machine withan i7-7700k CPU @ 4.8GHz and 16GB RAM. We used in thetest the whole 56000 agents population. Running a mid-sized
NTERNAL VERSION FOR ARXIV.ORG 9 scenario with a real population of 500K inhabitants shouldbe done scaling the population to 10% as suggested by [13]thus such data makes us confident on feasibility of Tangramobsimulations also for scenarios larger.VI. R
ELATED W ORK
To the best of our knowledge, the state of the art doesnot provide any easy-to-use tool for assessing the impacts ofsmart mobility initiatives, in particular when several mobilityservices are considered. This section thus aims at presentingand discussing the main relevant studies sharing our intent.We present simulation-based studies that can be defined asin-silico experiments in which scientists investigate how theintroduction of a certain smart mobility service could improvethe urban transport system of a chosen area of interest. Thesestudies are performed by extending traffic simulators, likeMATSim [13] and SUMO [21], and the rigorous nature ofsuch experiments can guarantee the reliability of their results.For instance, in [22], Bischoff et al. extended MATSim inorder to investigate a city-wide replacement of private carswith variously sized Autonomous Taxicab (AT) fleets. Resultsshowed that a fleet of 100,000 AT vehicles could satisfy allthe inner city trip demand with: an average waiting time fora vehicle of under three minutes at most times of the day,and under five minutes during peak hours. In [23], Balacet al. simulated the introduction of two different carsharinginitiatives: round-based and one-way. The first one allowsusers to pick-up a car from a nearby station and return it laterto the same location. The second one is similar to the round-based type, but it allows one to park the car at the closeststation from the destination. The simulation was performedby means of a MATSim extension, limiting the scenario tothe centre of Zurich. Results proved that the round-basedcarsharing is mostly chosen for shopping and leisure trips,whilst one-way for commuting ones.All these studies bring insightful results with regard tohow a transportation system is expected to improve afterthe introduction of a smart mobility service. This is madepossible by the scientific nature of such traffic simulations,as showed by the MATSim team in [13]. However, each ofthese studies deals with a single solution, so there still is nocommon framework to assess the impacts and performanceof a range of heterogeneous smart mobility services [10] aswell as an holistic and interrelated vision of these actions [9].Furthermore, each study pertains to a specific geographicalarea (e.g. Berlin for AT, Zurich for carsharing) and thetechnical organization of the corresponding extension is notflexible enough to be adapted to other areas. Finally, it isworth mentioning that only IT-skilled users would be able tocustomise such extensions because of their in-code nature.Other than MATSim and SUMO, traffic simulators like Sim-Mobility [24], Vissim [25] and SMART (Scalable MicroscopicAdaptive Road Traffic Simulator) [26] do not currently providerelevant studies on the impacts of smart mobility solutions.VII. C
ONCLUSIONS AND F UTURE W ORK
Understanding how urban mobility is expected to evolveafter the introduction of new smart mobility services is a crucial task in the Urban Planning field. Local public author-ities and mobility service providers currently design mobilityinitiatives according to common heuristics and best practices;these approaches cannot be expected to generalize to everygeographical context due to the complexity and the diversity ofurban systems. Thus, deploying a mobility initiative is the onlyway to get measure ex post, but this also comes with potentialrisks since a failing initiative would result in a considerablewaste of resources and trust.To address this problem we introduced Tangramob, anagent-based simulation framework that allows users to assessimpacts and performances of a mobility initiative withinan urban area of interest. Tangramob performs comparativeexperiments between, before, and after the introduction of amobility initiative, approximating real-world urban dynamicsby adopting reinforcement learning techniques. The computa-tional nature of these experiments makes it easy to supporturban mobility decisions permitting to reduce costs and risks.Tangramob is still under active development and improve-ment, nonetheless the current version already permitted torun meaningful experiments that provided positive resultson the usefulness and the potentialities of the simulator. Inparticular, users can measure the impacts of a simulated smartmobility initiative with respect to: urban traffic levels, CO emissions, traveled distances, travel times, land use levels, costof mobility, number of adopters and resources usage level.Thus, it is up to the user evaluate which variables are morerelevant for understanding whether or not an initiative is inline with his objectives. The experiment we shown help urbanplanner to consider future initiatives and policies. SMI-1 is thecost effective solution impacting significantly CO emissionsand personal costs. SMI-2 is the most powerful initiativeable to lower again that values while offering a variety ofservices to the commuters. SMI-3 is clearly oversized and theimprovements made possible by its use are not justified byimplementation costs and resource unused rate. From these,planners could refine SMI-1 and SMI-2 to arrive at a simulatedcity planning useful to the decision makers.Planned future work includes the extension of the currentscoring function with additional traveling comfort criteria tomeasure the comfort of a traveling experience with a certainvehicle to let the commuter agents evaluate a mobility serviceas a whole. We are also working on additional evaluations,taking into account more complex scenarios.R EFERENCES [1] UN, “The world’s cities in 2016,”
New York , 2016.[2] C. Pitas and D. Goodman. Bmw tries to succeed wheredaimler failed with london car-share scheme. [Online].Available: https://goo.gl/19SsS5[3] L. Alter. (2013) Why do some bike-share systemssucceed and others fail? [Online]. Available:https://goo.gl/DM3KvQ[4] D. Westneat. (2016) Bike shares failure deflates seattlesself-image. [Online]. Available: https://goo.gl/fCliOa[5] E. Negri. (2016) Salerno, un fallimento il servizio di bicicondivise. [Online]. Available: https://goo.gl/RWQNmC
NTERNAL VERSION FOR ARXIV.ORG 10 [6] A. Mamiit. (2016) Why the ride-sharing company failedto conquer china and what it means for everyone else.[Online]. Available: https://goo.gl/cHuC9n[7] O. Sulopuisto. (2016) Why helsinki’s innovativeon-demand bus service failed. [Online]. Available:https://goo.gl/7FOhzy[8] K. Fehrenbacher. Another failed attempt to make ridesharing work in the u.s., ridejoy to shut down. [Online].Available: https://goo.gl/3ITYce[9] L. McGrath, “Smart Mobility in Smart City: ActionTaxonomy, ICT Intensity and Public Benefits Clara,”
Lecture Notes in Information Systems and Organisation ,2016.[10] K. Zavitsas, I. Kaparias, and M. G. H. Bell, “Transportproblems in cities,”
Transport , 2011.[11] P. Davidsson, J. A. Persson, and J. Holmgren, “On theintegration of agent-based and mathematical optimizationtechniques,” in
Agent and Multi-Agent Systems: Tech-nologies and Applications . Berlin, Heidelberg: SpringerBerlin Heidelberg, 2007, pp. 1–10.[12] M. Barbati, G. Bruno, and A. Genovese, “Applications ofagent-based models for optimization problems: A litera-ture review,”
Expert Systems with Applications , vol. 39,no. 5, pp. 6020–6028, 2012.[13] A. Horni, K. Nagel, and K. W. Axhausen,
TheMulti-Agent Transport Simulation MATSim . London:Ubiquity-Press, 2016.[14] B. Guo, Z. Wang, Z. Yu, Y. Wang, N. Y. Yen,R. Huang, and X. Zhou, “Mobile crowd sensing andcomputing: The review of an emerging human-poweredsensing paradigm,”
ACM Comput. Surv. , vol. 48,no. 1, pp. 7:1–7:31, Aug. 2015. [Online]. Available:http://doi.acm.org/10.1145/2794400[15] H. Ma, D. Zhao, and P. Yuan, “Opportunities in mo-bile crowd sensing,”
IEEE Communications Magazine ,vol. 52, no. 8, pp. 29–35, 2014.[16] M. Yin, M. Sheehan, S. Feygin, J.-F. Paiement, andA. Pozdnoukhov, “A generative model of urban activitiesfrom cellular data,”
IEEE Transactions on IntelligentTransportation Systems , 2017. [17] M. Ciuffini, C. Aneris, V. Gentili, S. Operto, L. Refrigeri,and L. Trepiedi, “La sharing mobility in italia: numeri,fatti e potenzialit´a,” Osservatorio Nazionale Sharing Mo-bility (Italia), Tech. Rep., 2016.[18] E. M. Finger, N. Bert, and D. Kupfer, “From the Helsinkiexperiment to a European model?”
FSR Transport , 2015.[Online]. Available: https://goo.gl/AFzcOI[19] Catapult Transport Systems, “Exploring the opportunityfor Mobility as a Service in the UK,” 2016.[20] R. A. Waraich, D. Charypar, M. Balmer, and K. W.Axhausen,
Performance Improvements for Large-ScaleTraffic Simulation in MATSim . Cham: SpringerInternational Publishing, 2015, pp. 211–233. [Online].Available: https://doi.org/10.1007/978-3-319-11469-9 9[21] M. Behrisch, L. Bieker, J. Erdmann, and D. Krajzewicz,“Sumo–simulation of urban mobility: an overview,” in
Proceedings of SIMUL 2011, The Third InternationalConference on Advances in System Simulation , 2011.[22] J. Bischoff and M. Maciejewski, “Autonomous taxicabsin berlin–a spatiotemporal analysis of service perfor-mance,”
Transportation Research Procedia , vol. 19, pp.176–186, 2016.[23] M. Balac and F. Ciari, “Modeling station-based car-sharing in Switzerland,” , no. May, 2014.[24] M. Adnan, F. C. Pereira, C. M. L. Azevedo, K. Basak,M. Lovric, S. Raveau, Y. Zhu, J. Ferreira, C. Zegras, andM. Ben-Akiva, “Simmobility: A multi-scale integratedagent-based simulation platform,” in , 2016.[25] M. Fellendorf and P. Vortisch,
Microscopic Traffic FlowSimulator VISSIM . Springer New York, 2010.[26] K. Ramamohanarao, H. Xie, L. Kulik, S. Karunasek-era, E. Tanin, R. Zhang, and E. B. Khunayn, “Smarts:Scalable microscopic adaptive road traffic simulator,”