research article an initial implementation of multiagent...

12
Research Article An Initial Implementation of Multiagent Simulation of Travel Behavior for a Medium-Sized City in China Chengxiang Zhuge, 1 Chunfu Shao, 1 Jian Gao, 2 Meng Meng, 1 and Weiyang Xu 3 1 MOE Key Laboratory for Urban Transportation Complex Systems eory and Technology, Beijing Jiaotong University, Beijing 100044, China 2 School of Traffic and Transportation, Beijing Jiaotong University, Beijing 100044, China 3 School of Economics and Management, Beijing Jiaotong University, Beijing 100044, China Correspondence should be addressed to Chunfu Shao; [email protected] Received 7 November 2013; Revised 12 December 2013; Accepted 14 December 2013; Published 13 March 2014 Academic Editor: Baozhen Yao Copyright © 2014 Chengxiang Zhuge et al. is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Since the traditional four-step model is so simple that it cannot solve complex modern transportation problems, microsimulation is gradually applied for transportation planning and some researches indicate that it is more compatible and realistic. In this paper, a framework of agent-based simulation of travel behavior is proposed, which is realized by MATSim, a simulation tool developed for large-scale agent-based simulation. MATSim is currently developed and some of its models are under training, so a detailed introduction of simulation structure and preparation of input data will be presented. In practice, the preparation process differs from one to another in different simulation projects because the available data for simulation is various. us, a simulation of travel behavior under a condition of limited available survey data will be studied based on MATSim; furthermore, a medium-sized city in China will be taken as an example to check whether agent-based simulation of travel behavior can be successfully applied in China. 1. Introduction Traffic forecasting, no matter if short-term or long-term, macroscopic or microscopic, static or dynamic, is an attrac- tive issue in transportation planning. Four-step process, which is a famous traditional forecasting method, cannot be realistic and complex enough to solve modern transportation planning problems emerging in recent years with rapid urban development. Its shortcoming is especially expressed in two aspects [1]. (i) Static Traffic Assignment. e four-step process regards the steam flows as static (time independent), which makes it difficult or impossible to model any kind of time-dependent effects and like peak traffic spreading; congestion spillback. (ii) Aggregate Individuals’ Behavior. Transportation demand is naturally derived from performing activities at different locations which is the result of a series of decisions made by individuals. e four-step process’s aggregation feature cannot solve transportation problems from the root. In order to overcome the shortcoming above, combining the Dynamic Traffic Assignment (DTA) and Activity-Based Model (ABM) is an efficient solution. In the past decades, with the survey data for transport planning getting more detailed and complex, as well as the fact that the performance of computer hardware has been rapidly growing, a multiagent simulation, which integers the features of DTA’s dynamic and ABM’s individual, comes into being. By using multiagent sim- ulation technology, each traveler is regarded as an individual agent who can make decisions according to his/her own goals, attributes, preference, resources, and so forth. us, different agents will make different decisions even though they stay in the same environment. In addition, the features of the dynamic of DTA and the individual of ABM are as follows. Hindawi Publishing Corporation Mathematical Problems in Engineering Volume 2014, Article ID 980623, 11 pages http://dx.doi.org/10.1155/2014/980623

Upload: others

Post on 21-Oct-2019

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Research Article An Initial Implementation of Multiagent ...downloads.hindawi.com/journals/mpe/2014/980623.pdf · Research Article An Initial Implementation of Multiagent Simulation

Research ArticleAn Initial Implementation of Multiagent Simulation ofTravel Behavior for a Medium-Sized City in China

Chengxiang Zhuge1 Chunfu Shao1 Jian Gao2 Meng Meng1 and Weiyang Xu3

1 MOE Key Laboratory for Urban Transportation Complex Systems Theory and Technology Beijing Jiaotong UniversityBeijing 100044 China

2 School of Traffic and Transportation Beijing Jiaotong University Beijing 100044 China3 School of Economics and Management Beijing Jiaotong University Beijing 100044 China

Correspondence should be addressed to Chunfu Shao cfshaobjtueducn

Received 7 November 2013 Revised 12 December 2013 Accepted 14 December 2013 Published 13 March 2014

Academic Editor Baozhen Yao

Copyright copy 2014 Chengxiang Zhuge et al This is an open access article distributed under the Creative Commons AttributionLicense which permits unrestricted use distribution and reproduction in any medium provided the original work is properlycited

Since the traditional four-step model is so simple that it cannot solve complex modern transportation problems microsimulationis gradually applied for transportation planning and some researches indicate that it is more compatible and realistic In this papera framework of agent-based simulation of travel behavior is proposed which is realized by MATSim a simulation tool developedfor large-scale agent-based simulation MATSim is currently developed and some of its models are under training so a detailedintroduction of simulation structure and preparation of input data will be presented In practice the preparation process differsfrom one to another in different simulation projects because the available data for simulation is variousThus a simulation of travelbehavior under a condition of limited available survey data will be studied based onMATSim furthermore a medium-sized city inChina will be taken as an example to check whether agent-based simulation of travel behavior can be successfully applied in China

1 Introduction

Traffic forecasting no matter if short-term or long-termmacroscopic or microscopic static or dynamic is an attrac-tive issue in transportation planning Four-step processwhich is a famous traditional forecasting method cannot berealistic and complex enough to solvemodern transportationplanning problems emerging in recent years with rapid urbandevelopment Its shortcoming is especially expressed in twoaspects [1](i) Static Traffic Assignment The four-step process regardsthe steam flows as static (time independent) which makes itdifficult or impossible to model any kind of time-dependenteffects and like peak traffic spreading congestion spillback(ii) Aggregate Individualsrsquo Behavior Transportation demandis naturally derived from performing activities at differentlocations which is the result of a series of decisions made

by individuals The four-step processrsquos aggregation featurecannot solve transportation problems from the root

In order to overcome the shortcoming above combiningthe Dynamic Traffic Assignment (DTA) and Activity-BasedModel (ABM) is an efficient solution In the past decadeswith the survey data for transport planning getting moredetailed and complex as well as the fact that the performanceof computer hardware has been rapidly growing amultiagentsimulation which integers the features of DTArsquos dynamic andABMrsquos individual comes into being By usingmultiagent sim-ulation technology each traveler is regarded as an individualagentwho canmake decisions according to hisher own goalsattributes preference resources and so forth Thus differentagents will make different decisions even though they stay inthe same environment

In addition the features of the dynamic of DTA and theindividual of ABM are as follows

Hindawi Publishing CorporationMathematical Problems in EngineeringVolume 2014 Article ID 980623 11 pageshttpdxdoiorg1011552014980623

2 Mathematical Problems in Engineering

(i) ABMrsquos Individual Each agent will make independentdecisions and store its decisions in a ldquoplanrdquo which mainlyincludes its activity time and location

(ii) DTArsquos Dynamic After creating agentsrsquo initial plan adynamic iteration of agentsrsquo route choice and time distri-bution will be carried out which allows tracking personsdynamically in time the goal of iteration is to find a dynamicbalance which is similar to Nash Equilibrium

The agent-based microsimulation modeling techniquefor transportation planning is rapidly developed and isfrequently applied to practice in recent years This paper willuse theMATSimas themultiagent simulation tool to simulatethe travellersrsquo behaviorMATSimwhichwas developed by TUBerlin ETH Zurich and CNRS Lyon provides a toolbox toimplement large-scale agent-based transport simulations [2]A more detailed introduction can be found in Section 3

This paper will start with the literature review concerningthe latest advancement of traffic assignment such as DTAABM and MATSim (Section 2) Then it will present theoutline of the general simulation structure (Section 3) anda detailed description of the modules in MATSim Next wewill take Baoding one of the medium-sized cities in Chinaas an example and the way to prepare the input data and toestablish the scenarios is introduced (Section 4) Then thesimulated results are compared with count data to validatethe proposed simulation method (Section 5) Finally it endsup with a conclusion (Section 6)

2 Literature Review

Traffic assignment plays an important role in the study oftransportation problems [3ndash6] The literature review belowwill focus on the latest advancement of traffic assignmentwhich will include DTA ABM and MATSim

DTA is commonly used to search the best route forusers in a scenario where no users can get better off byselecting another route and the scenario is called NashEquilibrium statement A host of research regarding DTA hasbeen conducted Florian et al described a simulation-basediterative dynamic equilibrium traffic assignment model [7]Bellei et al presented a new formulation of within-day DTAwhere dynamic user equilibrium is expressed as a fixed-point problem in terms of arc flow temporal profiles [8]Munoz and Laval studied the system optimum DTA in anetwork consisting of a hypothetical surface street grid anda congested freeway section [9] Szeto et al proposed a cell-based multiclass DTA problem that considers the randomevolution of traffic states [10] Juran et al developed a DTAmodel that can evaluate the effects of moving bottleneckson network performance in terms of both travel times andtraveling paths [11] Antoniou et al presented an onlinecalibration approach that jointly estimates demand andsupply parameters of DTA systems and it was empiricallyvalidated through an extensive application [12] Gentileet al proposed a new model for the within-day DTA onroad networks where the simulation of queue spillovers isexplicitly addressed and a user equilibrium is expressed as

a fixed-point problem in terms of arc flow temporal profiles[13]

ABM is modeled on an individual level and successfullyimplemented by many models and it was employed toaddress variety of transportation problems [14 15] Davidsonet al summarized the recent successful experience in thedevelopment and application of ABM for metropolitan plan-ning organizations in the US [16] Hatzopoulou and Millerextended the capability of an ABM for the Greater TorontoArea to model and map traffic emissions and atmosphericdispersion [17] Dong et al employed the activity-basedtheory tomodel a newmeasure of accessibility called activity-based accessibility [18] Recker et al presented an estimationprocedure for an ABM to estimate the relative importanceof factors related to spatial and temporal interrelationshipsamong the out-of-home activities that motivate a householdrsquosneed or desire to travel [19] Kang and Recker applied anABM to evaluate the potential impacts of plug-in hybridelectric vehicles on energy and emissions [20] Pendyala etal developed a comprehensive multimodal activity-basedsystem to predict the travel demand in Florida and theoutcome of research was Florida Activity Mobility Simulator(FAMOS) [21] Yagi and Mohammadian developed a com-prehensive activity-based modeling system in the context ofdeveloping countries providing accurate estimates which areexpected to serve as better inputs for evaluation of differenttransportation policy scenarios [22]

There is a wide application of DTA and ABM which canbe proved by the review above but combining both theories isseldom implemented [23 24] MATSim which incorporatesboth DTA and ABM is an efficient tool to implement a large-scale agent-based simulation for travel behavior and trafficflow and their interactions So far research on MATSim hasbeen conducted widely by many scholars and the scope ofthe research mainly focuses on three aspects (1) Basic theoryfor designing and implementing MATSim At the begin-ning the emphasis was placed on establishing frameworkof MATSim and incorporating basic models to make it run[25ndash27] (2) Optimization of MATSim At the second stagethe modes of MATSim such as location choice [28] andmode choice [29] were enhanced and some of them werereplaced with advanced ones (3) Application of MATSimMATSim is applied into varieties of aspects like travelbehavior [30 31] parking behavior [32] and freight transport[33]

In conclusion MATSim has been developed for manyyears and attracted a variety of researchers to apply it oroptimize it but there is still some reaming interesting workIn this paper an external work to enrich the MATSimapplicationwill be carried out and it differs fromother studiesin the following aspects

(i) MATSim will be used to simulate one of the medium-sized cities in China A Chinese medium-sized city willbe quite different from cities in foreign counties in urbandevelopment activity type travel behavior and so on Inaddition a large-scale simulation of travel behavior wasseldom implemented in a real city many of the studies usednumerical examples to validate simulation models of travelbehavior

Mathematical Problems in Engineering 3

Execution

(Mobsim)

ScoringReplanning

Controller

Initial individual daily demand

Networkxml

Input Output

Evolutionary algorithm

Optimization statistics and analysis

Execution

(Mobsim)

ScoringReplanning

Controller

Initial individual daily demand

Networkxml

Input Output

Evolutionary algorithm

Optimization statistics and analysis

Intermediate relaxed demand

Figure 1 Schematic overview of MATSimrsquos simulation structure

(ii) Since different cities have different available trafficsurvey data they differ in quality spatial resolution purposeand so forth An approach of how to prepare the input datawith limited available information and low spatial resolutionis studied in this paper

3 Simulation Structure

31 A Brief Introduction of the Simulation Structure Basedon MATSim the simulation structure of travel behavioris designed and shown in Figure 1 It mainly includesthree parts input evolutionary algorithm (EA) and OutputFirstly the input data (including initial demand and network)will be fed into the mobility simulation (see Section 32)and all agentsrsquo plans will be executed simultaneously andthen the execution results (simulated data) will tell the othermodules what happened during the simulated day secondlyevery executed plan will be scored based on the simulateddata on the basis of the scoring function (see Section 33)thirdly according to the scoring the replanning (includingReroute and Time Allocation Mutator see Section 34) iscarried out to provide the feedback which allows for theevolution of plans Finally after reaching the customizedtimes of iteration the simulation results such as optimizationstatistics and analysis intermediate plan and relaxed planwill be put out

For EA is the core part of the simulation it will be firstdiscussed in detail in the following sections

32 Execution (Mobsim) Themobility simulation (Mobsim)refers to the simulation of the physical transportation systemIt creates events for every agentrsquos action in the simulationlike enteringleaving road and departingarriving at activityplacesThen the events will be used for the scoringmodule Inthe history ofMATSim several MobSims such as QueueSim-ulation QSimDEQSim and JDEQSimhave been developedSomeof themare still in use others are obsolete andno longersupported today This paper will choose Qsim which is themost commonly used Mobsim Qsim is an external queuesimulation in which every link is regarded as a first-in first-out (FIFO) queue with three restrictions [1]

(i) Every agent has to stay on the simulated link for acertain time

(ii) Link storage capacity is imported to limit the numberof agents on the simulated link

(iii) Flow capacity is imported to limit the number ofagents that can leave the simulated link in a givenperiod of time

Even though the queue simulation is indeed simple thesimulated output data is enough for transportation planning

33 Scoring In order to compare different plans a scoringfunction is proposed to evaluate each planrsquos performance InMATSim the utility-based approach is used The detailedfunction is as follows [1]

(i) The Total Score of a Plan It is calculated based on thefollowing equation

119880total =119899

sum

119894=1

119880perf119894 +119899

sum

119894=1

119880late119894 +119899

sum

119894=1

119880travel119894 (1)

where119880total is a total score of a given plan 119899 is the number ofactivities119880perf119894 is the utility for performing activity 119894119880late119894 isthe utility for arriving late to activity 119894 and119880travel119894 is the utilityfor travelling to activity 119894

(ii) The Utility for Performing Activity A logarithmic form isused for the utility as follows

119880perf119894 (119905perf119894) = max[0 120573perf sdot 119905lowast

119894(ln(

120573perf

119905lowast

119894

) +120589

119901 sdot 119905lowast

119894

)]

(2)

where 119905perf119894 is the actual performed duration of the activity 119894120573perf is themarginal utility of an activity at its typical duration119905lowast

119894is the ldquotypicalrdquo duration of an activity 119894 120589 is a scaling

constant and 119901 is a priority indicator

4 Mathematical Problems in Engineering

(iii) The Utility for Arriving Late to Activity Consider

119880late119894 = 120573late sdot 119905late119894 (3)

where 120573late le 0 is the marginal utility for being late 119905late119894 isthe number of hours being late to activity 119894

(iv) The Utility for Travelling to Activity Consider

119880travel119894 = 120573travel sdot 119905taverl119894 (4)

where 120573travel le 0 is the marginal utility for travelling 119905travel119894 isthe number of hours for travelling to activity 119894

More detailed information about the scoring function canbe found in the references of Balmer 2007 [1] and Charyparand Nagel 2005 [34]

34 Replanning The replanning module is established tosearch for a solution space for every agent and it mainlyincludes two submodules Reroute module and Time Allo-cationMutator module Reroute module allows agents adjusttheir route from origin to destination TimeAllocationMuta-tor module enables agents to modify their own departuretimes and activity durations or change activity locations andactivity sequence More details about the modules above areas follows [1]

341 Reroute Module The goal of the Reroute module isto help agents find their shortest path in the network Theldquoshortnessrdquo is measured by travel time rather than traveldistance The most famous and most frequently used routingalgorithm isDijkstra InMATSim a time-dependentDijkstrais applied This algorithm can make the link travel timedependent by aggregating it into 15min time bins Linktravel time is calculated based on the previous traffic flowsimulation and used as the weight of the links in the networkgraph With the weights plus the origin and destination ofthe activities the fastest path can be calculated which willbe executed in the next mobility simulation

342 Time AllocationMutator Time AllocationMutator is avery simple randommutationmodule but it is very useful foragentsrsquo replanning Being similar to Reroute module simplemodules togetherwith a large number of iterationswill obtainuseful results for simulation of travel behavior

Time Allocation Mutator mainly modifies the activitiesrsquoduration time and end time (but for the first and last activityend time is the only attribute modified) The detailed mod-ification process is as follows firstly read every agentrsquos plansecondly pick a random time from the uniform distribution[minus30min +30min] thirdly add the random time to theactivitiesrsquo duration time and end time finally write back theplan with time attribute modified But pay attention to therandom time as (1) any negative duration will be reset tozero (2) any first activity end time before 0000AM and lastactivity end time after 2400 PMwill be reset to 0000AMand2400 PM respectively

35 Controller (Agent Database) Controller makes the mod-ule of execution scoring and replanning run successivelyand the controlled content is as follows [1]

(i) Number of Plans The number of the plans per agent willbe limited to 119873 (119873 ge 2 usually 119873 is 3ndash6) If an agent has119873+1 plan (the additional plan is generated in the replanningprocess) the119873 + 1 Plan will be stored in the agentrsquos memoryuntil the new plan scores After scoring the controller willdelete the lowest-score plan

(ii) Select Agents Performing Reroute (119903) The controllerselects 119903 of agents to carry out the module of Reroute (seeSection 341) The plans in the memory will be selected withequal probability

(iii) Select Agents Performing Time Allocation Mutator (119904)The controller selects 119904 of agents to carry out the moduleof Time Allocation Mutator (see Section 341) howeverafter that those agents will also carry out the module ofReroute The plans in the memory will be selected with equalprobabilityThus 119904 of agents will carry out Time AllocationMutator and (119904 + 119903) of agents will carry out Reroute

(iv) Select Random Plan (119898) In order to re-evaluate theexisting plans from time to time the controller selects119898 ofagents and those agents will randomly choose a plan amongall plans in their memory

(v) Select Plans Based on the Scores (119901 = 1 minus 119903 minus 119904 minus

119898) The controller finally selects the remained plans withthe following probability

119901 prop 119890120573sdot119878119895 (5)

where 119878119895is the score of the plan 119895 120573 is an empirical constant

Note If the controller selects an existing plan its new scorecan be calculated with

119878 = (1 minus 120572) sdot 119878old + 120572 sdot 119878new (6)

where 120572 is the blending factor this will avoid agent selectingplans based on not only last iteration but also the historyscores

The controller will make the loop run until the simulationsystem reach a relaxed state

4 Input Data and Scenario

The structure ofMATSimmay not be complex but preparingthe input data and constructing a simulation scenario aremuch more sophisticated In practice there is a large varietyof input data which can differ in quality spatial resolutionpurpose and so forth So it will generally take months evenyears to prepare the correct data for simulation In order torun a simulation the lowest requirement includes an initialplan a road network and a simulation configuration Thedetailed process of preparing the above data will be presentedas follows

Mathematical Problems in Engineering 5

ltperson id=ldquo682rdquo age=ldquo30rdquo employed=ldquoyesrdquogtltplan selected=ldquoyesrdquogtltact type=ldquoh9rdquo facility=ldquo1593rdquo x=ldquo36540169341762rdquo y=ldquo430066448060939rdquo end time=ldquo093927rdquo gtltleg mode=ldquocarrdquo dep time=ldquo093927rdquogtltleggtltact type=ldquow3rdquo facility=ldquo313rdquo x=ldquo36584321376734rdquo y=ldquo43060320981801rdquo end time=ldquo135224rdquo gtltleg mode=ldquocarrdquo dep time=ldquo135224rdquogtltleggtltact type=ldquoh1rdquo facility=ldquo1593rdquo x=ldquo36540169341762rdquo y=ldquo430066448060939rdquo end time=ldquo152130rdquo gtltleg mode=ldquocarrdquo dep time=ldquo152130rdquogtltleggtltact type=ldquow3rdquo facility=ldquo313rdquo x=ldquo36584321376734rdquo y=ldquo43060320981801rdquo end time=ldquo174127rdquo gtltleg mode=ldquocarrdquo dep time=ldquo174127rdquogtltleggtltact type=ldquoh9rdquo facility=ldquo1593rdquo x=ldquo36540169341762rdquo y=ldquo430066448060939rdquo gt

ltplangtltpersongt

Algorithm 1 An example of a typical initial plan

41 Scenario Description

411 A Brief Introduction of Baoding This paper will takeBaoding as an example to simulate a medium-sized cityin China Baoding which is located in Hebei Provinceis made up of one main urban area and four counties(Mancheng County Xushi County Anxin County andQingyuan County) This paper will only simulate the travelbehavior of inhabitants in the main urban area The mainurban area of Baoding has a population of 106 million

412 Activity Chains and Their Distribution In this paperonly the resident driving private car is simulated Based onthe census 2007 of Baoding the activity is classified into fivetypes home work shop education and leisure The analysisresults show that home-work-home and home-work-home-work-home are the most common patterns and the averagelength of the activity chains is close to 3

413 Network Preparation The simulation network of Baod-ing is prepared through OpenMapStreet and it includes 502nodes and 1474 links The link attributes contain lengthcapacity free speed lanes modes and so forth The roadnetwork is showed by Figure 2

42 Initial Demand Preparation The modeling of the initialdemand can be split up into several steps depending on theavailable raw data and the plannerrsquos needs But an initial planshould at least include the following information

(i) Activity locationwhich is given as a set of coordinates(ii) Assigned departure times and arrival times for every

activity(iii) A travel leg among two activities in this paper the

mode is set as car

Algorithm 1 shows a typical initial plan It includesattributes of the person and his initial plan The attributes

Figure 2 Road network of Baoding

are made up of ID age and employment statues The initialplan is made up of 5 activities and they are home workhome work and home in sequence which are set as variableof act type Take the first activity for example the activitylocation is in the facility with ID of 1593 and its coordinate isrepresented by variables of 119909 and119910 and besides the end timeof the activity is represented by variable of end time The legmode and dep time are used to describe themode the personchooses and time the people leaving the facility

Different available data need different processes to pre-pare an initial data Figure 3 shows a detailed preparingprocess based on the available data of BaodingThe process ismainly made up of three parts

Part 1 List All the Available Data for Simulation Part 1 onlycontains one step namely step 1 To check all the available

6 Mathematical Problems in Engineering

Step 1 list available data for simulation

Step 2 generateMATSim population

Step 4 generate facility location

Step 3 generate true plan

MATSimPoptxt Facilityxml

Census Map

TPlanxml

Step 5 generate initial plan

Part 1

Part 2

Part 3

IPlanstxt

Step 1-5 copy information from

TPlanxml to MASTimPopptxt

Step 2-5 assign each activity to a

facility

Step 3-5 generate start

and end time of each activity

Figure 3 The process of preparing the initial data

data and make better use of them is a vital step in thesimulation Take Baoding for example the available dataare the census 2007 of Baoding and the map of Baoding in2007 The census sample includes 2267 personsrsquo daily planbut the number of persons whose travel mode is car is 93which is extremely small Each daily plan includes trip origintrip destination starting time ending time activity type andtravelling leg But unfortunately the data of trip origin anddestination are in traffic zone level which cannot be directlyapplied to agent-based simulation and should be adjustedThe map of Baoding in 2007 comprises the available facilitiesfor performing activities such as shopping leisure andwork

Part 2 Prepare Data for Generating Initial Plan Part 2 is madeup of step 2 step 3 and step 4

In step 2 since the survey sample is really small theMATSim population is synthesized on the basis of censusMTSim population includes a few persons (agents) whoseinformation only includes age home location and worklocation and all the above information is stored in MATSim-Poptxt which will be used for generating initial plan

In step 3 generate a true plan file (TPlanxml) whichcontains a handful of plans whose travel mode was car basedon the census 2007 of Baoding The following information isincluded person ID trip ID origin coordinates destinationcoordinates activity duration and activity type Note thatthe trip origin and destination are in traffic zone level so arandom assigning method was used for selecting a locationfor performing activities

In step 4 prepare the available facilities for perform-ing activities that is getting the exact location type and

attributes of facilities All the information was saved inFactilitiesxml There were five facility types correspondingto five activity types The numbers of facilities for shop-ping education leisure work and home are 256 51 478912 and 1321 respectively In addition before the facilitieslocation is determined the coordination transform shouldbe discussed WGS84-coordinates are widely used like GPSdata OpenStreetMap data and Google earth data For thedistance calculation inWGS84-coordinates (or any sphericalcoordinates) is rather complex in MATSim the coordinatesshould be converted into another coordinate reference system(CRS) This paper chooses the UTM (Universal TransverseMercartor Grid System) as the coordinate used in MATSimAccording to the UTM global zoning Baoding is located inthe zone 50N and its EPSG code is 32650

Part 3 Generating Initial Plan After preparing the requireddata (MATSimPoptxt TPlanxml and Factilitiesxml) in Part2 generating initial plan would be conducted

Step 5-1 copy all the information from a true plan whichis stored in TPlanxml to the plan of each agent who madeup the MATSim population except for the location of eachactivity

Step 5-2 randomly assign each activity to a facility basedonnearby searchingmethod thus the location of each activitycan be generatedThe detailed searchingmethod is describedwith an example as follows Assume that an agent ends itsprevious activity and goes shopping next the controller ofthe MATSim will define a circle around the previous activitylocation with a certain radius (the radius is represented as 119877)and the agent will randomly choose a facility for shopping In

Mathematical Problems in Engineering 7

Previous activity locationNearby facilities for shopping

R

Figure 4 Schematic diagram of randomly assigning each activity toa facility

real life inhabitants will tend to choose a nearer school foreducation choose a nearer shopmarket for shopping andso on So the concept of the searching method seems to berealistic The 119877 was set to 3 km according to Baodingrsquos sizepopulation and so on The schematic diagram is showed inFigure 4

Step 5-3 generate the start and end time of each activityon the basis of activity duration For example the end time ofthe previous activity is 119875endtime and the duration of the nextperformed activity is 119879duration then the Gaussian function isused to generate the next activityrsquos end time and the equationis as follows

119879endtime = 119875endtime + 119879duration + Gaussian sdot 3600 (7)

where 119879endtime is the end time of the next activity Gaussianrepresents the rand number generated based on Gaussiandistribution whose mean is 0 and the standard deviation is1

When all the above steps are completed the initial plan isfinally created

43 Count Data Inputting count data toMATSim is a typicalway to check whether the simulation of travel behavior isrealistic In this paper six count stationsrsquo data will be usedThe count data is obtained by an artificial methodThe surveytime is at May 10 2007 from 700 AM to 900 AM

44 Simulation Configuration In this paper two differentsimulation scenarios will be built up

(i) Scenario 1 10 of all agents carry out Reroute(ii) Scenario 2 10 of all agents will carry out Time

Allocation Mutator but these agents will also carryout Reroute after time changes

0102030405060708090

100

00000 50000 100000 150000 200000

The n

umbe

r of c

ars

Time of day

RerouteTime Allocation Mutator

Figure 5 Comparison of the number of departures of cars betweentwo scenarios

Other simulation configurations of the above three sce-narios are the same

(i) The number of the plans stored in each agentrsquosmemory is limited to 5

(ii) 10 of all agents will randomly select an existing plan(iii) The remaining 70 of all agents will select an existing

plan based on the plan scores(iv) The number of iterations will be set to 50(v) The ldquoQSimrdquo module will be used for mobility simula-

tion

5 Results and Discussion

Simulation results of the two different scenarios will bediscussed in the following aspects

(i) Comparison of the Number of Departures and Arrivals ofCars between Two Scenarios Figures 5 and 6 show the numberof departures and arrivals of cars between the two scenariosrespectively Both figures have the same trend which hastwo peaks The two peaks occur around 800 and 1800respectively In addition in terms of Figure 4 the first peak ofScenario 2 (Time Allocation Mutator) is lower than Scenario1 (Reroute) and the number of cars of Scenario 2 is higherthan Scenario 1 from 500AM to 800AM which indicatesthat some agents advance their departure time to avoid hightraffic volume during the peak time Figure 5 has the sametrend as Figure 4 due to the same reason

(ii) Comparison of the Evolution of the Average Best Score andAverage Executed Score for the Two Scenarios Figures 7 and8 demonstrate the average executed score and average bestscore of two scenarios respectively and they also have thesame trend The score of Scenario 1 which only carries outReroute keeps invariant from iteration 0 and iteration 50 inboth figures while the score of Scenario 2 which carries outTime Allocation Mutator has an increasing trend in both

8 Mathematical Problems in Engineering

Table 1 Bias and error of two scenarios

Time period Biaserror Scenario 1 (Reroute) Scenario 2 (Time Allocation Mutator)

700-800AM

Mean absolute bias minus24 minus147Mean absolute error 158 204Mean relative bias minus075 minus2404Mean relative error 3209 3791

800-900AM

Mean absolute bias minus45 minus222Mean absolute error 252 281Mean relative bias 641 minus2557Mean relative error 4400 4129

700ndash900AM

Mean absolute bias minus35 minus185Mean absolute error 205 243Mean relative bias 283 minus2480Mean relative error 3805 3960

0

20

40

60

80

100

120

00000 50000 100000 150000 200000Time of day

RerouteTime Allocation Mutator

The n

umbe

r of c

ars

Figure 6 Comparison of the number of arrivals of cars between twoscenarios

135

140

145

150

155

160

0 5 10 15 20 25 30 35 40 45 50

Scor

e

Iteration

RerouteTime Allocation Mutator

Figure 7 Comparison of the evolution of the average executed scorefor the two scenarios

figures According to the trendmentioned above we can con-clude that Reroute does not improve the agentsrsquo performancewhile Time Allocation Mutator has a significantly beneficialinfluence on the performance of agentsThe reasonwhy score

130

135

140

145

150

155

160

165

0 5 10 15 20 25 30 35 40 45 50

Scor

e

Iteration

RerouteTime Allocation Mutator

Figure 8 Comparison of the evolution of the average best score forthe two scenarios

of Scenario 1 remains the same is that agents cannot improvetheir performance through changing their routes

(iii) Comparison of the Simulated Data and the Count Dataof the Two Scenarios The comparison between the simulateddata and count data of the two scenarios is presented inFigure 9 Figures 9(a) 9(b) 9(c) and 9(d) demonstrate thecomparison in Scenario 1 at 7-8AM in Scenario 2 at 700-800AM in Scenario 1 at 800-900AM and in Scenario2 at 800-900AM respectively The bias and error of thesimulation results are summarized in Table 1 The meanabsolute bias mean absolute error mean relative bias andmean relative error are jointly used to check the simulationresults The equations to calculate the above indicators are asfollows

(i) mean absolute bias

119864 =1

119899sum(119902simulated minus 119902counted) (8)

Mathematical Problems in Engineering 9

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

Simulated data

7-8 AM

Y = X

Y = 2X

Y = 2X

(a) Simulated data versus count data at 700-800AM (Simulation withReroute only)

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

Simulated data

7-8 AM

Y = X

Y = 2X

Y = 2X

(b) Simulated data versus count data at 700-800AM (Simulation with TimeAllocation Mutator)

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

8-9 AM

Y = X

Y = 2X

Y = 2X

Simulated data

(c) Simulated data versus count data at 800-900AM (Simulation withReroute only)

10

100

1000

10000

Cou

nt d

ata

10 100 1000 10000Simulated data

8-9 AM

Y = X

Y = 2X

Y = 2X

(d) Simulated data versus count data at 800-900AM (Simulation with TimeAllocation Mutator)

Figure 9 Comparison between simulated data and count data

(ii) mean absolute error

|119864| =1

119899sum(

1003816100381610038161003816119902simulated minus 119902counted1003816100381610038161003816)

(9)

(iii) mean relative bias

119890 =1

119899sum(

119902simulated minus 119902counted119902counted

) (10)

(iv) mean relative error

|119890| =1

119899sum(

10038161003816100381610038161003816100381610038161003816

119902simulated minus 119902counted119902counted

10038161003816100381610038161003816100381610038161003816

) (11)

In terms of mean relative error which is commonly usedfor validating the accuracy of simulation the accuracy ofScenario 1 (3805) is close to Scenario 2 (3960) at 700ndash900AM In addition from 700AM to 800AM the mean

10 Mathematical Problems in Engineering

relative error of Scenario 1 (3209) is lower than Scenario 2(3791) while the mean relative error of Scenario 1 (44) ishigher than Scenario 2 (4129) from 800AM to 900AMthus Time Allocation Mutator does not perform better thanReroute in terms of simulation accuracy

6 Conclusions

This paper implements the agent-based simulation of travelbehavior in a medium-sized city in China and the mainachievements of this paper are as follows

(i) A detailed simulation structure which includes avariety of modules is introduced

(ii) Successfully realizing the simulation of travel behav-ior under a condition of limited survey data besidesa framework of preparing the input data is presented

(iii) Simulating the travel behavior of residents in amedium-sized city in China by MATSim was seldomdone in previous studies

However the above achievement is only a basic simula-tion work In the near future the related work below will becarried out

(i) This paper only simulates the travel behavior ofresident whose travel mode is car so other modes willbe added to the simulation scenario to check whetheragent-based simulation results are still realistic

(ii) A large-scale agent-based simulation will be carriedout in a Chinese metropolis such as Beijing Shang-hai on Guangzhou

(iii) Optimize the modules in MATSim to improve itssimulation precision and computing time

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This research was supported by the National Basic ResearchProgram of China (no 2012CB725403) the National Natu-ral Science Foundation of China (nos 51338008 7121000151178032) and the Fundamental Research Funds for theCentral Universities (no 2012YJS069)

References

[1] M Balmer Travel demand modeling for multi-agent trafficsimulations algorithms and systems [MS thesis] ETH ZurichZurich Switzerland 2007

[2] B Raney N Cetin A Vollmy et al ldquoAn agent-basedmicrosim-ulationmodel of Swiss travel first resultsrdquoNetworks and SpatialEconomics vol 3 no 1 pp 23ndash41 2003

[3] B Yu and Z Z Yang ldquoAn ant colony optimization model theperiod vehicle routing problem with time windowsrdquo Trans-portation Research E vol 47 no 2 pp 166ndash181 2011

[4] B Yu Z Yang K Chen andB Yu ldquoHybridmodel for predictionof bus arrival times at next stationrdquo Journal of AdvancedTransportation vol 44 no 3 pp 193ndash204 2010

[5] Y Bin Y Zhongzhen and Y Baozhen ldquoBus arrival timeprediction using support vector machinesrdquo Journal of IntelligentTransportation Systems vol 10 no 4 pp 151ndash158 2006

[6] B Yao P Hu M Zhang et al ldquoArtificial bee colony algorithmwith scanning strategy for periodic vehicle routing problemrdquoSimulation vol 89 no 6 pp 762ndash770 2013

[7] M Florian M Mahut and N Tremblay ldquoApplication of asimulation-based dynamic traffic assignment modelrdquo EuropeanJournal of Operational Research vol 189 no 3 pp 1381ndash13922008

[8] G Bellei GGentile andN Papola ldquoAwithin-day dynamic traf-fic assignment model for urban road networksrdquo TransportationResearch B vol 39 no 1 pp 1ndash29 2005

[9] J C Munoz and J A Laval ldquoSystem optimum dynamic trafficassignment graphical solution method for a congested freewayand one destinationrdquo Transportation Research B vol 40 no 1pp 1ndash15 2006

[10] W Y Szeto Y Jiang and A Sumalee ldquoA cell-based modelfor multi-class doubly stochastic dynamic traffic assignmentrdquoComputer-Aided Civil and Infrastructure Engineering vol 26no 8 pp 595ndash611 2011

[11] I Juran J N Prashker S Bekhor and I Ishai ldquoA dynamic trafficassignment model for the assessment of moving bottlenecksrdquoTransportation Research C vol 17 no 3 pp 240ndash258 2009

[12] C Antoniou M Ben-Akiva and H N Koutsopoulos ldquoNon-linear Kalman filtering algorithms for on-line calibration ofdynamic traffic assignment modelsrdquo IEEE Transactions onIntelligent Transportation Systems vol 8 no 4 pp 661ndash6702007

[13] G Gentile L Meschini and N Papola ldquoSpillback congestionin dynamic traffic assignment a macroscopic flow model withtime-varying bottlenecksrdquo Transportation Research B vol 41no 10 pp 1114ndash1138 2007

[14] B Yao C Yang J Hu J Yao and J Sun ldquoAn improved antcolony optimization for flexible job shop scheduling problemsrdquoAdvanced Science Letters vol 4 no 6-7 pp 2127ndash2131 2011

[15] B Yu Z Yang and S Li ldquoReal-time partway deadheadingstrategy based on transit service reliability assessmentrdquo Trans-portation Research A vol 46 no 8 pp 1265ndash1279 2012

[16] W Davidson R Donnelly P Vovsha et al ldquoSynthesis of firstpractices and operational research approaches in activity-basedtravel demandmodelingrdquoTransportationResearchA vol 41 no5 pp 464ndash488 2007

[17] M Hatzopoulou and E J Miller ldquoLinking an activity-basedtravel demand model with traffic emission and dispersionmodels transportrsquos contribution to air pollution in TorontordquoTransportation Research D vol 15 no 6 pp 315ndash325 2010

[18] X Dong M E Ben-Akiva J L Bowman and J L WalkerldquoMoving from trip-based to activity-based measures of acces-sibilityrdquo Transportation Research A vol 40 no 2 pp 163ndash1802006

[19] W Recker J Duan and H Wang ldquoDevelopment of an esti-mation procedure for an activity-based travel demand modelrdquoComputer-Aided Civil and Infrastructure Engineering vol 23no 7 pp 483ndash501 2008

[20] J E Kang and W W Recker ldquoAn activity-based assessmentof the potential impacts of plug-in hybrid electric vehicles onenergy and emissions using 1-day travel datardquo TransportationResearch D vol 14 no 8 pp 541ndash556 2009

Mathematical Problems in Engineering 11

[21] R M Pendyala R Kitamura A Kikuchi T Yamamoto andS Fujii ldquoFlorida activity mobility simulator overview andpreliminary validation resultsrdquo Transportation Research Recordno 1921 pp 123ndash130 2005

[22] S Yagi and A K Mohammadian ldquoAn activity-based microsim-ulation model of travel demand in the Jakarta Metropolitanareardquo Journal of Choice Modelling vol 3 no 1 pp 32ndash57 2010

[23] B YuWHK Lam andM L Tam ldquoBus arrival time predictionat bus stopwithmultiple routesrdquoTransportation Research C vol19 no 6 pp 1157ndash1170 2011

[24] B Yu Z Yang and B Yao ldquoAn improved ant colony opti-mization for vehicle routing problemrdquo European Journal ofOperational Research vol 196 no 1 pp 171ndash176 2009

[25] M Rieser K Nagel U Beuck M Balmer and J RumenappldquoAgent-oriented coupling of activity-based demand generationwith multiagent traffic simulationrdquo Transportation ResearchRecord vol 2021 no 1 pp 10ndash17 2007

[26] M Balmer KMeisterM Rieser K Nagel andKWAxhausenldquoAgent-based simulation of travel demand structure and com-putational performance of MATSim-Trdquo in Proceedings of the2nd TRB Conference on Innovations in Travel Modeling IVTInstitut fur Verkehrsplanung und Transportsysteme PortlandOre USA June 2008

[27] M Balmer M Rieser K Meister et al ldquoMatsim-T architectureand simulation timesrdquo in Multi-Agent Systems for Traffic andTransportation Engineering pp 57ndash78 2009

[28] A Horni D M Scott M Balmer and K W Axhausen ldquoLoca-tion choice modeling for shopping and leisure activities withMATSim combining microsimulation and time geographyrdquoTransportation Research Record no 2135 pp 87ndash95 2009

[29] D Grether Y Chen M Rieser et al ldquoEffects of a simple modechoicemodel in a large-scale agent-based transport simulationrdquoin Complexity and Spatial Networks pp 167ndash186 SpringerBerlin Germany 2009

[30] W Gao M Balmer and E J Miller ldquoComparison of MATSimand EMME2 on greater toronto and hamilton area networkCanadardquo Transportation Research Record no 2197 pp 118ndash1282010

[31] T W Nicolai L Wang K Nagel et al ldquoCoupling an urbansimulation model with a travel model-a first sensitivity testrdquoin Proceedings of the Computers in Urban Planning and UrbanManagement (CUPUM rsquo11) pp 11ndash07 Also VSP WP LakeLouise Canada 2011

[32] R A Waraich and K W Axhausen ldquoAgent-based parkingchoice modelrdquo Transportation Research Record vol 2319 no 1pp 39ndash46 2012

[33] J W Joubert P J Fourie and K W Axhausen ldquoLarge-scaleagent-based combined traffic simulation of private cars andcommercial vehiclesrdquo Transportation Research Record no 2168pp 24ndash32 2010

[34] D Charypar and K Nagel ldquoGenerating complete all-day activ-ity plans with genetic algorithmsrdquo Transportation vol 32 no 4pp 369ndash397 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 2: Research Article An Initial Implementation of Multiagent ...downloads.hindawi.com/journals/mpe/2014/980623.pdf · Research Article An Initial Implementation of Multiagent Simulation

2 Mathematical Problems in Engineering

(i) ABMrsquos Individual Each agent will make independentdecisions and store its decisions in a ldquoplanrdquo which mainlyincludes its activity time and location

(ii) DTArsquos Dynamic After creating agentsrsquo initial plan adynamic iteration of agentsrsquo route choice and time distri-bution will be carried out which allows tracking personsdynamically in time the goal of iteration is to find a dynamicbalance which is similar to Nash Equilibrium

The agent-based microsimulation modeling techniquefor transportation planning is rapidly developed and isfrequently applied to practice in recent years This paper willuse theMATSimas themultiagent simulation tool to simulatethe travellersrsquo behaviorMATSimwhichwas developed by TUBerlin ETH Zurich and CNRS Lyon provides a toolbox toimplement large-scale agent-based transport simulations [2]A more detailed introduction can be found in Section 3

This paper will start with the literature review concerningthe latest advancement of traffic assignment such as DTAABM and MATSim (Section 2) Then it will present theoutline of the general simulation structure (Section 3) anda detailed description of the modules in MATSim Next wewill take Baoding one of the medium-sized cities in Chinaas an example and the way to prepare the input data and toestablish the scenarios is introduced (Section 4) Then thesimulated results are compared with count data to validatethe proposed simulation method (Section 5) Finally it endsup with a conclusion (Section 6)

2 Literature Review

Traffic assignment plays an important role in the study oftransportation problems [3ndash6] The literature review belowwill focus on the latest advancement of traffic assignmentwhich will include DTA ABM and MATSim

DTA is commonly used to search the best route forusers in a scenario where no users can get better off byselecting another route and the scenario is called NashEquilibrium statement A host of research regarding DTA hasbeen conducted Florian et al described a simulation-basediterative dynamic equilibrium traffic assignment model [7]Bellei et al presented a new formulation of within-day DTAwhere dynamic user equilibrium is expressed as a fixed-point problem in terms of arc flow temporal profiles [8]Munoz and Laval studied the system optimum DTA in anetwork consisting of a hypothetical surface street grid anda congested freeway section [9] Szeto et al proposed a cell-based multiclass DTA problem that considers the randomevolution of traffic states [10] Juran et al developed a DTAmodel that can evaluate the effects of moving bottleneckson network performance in terms of both travel times andtraveling paths [11] Antoniou et al presented an onlinecalibration approach that jointly estimates demand andsupply parameters of DTA systems and it was empiricallyvalidated through an extensive application [12] Gentileet al proposed a new model for the within-day DTA onroad networks where the simulation of queue spillovers isexplicitly addressed and a user equilibrium is expressed as

a fixed-point problem in terms of arc flow temporal profiles[13]

ABM is modeled on an individual level and successfullyimplemented by many models and it was employed toaddress variety of transportation problems [14 15] Davidsonet al summarized the recent successful experience in thedevelopment and application of ABM for metropolitan plan-ning organizations in the US [16] Hatzopoulou and Millerextended the capability of an ABM for the Greater TorontoArea to model and map traffic emissions and atmosphericdispersion [17] Dong et al employed the activity-basedtheory tomodel a newmeasure of accessibility called activity-based accessibility [18] Recker et al presented an estimationprocedure for an ABM to estimate the relative importanceof factors related to spatial and temporal interrelationshipsamong the out-of-home activities that motivate a householdrsquosneed or desire to travel [19] Kang and Recker applied anABM to evaluate the potential impacts of plug-in hybridelectric vehicles on energy and emissions [20] Pendyala etal developed a comprehensive multimodal activity-basedsystem to predict the travel demand in Florida and theoutcome of research was Florida Activity Mobility Simulator(FAMOS) [21] Yagi and Mohammadian developed a com-prehensive activity-based modeling system in the context ofdeveloping countries providing accurate estimates which areexpected to serve as better inputs for evaluation of differenttransportation policy scenarios [22]

There is a wide application of DTA and ABM which canbe proved by the review above but combining both theories isseldom implemented [23 24] MATSim which incorporatesboth DTA and ABM is an efficient tool to implement a large-scale agent-based simulation for travel behavior and trafficflow and their interactions So far research on MATSim hasbeen conducted widely by many scholars and the scope ofthe research mainly focuses on three aspects (1) Basic theoryfor designing and implementing MATSim At the begin-ning the emphasis was placed on establishing frameworkof MATSim and incorporating basic models to make it run[25ndash27] (2) Optimization of MATSim At the second stagethe modes of MATSim such as location choice [28] andmode choice [29] were enhanced and some of them werereplaced with advanced ones (3) Application of MATSimMATSim is applied into varieties of aspects like travelbehavior [30 31] parking behavior [32] and freight transport[33]

In conclusion MATSim has been developed for manyyears and attracted a variety of researchers to apply it oroptimize it but there is still some reaming interesting workIn this paper an external work to enrich the MATSimapplicationwill be carried out and it differs fromother studiesin the following aspects

(i) MATSim will be used to simulate one of the medium-sized cities in China A Chinese medium-sized city willbe quite different from cities in foreign counties in urbandevelopment activity type travel behavior and so on Inaddition a large-scale simulation of travel behavior wasseldom implemented in a real city many of the studies usednumerical examples to validate simulation models of travelbehavior

Mathematical Problems in Engineering 3

Execution

(Mobsim)

ScoringReplanning

Controller

Initial individual daily demand

Networkxml

Input Output

Evolutionary algorithm

Optimization statistics and analysis

Execution

(Mobsim)

ScoringReplanning

Controller

Initial individual daily demand

Networkxml

Input Output

Evolutionary algorithm

Optimization statistics and analysis

Intermediate relaxed demand

Figure 1 Schematic overview of MATSimrsquos simulation structure

(ii) Since different cities have different available trafficsurvey data they differ in quality spatial resolution purposeand so forth An approach of how to prepare the input datawith limited available information and low spatial resolutionis studied in this paper

3 Simulation Structure

31 A Brief Introduction of the Simulation Structure Basedon MATSim the simulation structure of travel behavioris designed and shown in Figure 1 It mainly includesthree parts input evolutionary algorithm (EA) and OutputFirstly the input data (including initial demand and network)will be fed into the mobility simulation (see Section 32)and all agentsrsquo plans will be executed simultaneously andthen the execution results (simulated data) will tell the othermodules what happened during the simulated day secondlyevery executed plan will be scored based on the simulateddata on the basis of the scoring function (see Section 33)thirdly according to the scoring the replanning (includingReroute and Time Allocation Mutator see Section 34) iscarried out to provide the feedback which allows for theevolution of plans Finally after reaching the customizedtimes of iteration the simulation results such as optimizationstatistics and analysis intermediate plan and relaxed planwill be put out

For EA is the core part of the simulation it will be firstdiscussed in detail in the following sections

32 Execution (Mobsim) Themobility simulation (Mobsim)refers to the simulation of the physical transportation systemIt creates events for every agentrsquos action in the simulationlike enteringleaving road and departingarriving at activityplacesThen the events will be used for the scoringmodule Inthe history ofMATSim several MobSims such as QueueSim-ulation QSimDEQSim and JDEQSimhave been developedSomeof themare still in use others are obsolete andno longersupported today This paper will choose Qsim which is themost commonly used Mobsim Qsim is an external queuesimulation in which every link is regarded as a first-in first-out (FIFO) queue with three restrictions [1]

(i) Every agent has to stay on the simulated link for acertain time

(ii) Link storage capacity is imported to limit the numberof agents on the simulated link

(iii) Flow capacity is imported to limit the number ofagents that can leave the simulated link in a givenperiod of time

Even though the queue simulation is indeed simple thesimulated output data is enough for transportation planning

33 Scoring In order to compare different plans a scoringfunction is proposed to evaluate each planrsquos performance InMATSim the utility-based approach is used The detailedfunction is as follows [1]

(i) The Total Score of a Plan It is calculated based on thefollowing equation

119880total =119899

sum

119894=1

119880perf119894 +119899

sum

119894=1

119880late119894 +119899

sum

119894=1

119880travel119894 (1)

where119880total is a total score of a given plan 119899 is the number ofactivities119880perf119894 is the utility for performing activity 119894119880late119894 isthe utility for arriving late to activity 119894 and119880travel119894 is the utilityfor travelling to activity 119894

(ii) The Utility for Performing Activity A logarithmic form isused for the utility as follows

119880perf119894 (119905perf119894) = max[0 120573perf sdot 119905lowast

119894(ln(

120573perf

119905lowast

119894

) +120589

119901 sdot 119905lowast

119894

)]

(2)

where 119905perf119894 is the actual performed duration of the activity 119894120573perf is themarginal utility of an activity at its typical duration119905lowast

119894is the ldquotypicalrdquo duration of an activity 119894 120589 is a scaling

constant and 119901 is a priority indicator

4 Mathematical Problems in Engineering

(iii) The Utility for Arriving Late to Activity Consider

119880late119894 = 120573late sdot 119905late119894 (3)

where 120573late le 0 is the marginal utility for being late 119905late119894 isthe number of hours being late to activity 119894

(iv) The Utility for Travelling to Activity Consider

119880travel119894 = 120573travel sdot 119905taverl119894 (4)

where 120573travel le 0 is the marginal utility for travelling 119905travel119894 isthe number of hours for travelling to activity 119894

More detailed information about the scoring function canbe found in the references of Balmer 2007 [1] and Charyparand Nagel 2005 [34]

34 Replanning The replanning module is established tosearch for a solution space for every agent and it mainlyincludes two submodules Reroute module and Time Allo-cationMutator module Reroute module allows agents adjusttheir route from origin to destination TimeAllocationMuta-tor module enables agents to modify their own departuretimes and activity durations or change activity locations andactivity sequence More details about the modules above areas follows [1]

341 Reroute Module The goal of the Reroute module isto help agents find their shortest path in the network Theldquoshortnessrdquo is measured by travel time rather than traveldistance The most famous and most frequently used routingalgorithm isDijkstra InMATSim a time-dependentDijkstrais applied This algorithm can make the link travel timedependent by aggregating it into 15min time bins Linktravel time is calculated based on the previous traffic flowsimulation and used as the weight of the links in the networkgraph With the weights plus the origin and destination ofthe activities the fastest path can be calculated which willbe executed in the next mobility simulation

342 Time AllocationMutator Time AllocationMutator is avery simple randommutationmodule but it is very useful foragentsrsquo replanning Being similar to Reroute module simplemodules togetherwith a large number of iterationswill obtainuseful results for simulation of travel behavior

Time Allocation Mutator mainly modifies the activitiesrsquoduration time and end time (but for the first and last activityend time is the only attribute modified) The detailed mod-ification process is as follows firstly read every agentrsquos plansecondly pick a random time from the uniform distribution[minus30min +30min] thirdly add the random time to theactivitiesrsquo duration time and end time finally write back theplan with time attribute modified But pay attention to therandom time as (1) any negative duration will be reset tozero (2) any first activity end time before 0000AM and lastactivity end time after 2400 PMwill be reset to 0000AMand2400 PM respectively

35 Controller (Agent Database) Controller makes the mod-ule of execution scoring and replanning run successivelyand the controlled content is as follows [1]

(i) Number of Plans The number of the plans per agent willbe limited to 119873 (119873 ge 2 usually 119873 is 3ndash6) If an agent has119873+1 plan (the additional plan is generated in the replanningprocess) the119873 + 1 Plan will be stored in the agentrsquos memoryuntil the new plan scores After scoring the controller willdelete the lowest-score plan

(ii) Select Agents Performing Reroute (119903) The controllerselects 119903 of agents to carry out the module of Reroute (seeSection 341) The plans in the memory will be selected withequal probability

(iii) Select Agents Performing Time Allocation Mutator (119904)The controller selects 119904 of agents to carry out the moduleof Time Allocation Mutator (see Section 341) howeverafter that those agents will also carry out the module ofReroute The plans in the memory will be selected with equalprobabilityThus 119904 of agents will carry out Time AllocationMutator and (119904 + 119903) of agents will carry out Reroute

(iv) Select Random Plan (119898) In order to re-evaluate theexisting plans from time to time the controller selects119898 ofagents and those agents will randomly choose a plan amongall plans in their memory

(v) Select Plans Based on the Scores (119901 = 1 minus 119903 minus 119904 minus

119898) The controller finally selects the remained plans withthe following probability

119901 prop 119890120573sdot119878119895 (5)

where 119878119895is the score of the plan 119895 120573 is an empirical constant

Note If the controller selects an existing plan its new scorecan be calculated with

119878 = (1 minus 120572) sdot 119878old + 120572 sdot 119878new (6)

where 120572 is the blending factor this will avoid agent selectingplans based on not only last iteration but also the historyscores

The controller will make the loop run until the simulationsystem reach a relaxed state

4 Input Data and Scenario

The structure ofMATSimmay not be complex but preparingthe input data and constructing a simulation scenario aremuch more sophisticated In practice there is a large varietyof input data which can differ in quality spatial resolutionpurpose and so forth So it will generally take months evenyears to prepare the correct data for simulation In order torun a simulation the lowest requirement includes an initialplan a road network and a simulation configuration Thedetailed process of preparing the above data will be presentedas follows

Mathematical Problems in Engineering 5

ltperson id=ldquo682rdquo age=ldquo30rdquo employed=ldquoyesrdquogtltplan selected=ldquoyesrdquogtltact type=ldquoh9rdquo facility=ldquo1593rdquo x=ldquo36540169341762rdquo y=ldquo430066448060939rdquo end time=ldquo093927rdquo gtltleg mode=ldquocarrdquo dep time=ldquo093927rdquogtltleggtltact type=ldquow3rdquo facility=ldquo313rdquo x=ldquo36584321376734rdquo y=ldquo43060320981801rdquo end time=ldquo135224rdquo gtltleg mode=ldquocarrdquo dep time=ldquo135224rdquogtltleggtltact type=ldquoh1rdquo facility=ldquo1593rdquo x=ldquo36540169341762rdquo y=ldquo430066448060939rdquo end time=ldquo152130rdquo gtltleg mode=ldquocarrdquo dep time=ldquo152130rdquogtltleggtltact type=ldquow3rdquo facility=ldquo313rdquo x=ldquo36584321376734rdquo y=ldquo43060320981801rdquo end time=ldquo174127rdquo gtltleg mode=ldquocarrdquo dep time=ldquo174127rdquogtltleggtltact type=ldquoh9rdquo facility=ldquo1593rdquo x=ldquo36540169341762rdquo y=ldquo430066448060939rdquo gt

ltplangtltpersongt

Algorithm 1 An example of a typical initial plan

41 Scenario Description

411 A Brief Introduction of Baoding This paper will takeBaoding as an example to simulate a medium-sized cityin China Baoding which is located in Hebei Provinceis made up of one main urban area and four counties(Mancheng County Xushi County Anxin County andQingyuan County) This paper will only simulate the travelbehavior of inhabitants in the main urban area The mainurban area of Baoding has a population of 106 million

412 Activity Chains and Their Distribution In this paperonly the resident driving private car is simulated Based onthe census 2007 of Baoding the activity is classified into fivetypes home work shop education and leisure The analysisresults show that home-work-home and home-work-home-work-home are the most common patterns and the averagelength of the activity chains is close to 3

413 Network Preparation The simulation network of Baod-ing is prepared through OpenMapStreet and it includes 502nodes and 1474 links The link attributes contain lengthcapacity free speed lanes modes and so forth The roadnetwork is showed by Figure 2

42 Initial Demand Preparation The modeling of the initialdemand can be split up into several steps depending on theavailable raw data and the plannerrsquos needs But an initial planshould at least include the following information

(i) Activity locationwhich is given as a set of coordinates(ii) Assigned departure times and arrival times for every

activity(iii) A travel leg among two activities in this paper the

mode is set as car

Algorithm 1 shows a typical initial plan It includesattributes of the person and his initial plan The attributes

Figure 2 Road network of Baoding

are made up of ID age and employment statues The initialplan is made up of 5 activities and they are home workhome work and home in sequence which are set as variableof act type Take the first activity for example the activitylocation is in the facility with ID of 1593 and its coordinate isrepresented by variables of 119909 and119910 and besides the end timeof the activity is represented by variable of end time The legmode and dep time are used to describe themode the personchooses and time the people leaving the facility

Different available data need different processes to pre-pare an initial data Figure 3 shows a detailed preparingprocess based on the available data of BaodingThe process ismainly made up of three parts

Part 1 List All the Available Data for Simulation Part 1 onlycontains one step namely step 1 To check all the available

6 Mathematical Problems in Engineering

Step 1 list available data for simulation

Step 2 generateMATSim population

Step 4 generate facility location

Step 3 generate true plan

MATSimPoptxt Facilityxml

Census Map

TPlanxml

Step 5 generate initial plan

Part 1

Part 2

Part 3

IPlanstxt

Step 1-5 copy information from

TPlanxml to MASTimPopptxt

Step 2-5 assign each activity to a

facility

Step 3-5 generate start

and end time of each activity

Figure 3 The process of preparing the initial data

data and make better use of them is a vital step in thesimulation Take Baoding for example the available dataare the census 2007 of Baoding and the map of Baoding in2007 The census sample includes 2267 personsrsquo daily planbut the number of persons whose travel mode is car is 93which is extremely small Each daily plan includes trip origintrip destination starting time ending time activity type andtravelling leg But unfortunately the data of trip origin anddestination are in traffic zone level which cannot be directlyapplied to agent-based simulation and should be adjustedThe map of Baoding in 2007 comprises the available facilitiesfor performing activities such as shopping leisure andwork

Part 2 Prepare Data for Generating Initial Plan Part 2 is madeup of step 2 step 3 and step 4

In step 2 since the survey sample is really small theMATSim population is synthesized on the basis of censusMTSim population includes a few persons (agents) whoseinformation only includes age home location and worklocation and all the above information is stored in MATSim-Poptxt which will be used for generating initial plan

In step 3 generate a true plan file (TPlanxml) whichcontains a handful of plans whose travel mode was car basedon the census 2007 of Baoding The following information isincluded person ID trip ID origin coordinates destinationcoordinates activity duration and activity type Note thatthe trip origin and destination are in traffic zone level so arandom assigning method was used for selecting a locationfor performing activities

In step 4 prepare the available facilities for perform-ing activities that is getting the exact location type and

attributes of facilities All the information was saved inFactilitiesxml There were five facility types correspondingto five activity types The numbers of facilities for shop-ping education leisure work and home are 256 51 478912 and 1321 respectively In addition before the facilitieslocation is determined the coordination transform shouldbe discussed WGS84-coordinates are widely used like GPSdata OpenStreetMap data and Google earth data For thedistance calculation inWGS84-coordinates (or any sphericalcoordinates) is rather complex in MATSim the coordinatesshould be converted into another coordinate reference system(CRS) This paper chooses the UTM (Universal TransverseMercartor Grid System) as the coordinate used in MATSimAccording to the UTM global zoning Baoding is located inthe zone 50N and its EPSG code is 32650

Part 3 Generating Initial Plan After preparing the requireddata (MATSimPoptxt TPlanxml and Factilitiesxml) in Part2 generating initial plan would be conducted

Step 5-1 copy all the information from a true plan whichis stored in TPlanxml to the plan of each agent who madeup the MATSim population except for the location of eachactivity

Step 5-2 randomly assign each activity to a facility basedonnearby searchingmethod thus the location of each activitycan be generatedThe detailed searchingmethod is describedwith an example as follows Assume that an agent ends itsprevious activity and goes shopping next the controller ofthe MATSim will define a circle around the previous activitylocation with a certain radius (the radius is represented as 119877)and the agent will randomly choose a facility for shopping In

Mathematical Problems in Engineering 7

Previous activity locationNearby facilities for shopping

R

Figure 4 Schematic diagram of randomly assigning each activity toa facility

real life inhabitants will tend to choose a nearer school foreducation choose a nearer shopmarket for shopping andso on So the concept of the searching method seems to berealistic The 119877 was set to 3 km according to Baodingrsquos sizepopulation and so on The schematic diagram is showed inFigure 4

Step 5-3 generate the start and end time of each activityon the basis of activity duration For example the end time ofthe previous activity is 119875endtime and the duration of the nextperformed activity is 119879duration then the Gaussian function isused to generate the next activityrsquos end time and the equationis as follows

119879endtime = 119875endtime + 119879duration + Gaussian sdot 3600 (7)

where 119879endtime is the end time of the next activity Gaussianrepresents the rand number generated based on Gaussiandistribution whose mean is 0 and the standard deviation is1

When all the above steps are completed the initial plan isfinally created

43 Count Data Inputting count data toMATSim is a typicalway to check whether the simulation of travel behavior isrealistic In this paper six count stationsrsquo data will be usedThe count data is obtained by an artificial methodThe surveytime is at May 10 2007 from 700 AM to 900 AM

44 Simulation Configuration In this paper two differentsimulation scenarios will be built up

(i) Scenario 1 10 of all agents carry out Reroute(ii) Scenario 2 10 of all agents will carry out Time

Allocation Mutator but these agents will also carryout Reroute after time changes

0102030405060708090

100

00000 50000 100000 150000 200000

The n

umbe

r of c

ars

Time of day

RerouteTime Allocation Mutator

Figure 5 Comparison of the number of departures of cars betweentwo scenarios

Other simulation configurations of the above three sce-narios are the same

(i) The number of the plans stored in each agentrsquosmemory is limited to 5

(ii) 10 of all agents will randomly select an existing plan(iii) The remaining 70 of all agents will select an existing

plan based on the plan scores(iv) The number of iterations will be set to 50(v) The ldquoQSimrdquo module will be used for mobility simula-

tion

5 Results and Discussion

Simulation results of the two different scenarios will bediscussed in the following aspects

(i) Comparison of the Number of Departures and Arrivals ofCars between Two Scenarios Figures 5 and 6 show the numberof departures and arrivals of cars between the two scenariosrespectively Both figures have the same trend which hastwo peaks The two peaks occur around 800 and 1800respectively In addition in terms of Figure 4 the first peak ofScenario 2 (Time Allocation Mutator) is lower than Scenario1 (Reroute) and the number of cars of Scenario 2 is higherthan Scenario 1 from 500AM to 800AM which indicatesthat some agents advance their departure time to avoid hightraffic volume during the peak time Figure 5 has the sametrend as Figure 4 due to the same reason

(ii) Comparison of the Evolution of the Average Best Score andAverage Executed Score for the Two Scenarios Figures 7 and8 demonstrate the average executed score and average bestscore of two scenarios respectively and they also have thesame trend The score of Scenario 1 which only carries outReroute keeps invariant from iteration 0 and iteration 50 inboth figures while the score of Scenario 2 which carries outTime Allocation Mutator has an increasing trend in both

8 Mathematical Problems in Engineering

Table 1 Bias and error of two scenarios

Time period Biaserror Scenario 1 (Reroute) Scenario 2 (Time Allocation Mutator)

700-800AM

Mean absolute bias minus24 minus147Mean absolute error 158 204Mean relative bias minus075 minus2404Mean relative error 3209 3791

800-900AM

Mean absolute bias minus45 minus222Mean absolute error 252 281Mean relative bias 641 minus2557Mean relative error 4400 4129

700ndash900AM

Mean absolute bias minus35 minus185Mean absolute error 205 243Mean relative bias 283 minus2480Mean relative error 3805 3960

0

20

40

60

80

100

120

00000 50000 100000 150000 200000Time of day

RerouteTime Allocation Mutator

The n

umbe

r of c

ars

Figure 6 Comparison of the number of arrivals of cars between twoscenarios

135

140

145

150

155

160

0 5 10 15 20 25 30 35 40 45 50

Scor

e

Iteration

RerouteTime Allocation Mutator

Figure 7 Comparison of the evolution of the average executed scorefor the two scenarios

figures According to the trendmentioned above we can con-clude that Reroute does not improve the agentsrsquo performancewhile Time Allocation Mutator has a significantly beneficialinfluence on the performance of agentsThe reasonwhy score

130

135

140

145

150

155

160

165

0 5 10 15 20 25 30 35 40 45 50

Scor

e

Iteration

RerouteTime Allocation Mutator

Figure 8 Comparison of the evolution of the average best score forthe two scenarios

of Scenario 1 remains the same is that agents cannot improvetheir performance through changing their routes

(iii) Comparison of the Simulated Data and the Count Dataof the Two Scenarios The comparison between the simulateddata and count data of the two scenarios is presented inFigure 9 Figures 9(a) 9(b) 9(c) and 9(d) demonstrate thecomparison in Scenario 1 at 7-8AM in Scenario 2 at 700-800AM in Scenario 1 at 800-900AM and in Scenario2 at 800-900AM respectively The bias and error of thesimulation results are summarized in Table 1 The meanabsolute bias mean absolute error mean relative bias andmean relative error are jointly used to check the simulationresults The equations to calculate the above indicators are asfollows

(i) mean absolute bias

119864 =1

119899sum(119902simulated minus 119902counted) (8)

Mathematical Problems in Engineering 9

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

Simulated data

7-8 AM

Y = X

Y = 2X

Y = 2X

(a) Simulated data versus count data at 700-800AM (Simulation withReroute only)

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

Simulated data

7-8 AM

Y = X

Y = 2X

Y = 2X

(b) Simulated data versus count data at 700-800AM (Simulation with TimeAllocation Mutator)

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

8-9 AM

Y = X

Y = 2X

Y = 2X

Simulated data

(c) Simulated data versus count data at 800-900AM (Simulation withReroute only)

10

100

1000

10000

Cou

nt d

ata

10 100 1000 10000Simulated data

8-9 AM

Y = X

Y = 2X

Y = 2X

(d) Simulated data versus count data at 800-900AM (Simulation with TimeAllocation Mutator)

Figure 9 Comparison between simulated data and count data

(ii) mean absolute error

|119864| =1

119899sum(

1003816100381610038161003816119902simulated minus 119902counted1003816100381610038161003816)

(9)

(iii) mean relative bias

119890 =1

119899sum(

119902simulated minus 119902counted119902counted

) (10)

(iv) mean relative error

|119890| =1

119899sum(

10038161003816100381610038161003816100381610038161003816

119902simulated minus 119902counted119902counted

10038161003816100381610038161003816100381610038161003816

) (11)

In terms of mean relative error which is commonly usedfor validating the accuracy of simulation the accuracy ofScenario 1 (3805) is close to Scenario 2 (3960) at 700ndash900AM In addition from 700AM to 800AM the mean

10 Mathematical Problems in Engineering

relative error of Scenario 1 (3209) is lower than Scenario 2(3791) while the mean relative error of Scenario 1 (44) ishigher than Scenario 2 (4129) from 800AM to 900AMthus Time Allocation Mutator does not perform better thanReroute in terms of simulation accuracy

6 Conclusions

This paper implements the agent-based simulation of travelbehavior in a medium-sized city in China and the mainachievements of this paper are as follows

(i) A detailed simulation structure which includes avariety of modules is introduced

(ii) Successfully realizing the simulation of travel behav-ior under a condition of limited survey data besidesa framework of preparing the input data is presented

(iii) Simulating the travel behavior of residents in amedium-sized city in China by MATSim was seldomdone in previous studies

However the above achievement is only a basic simula-tion work In the near future the related work below will becarried out

(i) This paper only simulates the travel behavior ofresident whose travel mode is car so other modes willbe added to the simulation scenario to check whetheragent-based simulation results are still realistic

(ii) A large-scale agent-based simulation will be carriedout in a Chinese metropolis such as Beijing Shang-hai on Guangzhou

(iii) Optimize the modules in MATSim to improve itssimulation precision and computing time

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This research was supported by the National Basic ResearchProgram of China (no 2012CB725403) the National Natu-ral Science Foundation of China (nos 51338008 7121000151178032) and the Fundamental Research Funds for theCentral Universities (no 2012YJS069)

References

[1] M Balmer Travel demand modeling for multi-agent trafficsimulations algorithms and systems [MS thesis] ETH ZurichZurich Switzerland 2007

[2] B Raney N Cetin A Vollmy et al ldquoAn agent-basedmicrosim-ulationmodel of Swiss travel first resultsrdquoNetworks and SpatialEconomics vol 3 no 1 pp 23ndash41 2003

[3] B Yu and Z Z Yang ldquoAn ant colony optimization model theperiod vehicle routing problem with time windowsrdquo Trans-portation Research E vol 47 no 2 pp 166ndash181 2011

[4] B Yu Z Yang K Chen andB Yu ldquoHybridmodel for predictionof bus arrival times at next stationrdquo Journal of AdvancedTransportation vol 44 no 3 pp 193ndash204 2010

[5] Y Bin Y Zhongzhen and Y Baozhen ldquoBus arrival timeprediction using support vector machinesrdquo Journal of IntelligentTransportation Systems vol 10 no 4 pp 151ndash158 2006

[6] B Yao P Hu M Zhang et al ldquoArtificial bee colony algorithmwith scanning strategy for periodic vehicle routing problemrdquoSimulation vol 89 no 6 pp 762ndash770 2013

[7] M Florian M Mahut and N Tremblay ldquoApplication of asimulation-based dynamic traffic assignment modelrdquo EuropeanJournal of Operational Research vol 189 no 3 pp 1381ndash13922008

[8] G Bellei GGentile andN Papola ldquoAwithin-day dynamic traf-fic assignment model for urban road networksrdquo TransportationResearch B vol 39 no 1 pp 1ndash29 2005

[9] J C Munoz and J A Laval ldquoSystem optimum dynamic trafficassignment graphical solution method for a congested freewayand one destinationrdquo Transportation Research B vol 40 no 1pp 1ndash15 2006

[10] W Y Szeto Y Jiang and A Sumalee ldquoA cell-based modelfor multi-class doubly stochastic dynamic traffic assignmentrdquoComputer-Aided Civil and Infrastructure Engineering vol 26no 8 pp 595ndash611 2011

[11] I Juran J N Prashker S Bekhor and I Ishai ldquoA dynamic trafficassignment model for the assessment of moving bottlenecksrdquoTransportation Research C vol 17 no 3 pp 240ndash258 2009

[12] C Antoniou M Ben-Akiva and H N Koutsopoulos ldquoNon-linear Kalman filtering algorithms for on-line calibration ofdynamic traffic assignment modelsrdquo IEEE Transactions onIntelligent Transportation Systems vol 8 no 4 pp 661ndash6702007

[13] G Gentile L Meschini and N Papola ldquoSpillback congestionin dynamic traffic assignment a macroscopic flow model withtime-varying bottlenecksrdquo Transportation Research B vol 41no 10 pp 1114ndash1138 2007

[14] B Yao C Yang J Hu J Yao and J Sun ldquoAn improved antcolony optimization for flexible job shop scheduling problemsrdquoAdvanced Science Letters vol 4 no 6-7 pp 2127ndash2131 2011

[15] B Yu Z Yang and S Li ldquoReal-time partway deadheadingstrategy based on transit service reliability assessmentrdquo Trans-portation Research A vol 46 no 8 pp 1265ndash1279 2012

[16] W Davidson R Donnelly P Vovsha et al ldquoSynthesis of firstpractices and operational research approaches in activity-basedtravel demandmodelingrdquoTransportationResearchA vol 41 no5 pp 464ndash488 2007

[17] M Hatzopoulou and E J Miller ldquoLinking an activity-basedtravel demand model with traffic emission and dispersionmodels transportrsquos contribution to air pollution in TorontordquoTransportation Research D vol 15 no 6 pp 315ndash325 2010

[18] X Dong M E Ben-Akiva J L Bowman and J L WalkerldquoMoving from trip-based to activity-based measures of acces-sibilityrdquo Transportation Research A vol 40 no 2 pp 163ndash1802006

[19] W Recker J Duan and H Wang ldquoDevelopment of an esti-mation procedure for an activity-based travel demand modelrdquoComputer-Aided Civil and Infrastructure Engineering vol 23no 7 pp 483ndash501 2008

[20] J E Kang and W W Recker ldquoAn activity-based assessmentof the potential impacts of plug-in hybrid electric vehicles onenergy and emissions using 1-day travel datardquo TransportationResearch D vol 14 no 8 pp 541ndash556 2009

Mathematical Problems in Engineering 11

[21] R M Pendyala R Kitamura A Kikuchi T Yamamoto andS Fujii ldquoFlorida activity mobility simulator overview andpreliminary validation resultsrdquo Transportation Research Recordno 1921 pp 123ndash130 2005

[22] S Yagi and A K Mohammadian ldquoAn activity-based microsim-ulation model of travel demand in the Jakarta Metropolitanareardquo Journal of Choice Modelling vol 3 no 1 pp 32ndash57 2010

[23] B YuWHK Lam andM L Tam ldquoBus arrival time predictionat bus stopwithmultiple routesrdquoTransportation Research C vol19 no 6 pp 1157ndash1170 2011

[24] B Yu Z Yang and B Yao ldquoAn improved ant colony opti-mization for vehicle routing problemrdquo European Journal ofOperational Research vol 196 no 1 pp 171ndash176 2009

[25] M Rieser K Nagel U Beuck M Balmer and J RumenappldquoAgent-oriented coupling of activity-based demand generationwith multiagent traffic simulationrdquo Transportation ResearchRecord vol 2021 no 1 pp 10ndash17 2007

[26] M Balmer KMeisterM Rieser K Nagel andKWAxhausenldquoAgent-based simulation of travel demand structure and com-putational performance of MATSim-Trdquo in Proceedings of the2nd TRB Conference on Innovations in Travel Modeling IVTInstitut fur Verkehrsplanung und Transportsysteme PortlandOre USA June 2008

[27] M Balmer M Rieser K Meister et al ldquoMatsim-T architectureand simulation timesrdquo in Multi-Agent Systems for Traffic andTransportation Engineering pp 57ndash78 2009

[28] A Horni D M Scott M Balmer and K W Axhausen ldquoLoca-tion choice modeling for shopping and leisure activities withMATSim combining microsimulation and time geographyrdquoTransportation Research Record no 2135 pp 87ndash95 2009

[29] D Grether Y Chen M Rieser et al ldquoEffects of a simple modechoicemodel in a large-scale agent-based transport simulationrdquoin Complexity and Spatial Networks pp 167ndash186 SpringerBerlin Germany 2009

[30] W Gao M Balmer and E J Miller ldquoComparison of MATSimand EMME2 on greater toronto and hamilton area networkCanadardquo Transportation Research Record no 2197 pp 118ndash1282010

[31] T W Nicolai L Wang K Nagel et al ldquoCoupling an urbansimulation model with a travel model-a first sensitivity testrdquoin Proceedings of the Computers in Urban Planning and UrbanManagement (CUPUM rsquo11) pp 11ndash07 Also VSP WP LakeLouise Canada 2011

[32] R A Waraich and K W Axhausen ldquoAgent-based parkingchoice modelrdquo Transportation Research Record vol 2319 no 1pp 39ndash46 2012

[33] J W Joubert P J Fourie and K W Axhausen ldquoLarge-scaleagent-based combined traffic simulation of private cars andcommercial vehiclesrdquo Transportation Research Record no 2168pp 24ndash32 2010

[34] D Charypar and K Nagel ldquoGenerating complete all-day activ-ity plans with genetic algorithmsrdquo Transportation vol 32 no 4pp 369ndash397 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 3: Research Article An Initial Implementation of Multiagent ...downloads.hindawi.com/journals/mpe/2014/980623.pdf · Research Article An Initial Implementation of Multiagent Simulation

Mathematical Problems in Engineering 3

Execution

(Mobsim)

ScoringReplanning

Controller

Initial individual daily demand

Networkxml

Input Output

Evolutionary algorithm

Optimization statistics and analysis

Execution

(Mobsim)

ScoringReplanning

Controller

Initial individual daily demand

Networkxml

Input Output

Evolutionary algorithm

Optimization statistics and analysis

Intermediate relaxed demand

Figure 1 Schematic overview of MATSimrsquos simulation structure

(ii) Since different cities have different available trafficsurvey data they differ in quality spatial resolution purposeand so forth An approach of how to prepare the input datawith limited available information and low spatial resolutionis studied in this paper

3 Simulation Structure

31 A Brief Introduction of the Simulation Structure Basedon MATSim the simulation structure of travel behavioris designed and shown in Figure 1 It mainly includesthree parts input evolutionary algorithm (EA) and OutputFirstly the input data (including initial demand and network)will be fed into the mobility simulation (see Section 32)and all agentsrsquo plans will be executed simultaneously andthen the execution results (simulated data) will tell the othermodules what happened during the simulated day secondlyevery executed plan will be scored based on the simulateddata on the basis of the scoring function (see Section 33)thirdly according to the scoring the replanning (includingReroute and Time Allocation Mutator see Section 34) iscarried out to provide the feedback which allows for theevolution of plans Finally after reaching the customizedtimes of iteration the simulation results such as optimizationstatistics and analysis intermediate plan and relaxed planwill be put out

For EA is the core part of the simulation it will be firstdiscussed in detail in the following sections

32 Execution (Mobsim) Themobility simulation (Mobsim)refers to the simulation of the physical transportation systemIt creates events for every agentrsquos action in the simulationlike enteringleaving road and departingarriving at activityplacesThen the events will be used for the scoringmodule Inthe history ofMATSim several MobSims such as QueueSim-ulation QSimDEQSim and JDEQSimhave been developedSomeof themare still in use others are obsolete andno longersupported today This paper will choose Qsim which is themost commonly used Mobsim Qsim is an external queuesimulation in which every link is regarded as a first-in first-out (FIFO) queue with three restrictions [1]

(i) Every agent has to stay on the simulated link for acertain time

(ii) Link storage capacity is imported to limit the numberof agents on the simulated link

(iii) Flow capacity is imported to limit the number ofagents that can leave the simulated link in a givenperiod of time

Even though the queue simulation is indeed simple thesimulated output data is enough for transportation planning

33 Scoring In order to compare different plans a scoringfunction is proposed to evaluate each planrsquos performance InMATSim the utility-based approach is used The detailedfunction is as follows [1]

(i) The Total Score of a Plan It is calculated based on thefollowing equation

119880total =119899

sum

119894=1

119880perf119894 +119899

sum

119894=1

119880late119894 +119899

sum

119894=1

119880travel119894 (1)

where119880total is a total score of a given plan 119899 is the number ofactivities119880perf119894 is the utility for performing activity 119894119880late119894 isthe utility for arriving late to activity 119894 and119880travel119894 is the utilityfor travelling to activity 119894

(ii) The Utility for Performing Activity A logarithmic form isused for the utility as follows

119880perf119894 (119905perf119894) = max[0 120573perf sdot 119905lowast

119894(ln(

120573perf

119905lowast

119894

) +120589

119901 sdot 119905lowast

119894

)]

(2)

where 119905perf119894 is the actual performed duration of the activity 119894120573perf is themarginal utility of an activity at its typical duration119905lowast

119894is the ldquotypicalrdquo duration of an activity 119894 120589 is a scaling

constant and 119901 is a priority indicator

4 Mathematical Problems in Engineering

(iii) The Utility for Arriving Late to Activity Consider

119880late119894 = 120573late sdot 119905late119894 (3)

where 120573late le 0 is the marginal utility for being late 119905late119894 isthe number of hours being late to activity 119894

(iv) The Utility for Travelling to Activity Consider

119880travel119894 = 120573travel sdot 119905taverl119894 (4)

where 120573travel le 0 is the marginal utility for travelling 119905travel119894 isthe number of hours for travelling to activity 119894

More detailed information about the scoring function canbe found in the references of Balmer 2007 [1] and Charyparand Nagel 2005 [34]

34 Replanning The replanning module is established tosearch for a solution space for every agent and it mainlyincludes two submodules Reroute module and Time Allo-cationMutator module Reroute module allows agents adjusttheir route from origin to destination TimeAllocationMuta-tor module enables agents to modify their own departuretimes and activity durations or change activity locations andactivity sequence More details about the modules above areas follows [1]

341 Reroute Module The goal of the Reroute module isto help agents find their shortest path in the network Theldquoshortnessrdquo is measured by travel time rather than traveldistance The most famous and most frequently used routingalgorithm isDijkstra InMATSim a time-dependentDijkstrais applied This algorithm can make the link travel timedependent by aggregating it into 15min time bins Linktravel time is calculated based on the previous traffic flowsimulation and used as the weight of the links in the networkgraph With the weights plus the origin and destination ofthe activities the fastest path can be calculated which willbe executed in the next mobility simulation

342 Time AllocationMutator Time AllocationMutator is avery simple randommutationmodule but it is very useful foragentsrsquo replanning Being similar to Reroute module simplemodules togetherwith a large number of iterationswill obtainuseful results for simulation of travel behavior

Time Allocation Mutator mainly modifies the activitiesrsquoduration time and end time (but for the first and last activityend time is the only attribute modified) The detailed mod-ification process is as follows firstly read every agentrsquos plansecondly pick a random time from the uniform distribution[minus30min +30min] thirdly add the random time to theactivitiesrsquo duration time and end time finally write back theplan with time attribute modified But pay attention to therandom time as (1) any negative duration will be reset tozero (2) any first activity end time before 0000AM and lastactivity end time after 2400 PMwill be reset to 0000AMand2400 PM respectively

35 Controller (Agent Database) Controller makes the mod-ule of execution scoring and replanning run successivelyand the controlled content is as follows [1]

(i) Number of Plans The number of the plans per agent willbe limited to 119873 (119873 ge 2 usually 119873 is 3ndash6) If an agent has119873+1 plan (the additional plan is generated in the replanningprocess) the119873 + 1 Plan will be stored in the agentrsquos memoryuntil the new plan scores After scoring the controller willdelete the lowest-score plan

(ii) Select Agents Performing Reroute (119903) The controllerselects 119903 of agents to carry out the module of Reroute (seeSection 341) The plans in the memory will be selected withequal probability

(iii) Select Agents Performing Time Allocation Mutator (119904)The controller selects 119904 of agents to carry out the moduleof Time Allocation Mutator (see Section 341) howeverafter that those agents will also carry out the module ofReroute The plans in the memory will be selected with equalprobabilityThus 119904 of agents will carry out Time AllocationMutator and (119904 + 119903) of agents will carry out Reroute

(iv) Select Random Plan (119898) In order to re-evaluate theexisting plans from time to time the controller selects119898 ofagents and those agents will randomly choose a plan amongall plans in their memory

(v) Select Plans Based on the Scores (119901 = 1 minus 119903 minus 119904 minus

119898) The controller finally selects the remained plans withthe following probability

119901 prop 119890120573sdot119878119895 (5)

where 119878119895is the score of the plan 119895 120573 is an empirical constant

Note If the controller selects an existing plan its new scorecan be calculated with

119878 = (1 minus 120572) sdot 119878old + 120572 sdot 119878new (6)

where 120572 is the blending factor this will avoid agent selectingplans based on not only last iteration but also the historyscores

The controller will make the loop run until the simulationsystem reach a relaxed state

4 Input Data and Scenario

The structure ofMATSimmay not be complex but preparingthe input data and constructing a simulation scenario aremuch more sophisticated In practice there is a large varietyof input data which can differ in quality spatial resolutionpurpose and so forth So it will generally take months evenyears to prepare the correct data for simulation In order torun a simulation the lowest requirement includes an initialplan a road network and a simulation configuration Thedetailed process of preparing the above data will be presentedas follows

Mathematical Problems in Engineering 5

ltperson id=ldquo682rdquo age=ldquo30rdquo employed=ldquoyesrdquogtltplan selected=ldquoyesrdquogtltact type=ldquoh9rdquo facility=ldquo1593rdquo x=ldquo36540169341762rdquo y=ldquo430066448060939rdquo end time=ldquo093927rdquo gtltleg mode=ldquocarrdquo dep time=ldquo093927rdquogtltleggtltact type=ldquow3rdquo facility=ldquo313rdquo x=ldquo36584321376734rdquo y=ldquo43060320981801rdquo end time=ldquo135224rdquo gtltleg mode=ldquocarrdquo dep time=ldquo135224rdquogtltleggtltact type=ldquoh1rdquo facility=ldquo1593rdquo x=ldquo36540169341762rdquo y=ldquo430066448060939rdquo end time=ldquo152130rdquo gtltleg mode=ldquocarrdquo dep time=ldquo152130rdquogtltleggtltact type=ldquow3rdquo facility=ldquo313rdquo x=ldquo36584321376734rdquo y=ldquo43060320981801rdquo end time=ldquo174127rdquo gtltleg mode=ldquocarrdquo dep time=ldquo174127rdquogtltleggtltact type=ldquoh9rdquo facility=ldquo1593rdquo x=ldquo36540169341762rdquo y=ldquo430066448060939rdquo gt

ltplangtltpersongt

Algorithm 1 An example of a typical initial plan

41 Scenario Description

411 A Brief Introduction of Baoding This paper will takeBaoding as an example to simulate a medium-sized cityin China Baoding which is located in Hebei Provinceis made up of one main urban area and four counties(Mancheng County Xushi County Anxin County andQingyuan County) This paper will only simulate the travelbehavior of inhabitants in the main urban area The mainurban area of Baoding has a population of 106 million

412 Activity Chains and Their Distribution In this paperonly the resident driving private car is simulated Based onthe census 2007 of Baoding the activity is classified into fivetypes home work shop education and leisure The analysisresults show that home-work-home and home-work-home-work-home are the most common patterns and the averagelength of the activity chains is close to 3

413 Network Preparation The simulation network of Baod-ing is prepared through OpenMapStreet and it includes 502nodes and 1474 links The link attributes contain lengthcapacity free speed lanes modes and so forth The roadnetwork is showed by Figure 2

42 Initial Demand Preparation The modeling of the initialdemand can be split up into several steps depending on theavailable raw data and the plannerrsquos needs But an initial planshould at least include the following information

(i) Activity locationwhich is given as a set of coordinates(ii) Assigned departure times and arrival times for every

activity(iii) A travel leg among two activities in this paper the

mode is set as car

Algorithm 1 shows a typical initial plan It includesattributes of the person and his initial plan The attributes

Figure 2 Road network of Baoding

are made up of ID age and employment statues The initialplan is made up of 5 activities and they are home workhome work and home in sequence which are set as variableof act type Take the first activity for example the activitylocation is in the facility with ID of 1593 and its coordinate isrepresented by variables of 119909 and119910 and besides the end timeof the activity is represented by variable of end time The legmode and dep time are used to describe themode the personchooses and time the people leaving the facility

Different available data need different processes to pre-pare an initial data Figure 3 shows a detailed preparingprocess based on the available data of BaodingThe process ismainly made up of three parts

Part 1 List All the Available Data for Simulation Part 1 onlycontains one step namely step 1 To check all the available

6 Mathematical Problems in Engineering

Step 1 list available data for simulation

Step 2 generateMATSim population

Step 4 generate facility location

Step 3 generate true plan

MATSimPoptxt Facilityxml

Census Map

TPlanxml

Step 5 generate initial plan

Part 1

Part 2

Part 3

IPlanstxt

Step 1-5 copy information from

TPlanxml to MASTimPopptxt

Step 2-5 assign each activity to a

facility

Step 3-5 generate start

and end time of each activity

Figure 3 The process of preparing the initial data

data and make better use of them is a vital step in thesimulation Take Baoding for example the available dataare the census 2007 of Baoding and the map of Baoding in2007 The census sample includes 2267 personsrsquo daily planbut the number of persons whose travel mode is car is 93which is extremely small Each daily plan includes trip origintrip destination starting time ending time activity type andtravelling leg But unfortunately the data of trip origin anddestination are in traffic zone level which cannot be directlyapplied to agent-based simulation and should be adjustedThe map of Baoding in 2007 comprises the available facilitiesfor performing activities such as shopping leisure andwork

Part 2 Prepare Data for Generating Initial Plan Part 2 is madeup of step 2 step 3 and step 4

In step 2 since the survey sample is really small theMATSim population is synthesized on the basis of censusMTSim population includes a few persons (agents) whoseinformation only includes age home location and worklocation and all the above information is stored in MATSim-Poptxt which will be used for generating initial plan

In step 3 generate a true plan file (TPlanxml) whichcontains a handful of plans whose travel mode was car basedon the census 2007 of Baoding The following information isincluded person ID trip ID origin coordinates destinationcoordinates activity duration and activity type Note thatthe trip origin and destination are in traffic zone level so arandom assigning method was used for selecting a locationfor performing activities

In step 4 prepare the available facilities for perform-ing activities that is getting the exact location type and

attributes of facilities All the information was saved inFactilitiesxml There were five facility types correspondingto five activity types The numbers of facilities for shop-ping education leisure work and home are 256 51 478912 and 1321 respectively In addition before the facilitieslocation is determined the coordination transform shouldbe discussed WGS84-coordinates are widely used like GPSdata OpenStreetMap data and Google earth data For thedistance calculation inWGS84-coordinates (or any sphericalcoordinates) is rather complex in MATSim the coordinatesshould be converted into another coordinate reference system(CRS) This paper chooses the UTM (Universal TransverseMercartor Grid System) as the coordinate used in MATSimAccording to the UTM global zoning Baoding is located inthe zone 50N and its EPSG code is 32650

Part 3 Generating Initial Plan After preparing the requireddata (MATSimPoptxt TPlanxml and Factilitiesxml) in Part2 generating initial plan would be conducted

Step 5-1 copy all the information from a true plan whichis stored in TPlanxml to the plan of each agent who madeup the MATSim population except for the location of eachactivity

Step 5-2 randomly assign each activity to a facility basedonnearby searchingmethod thus the location of each activitycan be generatedThe detailed searchingmethod is describedwith an example as follows Assume that an agent ends itsprevious activity and goes shopping next the controller ofthe MATSim will define a circle around the previous activitylocation with a certain radius (the radius is represented as 119877)and the agent will randomly choose a facility for shopping In

Mathematical Problems in Engineering 7

Previous activity locationNearby facilities for shopping

R

Figure 4 Schematic diagram of randomly assigning each activity toa facility

real life inhabitants will tend to choose a nearer school foreducation choose a nearer shopmarket for shopping andso on So the concept of the searching method seems to berealistic The 119877 was set to 3 km according to Baodingrsquos sizepopulation and so on The schematic diagram is showed inFigure 4

Step 5-3 generate the start and end time of each activityon the basis of activity duration For example the end time ofthe previous activity is 119875endtime and the duration of the nextperformed activity is 119879duration then the Gaussian function isused to generate the next activityrsquos end time and the equationis as follows

119879endtime = 119875endtime + 119879duration + Gaussian sdot 3600 (7)

where 119879endtime is the end time of the next activity Gaussianrepresents the rand number generated based on Gaussiandistribution whose mean is 0 and the standard deviation is1

When all the above steps are completed the initial plan isfinally created

43 Count Data Inputting count data toMATSim is a typicalway to check whether the simulation of travel behavior isrealistic In this paper six count stationsrsquo data will be usedThe count data is obtained by an artificial methodThe surveytime is at May 10 2007 from 700 AM to 900 AM

44 Simulation Configuration In this paper two differentsimulation scenarios will be built up

(i) Scenario 1 10 of all agents carry out Reroute(ii) Scenario 2 10 of all agents will carry out Time

Allocation Mutator but these agents will also carryout Reroute after time changes

0102030405060708090

100

00000 50000 100000 150000 200000

The n

umbe

r of c

ars

Time of day

RerouteTime Allocation Mutator

Figure 5 Comparison of the number of departures of cars betweentwo scenarios

Other simulation configurations of the above three sce-narios are the same

(i) The number of the plans stored in each agentrsquosmemory is limited to 5

(ii) 10 of all agents will randomly select an existing plan(iii) The remaining 70 of all agents will select an existing

plan based on the plan scores(iv) The number of iterations will be set to 50(v) The ldquoQSimrdquo module will be used for mobility simula-

tion

5 Results and Discussion

Simulation results of the two different scenarios will bediscussed in the following aspects

(i) Comparison of the Number of Departures and Arrivals ofCars between Two Scenarios Figures 5 and 6 show the numberof departures and arrivals of cars between the two scenariosrespectively Both figures have the same trend which hastwo peaks The two peaks occur around 800 and 1800respectively In addition in terms of Figure 4 the first peak ofScenario 2 (Time Allocation Mutator) is lower than Scenario1 (Reroute) and the number of cars of Scenario 2 is higherthan Scenario 1 from 500AM to 800AM which indicatesthat some agents advance their departure time to avoid hightraffic volume during the peak time Figure 5 has the sametrend as Figure 4 due to the same reason

(ii) Comparison of the Evolution of the Average Best Score andAverage Executed Score for the Two Scenarios Figures 7 and8 demonstrate the average executed score and average bestscore of two scenarios respectively and they also have thesame trend The score of Scenario 1 which only carries outReroute keeps invariant from iteration 0 and iteration 50 inboth figures while the score of Scenario 2 which carries outTime Allocation Mutator has an increasing trend in both

8 Mathematical Problems in Engineering

Table 1 Bias and error of two scenarios

Time period Biaserror Scenario 1 (Reroute) Scenario 2 (Time Allocation Mutator)

700-800AM

Mean absolute bias minus24 minus147Mean absolute error 158 204Mean relative bias minus075 minus2404Mean relative error 3209 3791

800-900AM

Mean absolute bias minus45 minus222Mean absolute error 252 281Mean relative bias 641 minus2557Mean relative error 4400 4129

700ndash900AM

Mean absolute bias minus35 minus185Mean absolute error 205 243Mean relative bias 283 minus2480Mean relative error 3805 3960

0

20

40

60

80

100

120

00000 50000 100000 150000 200000Time of day

RerouteTime Allocation Mutator

The n

umbe

r of c

ars

Figure 6 Comparison of the number of arrivals of cars between twoscenarios

135

140

145

150

155

160

0 5 10 15 20 25 30 35 40 45 50

Scor

e

Iteration

RerouteTime Allocation Mutator

Figure 7 Comparison of the evolution of the average executed scorefor the two scenarios

figures According to the trendmentioned above we can con-clude that Reroute does not improve the agentsrsquo performancewhile Time Allocation Mutator has a significantly beneficialinfluence on the performance of agentsThe reasonwhy score

130

135

140

145

150

155

160

165

0 5 10 15 20 25 30 35 40 45 50

Scor

e

Iteration

RerouteTime Allocation Mutator

Figure 8 Comparison of the evolution of the average best score forthe two scenarios

of Scenario 1 remains the same is that agents cannot improvetheir performance through changing their routes

(iii) Comparison of the Simulated Data and the Count Dataof the Two Scenarios The comparison between the simulateddata and count data of the two scenarios is presented inFigure 9 Figures 9(a) 9(b) 9(c) and 9(d) demonstrate thecomparison in Scenario 1 at 7-8AM in Scenario 2 at 700-800AM in Scenario 1 at 800-900AM and in Scenario2 at 800-900AM respectively The bias and error of thesimulation results are summarized in Table 1 The meanabsolute bias mean absolute error mean relative bias andmean relative error are jointly used to check the simulationresults The equations to calculate the above indicators are asfollows

(i) mean absolute bias

119864 =1

119899sum(119902simulated minus 119902counted) (8)

Mathematical Problems in Engineering 9

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

Simulated data

7-8 AM

Y = X

Y = 2X

Y = 2X

(a) Simulated data versus count data at 700-800AM (Simulation withReroute only)

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

Simulated data

7-8 AM

Y = X

Y = 2X

Y = 2X

(b) Simulated data versus count data at 700-800AM (Simulation with TimeAllocation Mutator)

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

8-9 AM

Y = X

Y = 2X

Y = 2X

Simulated data

(c) Simulated data versus count data at 800-900AM (Simulation withReroute only)

10

100

1000

10000

Cou

nt d

ata

10 100 1000 10000Simulated data

8-9 AM

Y = X

Y = 2X

Y = 2X

(d) Simulated data versus count data at 800-900AM (Simulation with TimeAllocation Mutator)

Figure 9 Comparison between simulated data and count data

(ii) mean absolute error

|119864| =1

119899sum(

1003816100381610038161003816119902simulated minus 119902counted1003816100381610038161003816)

(9)

(iii) mean relative bias

119890 =1

119899sum(

119902simulated minus 119902counted119902counted

) (10)

(iv) mean relative error

|119890| =1

119899sum(

10038161003816100381610038161003816100381610038161003816

119902simulated minus 119902counted119902counted

10038161003816100381610038161003816100381610038161003816

) (11)

In terms of mean relative error which is commonly usedfor validating the accuracy of simulation the accuracy ofScenario 1 (3805) is close to Scenario 2 (3960) at 700ndash900AM In addition from 700AM to 800AM the mean

10 Mathematical Problems in Engineering

relative error of Scenario 1 (3209) is lower than Scenario 2(3791) while the mean relative error of Scenario 1 (44) ishigher than Scenario 2 (4129) from 800AM to 900AMthus Time Allocation Mutator does not perform better thanReroute in terms of simulation accuracy

6 Conclusions

This paper implements the agent-based simulation of travelbehavior in a medium-sized city in China and the mainachievements of this paper are as follows

(i) A detailed simulation structure which includes avariety of modules is introduced

(ii) Successfully realizing the simulation of travel behav-ior under a condition of limited survey data besidesa framework of preparing the input data is presented

(iii) Simulating the travel behavior of residents in amedium-sized city in China by MATSim was seldomdone in previous studies

However the above achievement is only a basic simula-tion work In the near future the related work below will becarried out

(i) This paper only simulates the travel behavior ofresident whose travel mode is car so other modes willbe added to the simulation scenario to check whetheragent-based simulation results are still realistic

(ii) A large-scale agent-based simulation will be carriedout in a Chinese metropolis such as Beijing Shang-hai on Guangzhou

(iii) Optimize the modules in MATSim to improve itssimulation precision and computing time

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This research was supported by the National Basic ResearchProgram of China (no 2012CB725403) the National Natu-ral Science Foundation of China (nos 51338008 7121000151178032) and the Fundamental Research Funds for theCentral Universities (no 2012YJS069)

References

[1] M Balmer Travel demand modeling for multi-agent trafficsimulations algorithms and systems [MS thesis] ETH ZurichZurich Switzerland 2007

[2] B Raney N Cetin A Vollmy et al ldquoAn agent-basedmicrosim-ulationmodel of Swiss travel first resultsrdquoNetworks and SpatialEconomics vol 3 no 1 pp 23ndash41 2003

[3] B Yu and Z Z Yang ldquoAn ant colony optimization model theperiod vehicle routing problem with time windowsrdquo Trans-portation Research E vol 47 no 2 pp 166ndash181 2011

[4] B Yu Z Yang K Chen andB Yu ldquoHybridmodel for predictionof bus arrival times at next stationrdquo Journal of AdvancedTransportation vol 44 no 3 pp 193ndash204 2010

[5] Y Bin Y Zhongzhen and Y Baozhen ldquoBus arrival timeprediction using support vector machinesrdquo Journal of IntelligentTransportation Systems vol 10 no 4 pp 151ndash158 2006

[6] B Yao P Hu M Zhang et al ldquoArtificial bee colony algorithmwith scanning strategy for periodic vehicle routing problemrdquoSimulation vol 89 no 6 pp 762ndash770 2013

[7] M Florian M Mahut and N Tremblay ldquoApplication of asimulation-based dynamic traffic assignment modelrdquo EuropeanJournal of Operational Research vol 189 no 3 pp 1381ndash13922008

[8] G Bellei GGentile andN Papola ldquoAwithin-day dynamic traf-fic assignment model for urban road networksrdquo TransportationResearch B vol 39 no 1 pp 1ndash29 2005

[9] J C Munoz and J A Laval ldquoSystem optimum dynamic trafficassignment graphical solution method for a congested freewayand one destinationrdquo Transportation Research B vol 40 no 1pp 1ndash15 2006

[10] W Y Szeto Y Jiang and A Sumalee ldquoA cell-based modelfor multi-class doubly stochastic dynamic traffic assignmentrdquoComputer-Aided Civil and Infrastructure Engineering vol 26no 8 pp 595ndash611 2011

[11] I Juran J N Prashker S Bekhor and I Ishai ldquoA dynamic trafficassignment model for the assessment of moving bottlenecksrdquoTransportation Research C vol 17 no 3 pp 240ndash258 2009

[12] C Antoniou M Ben-Akiva and H N Koutsopoulos ldquoNon-linear Kalman filtering algorithms for on-line calibration ofdynamic traffic assignment modelsrdquo IEEE Transactions onIntelligent Transportation Systems vol 8 no 4 pp 661ndash6702007

[13] G Gentile L Meschini and N Papola ldquoSpillback congestionin dynamic traffic assignment a macroscopic flow model withtime-varying bottlenecksrdquo Transportation Research B vol 41no 10 pp 1114ndash1138 2007

[14] B Yao C Yang J Hu J Yao and J Sun ldquoAn improved antcolony optimization for flexible job shop scheduling problemsrdquoAdvanced Science Letters vol 4 no 6-7 pp 2127ndash2131 2011

[15] B Yu Z Yang and S Li ldquoReal-time partway deadheadingstrategy based on transit service reliability assessmentrdquo Trans-portation Research A vol 46 no 8 pp 1265ndash1279 2012

[16] W Davidson R Donnelly P Vovsha et al ldquoSynthesis of firstpractices and operational research approaches in activity-basedtravel demandmodelingrdquoTransportationResearchA vol 41 no5 pp 464ndash488 2007

[17] M Hatzopoulou and E J Miller ldquoLinking an activity-basedtravel demand model with traffic emission and dispersionmodels transportrsquos contribution to air pollution in TorontordquoTransportation Research D vol 15 no 6 pp 315ndash325 2010

[18] X Dong M E Ben-Akiva J L Bowman and J L WalkerldquoMoving from trip-based to activity-based measures of acces-sibilityrdquo Transportation Research A vol 40 no 2 pp 163ndash1802006

[19] W Recker J Duan and H Wang ldquoDevelopment of an esti-mation procedure for an activity-based travel demand modelrdquoComputer-Aided Civil and Infrastructure Engineering vol 23no 7 pp 483ndash501 2008

[20] J E Kang and W W Recker ldquoAn activity-based assessmentof the potential impacts of plug-in hybrid electric vehicles onenergy and emissions using 1-day travel datardquo TransportationResearch D vol 14 no 8 pp 541ndash556 2009

Mathematical Problems in Engineering 11

[21] R M Pendyala R Kitamura A Kikuchi T Yamamoto andS Fujii ldquoFlorida activity mobility simulator overview andpreliminary validation resultsrdquo Transportation Research Recordno 1921 pp 123ndash130 2005

[22] S Yagi and A K Mohammadian ldquoAn activity-based microsim-ulation model of travel demand in the Jakarta Metropolitanareardquo Journal of Choice Modelling vol 3 no 1 pp 32ndash57 2010

[23] B YuWHK Lam andM L Tam ldquoBus arrival time predictionat bus stopwithmultiple routesrdquoTransportation Research C vol19 no 6 pp 1157ndash1170 2011

[24] B Yu Z Yang and B Yao ldquoAn improved ant colony opti-mization for vehicle routing problemrdquo European Journal ofOperational Research vol 196 no 1 pp 171ndash176 2009

[25] M Rieser K Nagel U Beuck M Balmer and J RumenappldquoAgent-oriented coupling of activity-based demand generationwith multiagent traffic simulationrdquo Transportation ResearchRecord vol 2021 no 1 pp 10ndash17 2007

[26] M Balmer KMeisterM Rieser K Nagel andKWAxhausenldquoAgent-based simulation of travel demand structure and com-putational performance of MATSim-Trdquo in Proceedings of the2nd TRB Conference on Innovations in Travel Modeling IVTInstitut fur Verkehrsplanung und Transportsysteme PortlandOre USA June 2008

[27] M Balmer M Rieser K Meister et al ldquoMatsim-T architectureand simulation timesrdquo in Multi-Agent Systems for Traffic andTransportation Engineering pp 57ndash78 2009

[28] A Horni D M Scott M Balmer and K W Axhausen ldquoLoca-tion choice modeling for shopping and leisure activities withMATSim combining microsimulation and time geographyrdquoTransportation Research Record no 2135 pp 87ndash95 2009

[29] D Grether Y Chen M Rieser et al ldquoEffects of a simple modechoicemodel in a large-scale agent-based transport simulationrdquoin Complexity and Spatial Networks pp 167ndash186 SpringerBerlin Germany 2009

[30] W Gao M Balmer and E J Miller ldquoComparison of MATSimand EMME2 on greater toronto and hamilton area networkCanadardquo Transportation Research Record no 2197 pp 118ndash1282010

[31] T W Nicolai L Wang K Nagel et al ldquoCoupling an urbansimulation model with a travel model-a first sensitivity testrdquoin Proceedings of the Computers in Urban Planning and UrbanManagement (CUPUM rsquo11) pp 11ndash07 Also VSP WP LakeLouise Canada 2011

[32] R A Waraich and K W Axhausen ldquoAgent-based parkingchoice modelrdquo Transportation Research Record vol 2319 no 1pp 39ndash46 2012

[33] J W Joubert P J Fourie and K W Axhausen ldquoLarge-scaleagent-based combined traffic simulation of private cars andcommercial vehiclesrdquo Transportation Research Record no 2168pp 24ndash32 2010

[34] D Charypar and K Nagel ldquoGenerating complete all-day activ-ity plans with genetic algorithmsrdquo Transportation vol 32 no 4pp 369ndash397 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 4: Research Article An Initial Implementation of Multiagent ...downloads.hindawi.com/journals/mpe/2014/980623.pdf · Research Article An Initial Implementation of Multiagent Simulation

4 Mathematical Problems in Engineering

(iii) The Utility for Arriving Late to Activity Consider

119880late119894 = 120573late sdot 119905late119894 (3)

where 120573late le 0 is the marginal utility for being late 119905late119894 isthe number of hours being late to activity 119894

(iv) The Utility for Travelling to Activity Consider

119880travel119894 = 120573travel sdot 119905taverl119894 (4)

where 120573travel le 0 is the marginal utility for travelling 119905travel119894 isthe number of hours for travelling to activity 119894

More detailed information about the scoring function canbe found in the references of Balmer 2007 [1] and Charyparand Nagel 2005 [34]

34 Replanning The replanning module is established tosearch for a solution space for every agent and it mainlyincludes two submodules Reroute module and Time Allo-cationMutator module Reroute module allows agents adjusttheir route from origin to destination TimeAllocationMuta-tor module enables agents to modify their own departuretimes and activity durations or change activity locations andactivity sequence More details about the modules above areas follows [1]

341 Reroute Module The goal of the Reroute module isto help agents find their shortest path in the network Theldquoshortnessrdquo is measured by travel time rather than traveldistance The most famous and most frequently used routingalgorithm isDijkstra InMATSim a time-dependentDijkstrais applied This algorithm can make the link travel timedependent by aggregating it into 15min time bins Linktravel time is calculated based on the previous traffic flowsimulation and used as the weight of the links in the networkgraph With the weights plus the origin and destination ofthe activities the fastest path can be calculated which willbe executed in the next mobility simulation

342 Time AllocationMutator Time AllocationMutator is avery simple randommutationmodule but it is very useful foragentsrsquo replanning Being similar to Reroute module simplemodules togetherwith a large number of iterationswill obtainuseful results for simulation of travel behavior

Time Allocation Mutator mainly modifies the activitiesrsquoduration time and end time (but for the first and last activityend time is the only attribute modified) The detailed mod-ification process is as follows firstly read every agentrsquos plansecondly pick a random time from the uniform distribution[minus30min +30min] thirdly add the random time to theactivitiesrsquo duration time and end time finally write back theplan with time attribute modified But pay attention to therandom time as (1) any negative duration will be reset tozero (2) any first activity end time before 0000AM and lastactivity end time after 2400 PMwill be reset to 0000AMand2400 PM respectively

35 Controller (Agent Database) Controller makes the mod-ule of execution scoring and replanning run successivelyand the controlled content is as follows [1]

(i) Number of Plans The number of the plans per agent willbe limited to 119873 (119873 ge 2 usually 119873 is 3ndash6) If an agent has119873+1 plan (the additional plan is generated in the replanningprocess) the119873 + 1 Plan will be stored in the agentrsquos memoryuntil the new plan scores After scoring the controller willdelete the lowest-score plan

(ii) Select Agents Performing Reroute (119903) The controllerselects 119903 of agents to carry out the module of Reroute (seeSection 341) The plans in the memory will be selected withequal probability

(iii) Select Agents Performing Time Allocation Mutator (119904)The controller selects 119904 of agents to carry out the moduleof Time Allocation Mutator (see Section 341) howeverafter that those agents will also carry out the module ofReroute The plans in the memory will be selected with equalprobabilityThus 119904 of agents will carry out Time AllocationMutator and (119904 + 119903) of agents will carry out Reroute

(iv) Select Random Plan (119898) In order to re-evaluate theexisting plans from time to time the controller selects119898 ofagents and those agents will randomly choose a plan amongall plans in their memory

(v) Select Plans Based on the Scores (119901 = 1 minus 119903 minus 119904 minus

119898) The controller finally selects the remained plans withthe following probability

119901 prop 119890120573sdot119878119895 (5)

where 119878119895is the score of the plan 119895 120573 is an empirical constant

Note If the controller selects an existing plan its new scorecan be calculated with

119878 = (1 minus 120572) sdot 119878old + 120572 sdot 119878new (6)

where 120572 is the blending factor this will avoid agent selectingplans based on not only last iteration but also the historyscores

The controller will make the loop run until the simulationsystem reach a relaxed state

4 Input Data and Scenario

The structure ofMATSimmay not be complex but preparingthe input data and constructing a simulation scenario aremuch more sophisticated In practice there is a large varietyof input data which can differ in quality spatial resolutionpurpose and so forth So it will generally take months evenyears to prepare the correct data for simulation In order torun a simulation the lowest requirement includes an initialplan a road network and a simulation configuration Thedetailed process of preparing the above data will be presentedas follows

Mathematical Problems in Engineering 5

ltperson id=ldquo682rdquo age=ldquo30rdquo employed=ldquoyesrdquogtltplan selected=ldquoyesrdquogtltact type=ldquoh9rdquo facility=ldquo1593rdquo x=ldquo36540169341762rdquo y=ldquo430066448060939rdquo end time=ldquo093927rdquo gtltleg mode=ldquocarrdquo dep time=ldquo093927rdquogtltleggtltact type=ldquow3rdquo facility=ldquo313rdquo x=ldquo36584321376734rdquo y=ldquo43060320981801rdquo end time=ldquo135224rdquo gtltleg mode=ldquocarrdquo dep time=ldquo135224rdquogtltleggtltact type=ldquoh1rdquo facility=ldquo1593rdquo x=ldquo36540169341762rdquo y=ldquo430066448060939rdquo end time=ldquo152130rdquo gtltleg mode=ldquocarrdquo dep time=ldquo152130rdquogtltleggtltact type=ldquow3rdquo facility=ldquo313rdquo x=ldquo36584321376734rdquo y=ldquo43060320981801rdquo end time=ldquo174127rdquo gtltleg mode=ldquocarrdquo dep time=ldquo174127rdquogtltleggtltact type=ldquoh9rdquo facility=ldquo1593rdquo x=ldquo36540169341762rdquo y=ldquo430066448060939rdquo gt

ltplangtltpersongt

Algorithm 1 An example of a typical initial plan

41 Scenario Description

411 A Brief Introduction of Baoding This paper will takeBaoding as an example to simulate a medium-sized cityin China Baoding which is located in Hebei Provinceis made up of one main urban area and four counties(Mancheng County Xushi County Anxin County andQingyuan County) This paper will only simulate the travelbehavior of inhabitants in the main urban area The mainurban area of Baoding has a population of 106 million

412 Activity Chains and Their Distribution In this paperonly the resident driving private car is simulated Based onthe census 2007 of Baoding the activity is classified into fivetypes home work shop education and leisure The analysisresults show that home-work-home and home-work-home-work-home are the most common patterns and the averagelength of the activity chains is close to 3

413 Network Preparation The simulation network of Baod-ing is prepared through OpenMapStreet and it includes 502nodes and 1474 links The link attributes contain lengthcapacity free speed lanes modes and so forth The roadnetwork is showed by Figure 2

42 Initial Demand Preparation The modeling of the initialdemand can be split up into several steps depending on theavailable raw data and the plannerrsquos needs But an initial planshould at least include the following information

(i) Activity locationwhich is given as a set of coordinates(ii) Assigned departure times and arrival times for every

activity(iii) A travel leg among two activities in this paper the

mode is set as car

Algorithm 1 shows a typical initial plan It includesattributes of the person and his initial plan The attributes

Figure 2 Road network of Baoding

are made up of ID age and employment statues The initialplan is made up of 5 activities and they are home workhome work and home in sequence which are set as variableof act type Take the first activity for example the activitylocation is in the facility with ID of 1593 and its coordinate isrepresented by variables of 119909 and119910 and besides the end timeof the activity is represented by variable of end time The legmode and dep time are used to describe themode the personchooses and time the people leaving the facility

Different available data need different processes to pre-pare an initial data Figure 3 shows a detailed preparingprocess based on the available data of BaodingThe process ismainly made up of three parts

Part 1 List All the Available Data for Simulation Part 1 onlycontains one step namely step 1 To check all the available

6 Mathematical Problems in Engineering

Step 1 list available data for simulation

Step 2 generateMATSim population

Step 4 generate facility location

Step 3 generate true plan

MATSimPoptxt Facilityxml

Census Map

TPlanxml

Step 5 generate initial plan

Part 1

Part 2

Part 3

IPlanstxt

Step 1-5 copy information from

TPlanxml to MASTimPopptxt

Step 2-5 assign each activity to a

facility

Step 3-5 generate start

and end time of each activity

Figure 3 The process of preparing the initial data

data and make better use of them is a vital step in thesimulation Take Baoding for example the available dataare the census 2007 of Baoding and the map of Baoding in2007 The census sample includes 2267 personsrsquo daily planbut the number of persons whose travel mode is car is 93which is extremely small Each daily plan includes trip origintrip destination starting time ending time activity type andtravelling leg But unfortunately the data of trip origin anddestination are in traffic zone level which cannot be directlyapplied to agent-based simulation and should be adjustedThe map of Baoding in 2007 comprises the available facilitiesfor performing activities such as shopping leisure andwork

Part 2 Prepare Data for Generating Initial Plan Part 2 is madeup of step 2 step 3 and step 4

In step 2 since the survey sample is really small theMATSim population is synthesized on the basis of censusMTSim population includes a few persons (agents) whoseinformation only includes age home location and worklocation and all the above information is stored in MATSim-Poptxt which will be used for generating initial plan

In step 3 generate a true plan file (TPlanxml) whichcontains a handful of plans whose travel mode was car basedon the census 2007 of Baoding The following information isincluded person ID trip ID origin coordinates destinationcoordinates activity duration and activity type Note thatthe trip origin and destination are in traffic zone level so arandom assigning method was used for selecting a locationfor performing activities

In step 4 prepare the available facilities for perform-ing activities that is getting the exact location type and

attributes of facilities All the information was saved inFactilitiesxml There were five facility types correspondingto five activity types The numbers of facilities for shop-ping education leisure work and home are 256 51 478912 and 1321 respectively In addition before the facilitieslocation is determined the coordination transform shouldbe discussed WGS84-coordinates are widely used like GPSdata OpenStreetMap data and Google earth data For thedistance calculation inWGS84-coordinates (or any sphericalcoordinates) is rather complex in MATSim the coordinatesshould be converted into another coordinate reference system(CRS) This paper chooses the UTM (Universal TransverseMercartor Grid System) as the coordinate used in MATSimAccording to the UTM global zoning Baoding is located inthe zone 50N and its EPSG code is 32650

Part 3 Generating Initial Plan After preparing the requireddata (MATSimPoptxt TPlanxml and Factilitiesxml) in Part2 generating initial plan would be conducted

Step 5-1 copy all the information from a true plan whichis stored in TPlanxml to the plan of each agent who madeup the MATSim population except for the location of eachactivity

Step 5-2 randomly assign each activity to a facility basedonnearby searchingmethod thus the location of each activitycan be generatedThe detailed searchingmethod is describedwith an example as follows Assume that an agent ends itsprevious activity and goes shopping next the controller ofthe MATSim will define a circle around the previous activitylocation with a certain radius (the radius is represented as 119877)and the agent will randomly choose a facility for shopping In

Mathematical Problems in Engineering 7

Previous activity locationNearby facilities for shopping

R

Figure 4 Schematic diagram of randomly assigning each activity toa facility

real life inhabitants will tend to choose a nearer school foreducation choose a nearer shopmarket for shopping andso on So the concept of the searching method seems to berealistic The 119877 was set to 3 km according to Baodingrsquos sizepopulation and so on The schematic diagram is showed inFigure 4

Step 5-3 generate the start and end time of each activityon the basis of activity duration For example the end time ofthe previous activity is 119875endtime and the duration of the nextperformed activity is 119879duration then the Gaussian function isused to generate the next activityrsquos end time and the equationis as follows

119879endtime = 119875endtime + 119879duration + Gaussian sdot 3600 (7)

where 119879endtime is the end time of the next activity Gaussianrepresents the rand number generated based on Gaussiandistribution whose mean is 0 and the standard deviation is1

When all the above steps are completed the initial plan isfinally created

43 Count Data Inputting count data toMATSim is a typicalway to check whether the simulation of travel behavior isrealistic In this paper six count stationsrsquo data will be usedThe count data is obtained by an artificial methodThe surveytime is at May 10 2007 from 700 AM to 900 AM

44 Simulation Configuration In this paper two differentsimulation scenarios will be built up

(i) Scenario 1 10 of all agents carry out Reroute(ii) Scenario 2 10 of all agents will carry out Time

Allocation Mutator but these agents will also carryout Reroute after time changes

0102030405060708090

100

00000 50000 100000 150000 200000

The n

umbe

r of c

ars

Time of day

RerouteTime Allocation Mutator

Figure 5 Comparison of the number of departures of cars betweentwo scenarios

Other simulation configurations of the above three sce-narios are the same

(i) The number of the plans stored in each agentrsquosmemory is limited to 5

(ii) 10 of all agents will randomly select an existing plan(iii) The remaining 70 of all agents will select an existing

plan based on the plan scores(iv) The number of iterations will be set to 50(v) The ldquoQSimrdquo module will be used for mobility simula-

tion

5 Results and Discussion

Simulation results of the two different scenarios will bediscussed in the following aspects

(i) Comparison of the Number of Departures and Arrivals ofCars between Two Scenarios Figures 5 and 6 show the numberof departures and arrivals of cars between the two scenariosrespectively Both figures have the same trend which hastwo peaks The two peaks occur around 800 and 1800respectively In addition in terms of Figure 4 the first peak ofScenario 2 (Time Allocation Mutator) is lower than Scenario1 (Reroute) and the number of cars of Scenario 2 is higherthan Scenario 1 from 500AM to 800AM which indicatesthat some agents advance their departure time to avoid hightraffic volume during the peak time Figure 5 has the sametrend as Figure 4 due to the same reason

(ii) Comparison of the Evolution of the Average Best Score andAverage Executed Score for the Two Scenarios Figures 7 and8 demonstrate the average executed score and average bestscore of two scenarios respectively and they also have thesame trend The score of Scenario 1 which only carries outReroute keeps invariant from iteration 0 and iteration 50 inboth figures while the score of Scenario 2 which carries outTime Allocation Mutator has an increasing trend in both

8 Mathematical Problems in Engineering

Table 1 Bias and error of two scenarios

Time period Biaserror Scenario 1 (Reroute) Scenario 2 (Time Allocation Mutator)

700-800AM

Mean absolute bias minus24 minus147Mean absolute error 158 204Mean relative bias minus075 minus2404Mean relative error 3209 3791

800-900AM

Mean absolute bias minus45 minus222Mean absolute error 252 281Mean relative bias 641 minus2557Mean relative error 4400 4129

700ndash900AM

Mean absolute bias minus35 minus185Mean absolute error 205 243Mean relative bias 283 minus2480Mean relative error 3805 3960

0

20

40

60

80

100

120

00000 50000 100000 150000 200000Time of day

RerouteTime Allocation Mutator

The n

umbe

r of c

ars

Figure 6 Comparison of the number of arrivals of cars between twoscenarios

135

140

145

150

155

160

0 5 10 15 20 25 30 35 40 45 50

Scor

e

Iteration

RerouteTime Allocation Mutator

Figure 7 Comparison of the evolution of the average executed scorefor the two scenarios

figures According to the trendmentioned above we can con-clude that Reroute does not improve the agentsrsquo performancewhile Time Allocation Mutator has a significantly beneficialinfluence on the performance of agentsThe reasonwhy score

130

135

140

145

150

155

160

165

0 5 10 15 20 25 30 35 40 45 50

Scor

e

Iteration

RerouteTime Allocation Mutator

Figure 8 Comparison of the evolution of the average best score forthe two scenarios

of Scenario 1 remains the same is that agents cannot improvetheir performance through changing their routes

(iii) Comparison of the Simulated Data and the Count Dataof the Two Scenarios The comparison between the simulateddata and count data of the two scenarios is presented inFigure 9 Figures 9(a) 9(b) 9(c) and 9(d) demonstrate thecomparison in Scenario 1 at 7-8AM in Scenario 2 at 700-800AM in Scenario 1 at 800-900AM and in Scenario2 at 800-900AM respectively The bias and error of thesimulation results are summarized in Table 1 The meanabsolute bias mean absolute error mean relative bias andmean relative error are jointly used to check the simulationresults The equations to calculate the above indicators are asfollows

(i) mean absolute bias

119864 =1

119899sum(119902simulated minus 119902counted) (8)

Mathematical Problems in Engineering 9

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

Simulated data

7-8 AM

Y = X

Y = 2X

Y = 2X

(a) Simulated data versus count data at 700-800AM (Simulation withReroute only)

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

Simulated data

7-8 AM

Y = X

Y = 2X

Y = 2X

(b) Simulated data versus count data at 700-800AM (Simulation with TimeAllocation Mutator)

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

8-9 AM

Y = X

Y = 2X

Y = 2X

Simulated data

(c) Simulated data versus count data at 800-900AM (Simulation withReroute only)

10

100

1000

10000

Cou

nt d

ata

10 100 1000 10000Simulated data

8-9 AM

Y = X

Y = 2X

Y = 2X

(d) Simulated data versus count data at 800-900AM (Simulation with TimeAllocation Mutator)

Figure 9 Comparison between simulated data and count data

(ii) mean absolute error

|119864| =1

119899sum(

1003816100381610038161003816119902simulated minus 119902counted1003816100381610038161003816)

(9)

(iii) mean relative bias

119890 =1

119899sum(

119902simulated minus 119902counted119902counted

) (10)

(iv) mean relative error

|119890| =1

119899sum(

10038161003816100381610038161003816100381610038161003816

119902simulated minus 119902counted119902counted

10038161003816100381610038161003816100381610038161003816

) (11)

In terms of mean relative error which is commonly usedfor validating the accuracy of simulation the accuracy ofScenario 1 (3805) is close to Scenario 2 (3960) at 700ndash900AM In addition from 700AM to 800AM the mean

10 Mathematical Problems in Engineering

relative error of Scenario 1 (3209) is lower than Scenario 2(3791) while the mean relative error of Scenario 1 (44) ishigher than Scenario 2 (4129) from 800AM to 900AMthus Time Allocation Mutator does not perform better thanReroute in terms of simulation accuracy

6 Conclusions

This paper implements the agent-based simulation of travelbehavior in a medium-sized city in China and the mainachievements of this paper are as follows

(i) A detailed simulation structure which includes avariety of modules is introduced

(ii) Successfully realizing the simulation of travel behav-ior under a condition of limited survey data besidesa framework of preparing the input data is presented

(iii) Simulating the travel behavior of residents in amedium-sized city in China by MATSim was seldomdone in previous studies

However the above achievement is only a basic simula-tion work In the near future the related work below will becarried out

(i) This paper only simulates the travel behavior ofresident whose travel mode is car so other modes willbe added to the simulation scenario to check whetheragent-based simulation results are still realistic

(ii) A large-scale agent-based simulation will be carriedout in a Chinese metropolis such as Beijing Shang-hai on Guangzhou

(iii) Optimize the modules in MATSim to improve itssimulation precision and computing time

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This research was supported by the National Basic ResearchProgram of China (no 2012CB725403) the National Natu-ral Science Foundation of China (nos 51338008 7121000151178032) and the Fundamental Research Funds for theCentral Universities (no 2012YJS069)

References

[1] M Balmer Travel demand modeling for multi-agent trafficsimulations algorithms and systems [MS thesis] ETH ZurichZurich Switzerland 2007

[2] B Raney N Cetin A Vollmy et al ldquoAn agent-basedmicrosim-ulationmodel of Swiss travel first resultsrdquoNetworks and SpatialEconomics vol 3 no 1 pp 23ndash41 2003

[3] B Yu and Z Z Yang ldquoAn ant colony optimization model theperiod vehicle routing problem with time windowsrdquo Trans-portation Research E vol 47 no 2 pp 166ndash181 2011

[4] B Yu Z Yang K Chen andB Yu ldquoHybridmodel for predictionof bus arrival times at next stationrdquo Journal of AdvancedTransportation vol 44 no 3 pp 193ndash204 2010

[5] Y Bin Y Zhongzhen and Y Baozhen ldquoBus arrival timeprediction using support vector machinesrdquo Journal of IntelligentTransportation Systems vol 10 no 4 pp 151ndash158 2006

[6] B Yao P Hu M Zhang et al ldquoArtificial bee colony algorithmwith scanning strategy for periodic vehicle routing problemrdquoSimulation vol 89 no 6 pp 762ndash770 2013

[7] M Florian M Mahut and N Tremblay ldquoApplication of asimulation-based dynamic traffic assignment modelrdquo EuropeanJournal of Operational Research vol 189 no 3 pp 1381ndash13922008

[8] G Bellei GGentile andN Papola ldquoAwithin-day dynamic traf-fic assignment model for urban road networksrdquo TransportationResearch B vol 39 no 1 pp 1ndash29 2005

[9] J C Munoz and J A Laval ldquoSystem optimum dynamic trafficassignment graphical solution method for a congested freewayand one destinationrdquo Transportation Research B vol 40 no 1pp 1ndash15 2006

[10] W Y Szeto Y Jiang and A Sumalee ldquoA cell-based modelfor multi-class doubly stochastic dynamic traffic assignmentrdquoComputer-Aided Civil and Infrastructure Engineering vol 26no 8 pp 595ndash611 2011

[11] I Juran J N Prashker S Bekhor and I Ishai ldquoA dynamic trafficassignment model for the assessment of moving bottlenecksrdquoTransportation Research C vol 17 no 3 pp 240ndash258 2009

[12] C Antoniou M Ben-Akiva and H N Koutsopoulos ldquoNon-linear Kalman filtering algorithms for on-line calibration ofdynamic traffic assignment modelsrdquo IEEE Transactions onIntelligent Transportation Systems vol 8 no 4 pp 661ndash6702007

[13] G Gentile L Meschini and N Papola ldquoSpillback congestionin dynamic traffic assignment a macroscopic flow model withtime-varying bottlenecksrdquo Transportation Research B vol 41no 10 pp 1114ndash1138 2007

[14] B Yao C Yang J Hu J Yao and J Sun ldquoAn improved antcolony optimization for flexible job shop scheduling problemsrdquoAdvanced Science Letters vol 4 no 6-7 pp 2127ndash2131 2011

[15] B Yu Z Yang and S Li ldquoReal-time partway deadheadingstrategy based on transit service reliability assessmentrdquo Trans-portation Research A vol 46 no 8 pp 1265ndash1279 2012

[16] W Davidson R Donnelly P Vovsha et al ldquoSynthesis of firstpractices and operational research approaches in activity-basedtravel demandmodelingrdquoTransportationResearchA vol 41 no5 pp 464ndash488 2007

[17] M Hatzopoulou and E J Miller ldquoLinking an activity-basedtravel demand model with traffic emission and dispersionmodels transportrsquos contribution to air pollution in TorontordquoTransportation Research D vol 15 no 6 pp 315ndash325 2010

[18] X Dong M E Ben-Akiva J L Bowman and J L WalkerldquoMoving from trip-based to activity-based measures of acces-sibilityrdquo Transportation Research A vol 40 no 2 pp 163ndash1802006

[19] W Recker J Duan and H Wang ldquoDevelopment of an esti-mation procedure for an activity-based travel demand modelrdquoComputer-Aided Civil and Infrastructure Engineering vol 23no 7 pp 483ndash501 2008

[20] J E Kang and W W Recker ldquoAn activity-based assessmentof the potential impacts of plug-in hybrid electric vehicles onenergy and emissions using 1-day travel datardquo TransportationResearch D vol 14 no 8 pp 541ndash556 2009

Mathematical Problems in Engineering 11

[21] R M Pendyala R Kitamura A Kikuchi T Yamamoto andS Fujii ldquoFlorida activity mobility simulator overview andpreliminary validation resultsrdquo Transportation Research Recordno 1921 pp 123ndash130 2005

[22] S Yagi and A K Mohammadian ldquoAn activity-based microsim-ulation model of travel demand in the Jakarta Metropolitanareardquo Journal of Choice Modelling vol 3 no 1 pp 32ndash57 2010

[23] B YuWHK Lam andM L Tam ldquoBus arrival time predictionat bus stopwithmultiple routesrdquoTransportation Research C vol19 no 6 pp 1157ndash1170 2011

[24] B Yu Z Yang and B Yao ldquoAn improved ant colony opti-mization for vehicle routing problemrdquo European Journal ofOperational Research vol 196 no 1 pp 171ndash176 2009

[25] M Rieser K Nagel U Beuck M Balmer and J RumenappldquoAgent-oriented coupling of activity-based demand generationwith multiagent traffic simulationrdquo Transportation ResearchRecord vol 2021 no 1 pp 10ndash17 2007

[26] M Balmer KMeisterM Rieser K Nagel andKWAxhausenldquoAgent-based simulation of travel demand structure and com-putational performance of MATSim-Trdquo in Proceedings of the2nd TRB Conference on Innovations in Travel Modeling IVTInstitut fur Verkehrsplanung und Transportsysteme PortlandOre USA June 2008

[27] M Balmer M Rieser K Meister et al ldquoMatsim-T architectureand simulation timesrdquo in Multi-Agent Systems for Traffic andTransportation Engineering pp 57ndash78 2009

[28] A Horni D M Scott M Balmer and K W Axhausen ldquoLoca-tion choice modeling for shopping and leisure activities withMATSim combining microsimulation and time geographyrdquoTransportation Research Record no 2135 pp 87ndash95 2009

[29] D Grether Y Chen M Rieser et al ldquoEffects of a simple modechoicemodel in a large-scale agent-based transport simulationrdquoin Complexity and Spatial Networks pp 167ndash186 SpringerBerlin Germany 2009

[30] W Gao M Balmer and E J Miller ldquoComparison of MATSimand EMME2 on greater toronto and hamilton area networkCanadardquo Transportation Research Record no 2197 pp 118ndash1282010

[31] T W Nicolai L Wang K Nagel et al ldquoCoupling an urbansimulation model with a travel model-a first sensitivity testrdquoin Proceedings of the Computers in Urban Planning and UrbanManagement (CUPUM rsquo11) pp 11ndash07 Also VSP WP LakeLouise Canada 2011

[32] R A Waraich and K W Axhausen ldquoAgent-based parkingchoice modelrdquo Transportation Research Record vol 2319 no 1pp 39ndash46 2012

[33] J W Joubert P J Fourie and K W Axhausen ldquoLarge-scaleagent-based combined traffic simulation of private cars andcommercial vehiclesrdquo Transportation Research Record no 2168pp 24ndash32 2010

[34] D Charypar and K Nagel ldquoGenerating complete all-day activ-ity plans with genetic algorithmsrdquo Transportation vol 32 no 4pp 369ndash397 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 5: Research Article An Initial Implementation of Multiagent ...downloads.hindawi.com/journals/mpe/2014/980623.pdf · Research Article An Initial Implementation of Multiagent Simulation

Mathematical Problems in Engineering 5

ltperson id=ldquo682rdquo age=ldquo30rdquo employed=ldquoyesrdquogtltplan selected=ldquoyesrdquogtltact type=ldquoh9rdquo facility=ldquo1593rdquo x=ldquo36540169341762rdquo y=ldquo430066448060939rdquo end time=ldquo093927rdquo gtltleg mode=ldquocarrdquo dep time=ldquo093927rdquogtltleggtltact type=ldquow3rdquo facility=ldquo313rdquo x=ldquo36584321376734rdquo y=ldquo43060320981801rdquo end time=ldquo135224rdquo gtltleg mode=ldquocarrdquo dep time=ldquo135224rdquogtltleggtltact type=ldquoh1rdquo facility=ldquo1593rdquo x=ldquo36540169341762rdquo y=ldquo430066448060939rdquo end time=ldquo152130rdquo gtltleg mode=ldquocarrdquo dep time=ldquo152130rdquogtltleggtltact type=ldquow3rdquo facility=ldquo313rdquo x=ldquo36584321376734rdquo y=ldquo43060320981801rdquo end time=ldquo174127rdquo gtltleg mode=ldquocarrdquo dep time=ldquo174127rdquogtltleggtltact type=ldquoh9rdquo facility=ldquo1593rdquo x=ldquo36540169341762rdquo y=ldquo430066448060939rdquo gt

ltplangtltpersongt

Algorithm 1 An example of a typical initial plan

41 Scenario Description

411 A Brief Introduction of Baoding This paper will takeBaoding as an example to simulate a medium-sized cityin China Baoding which is located in Hebei Provinceis made up of one main urban area and four counties(Mancheng County Xushi County Anxin County andQingyuan County) This paper will only simulate the travelbehavior of inhabitants in the main urban area The mainurban area of Baoding has a population of 106 million

412 Activity Chains and Their Distribution In this paperonly the resident driving private car is simulated Based onthe census 2007 of Baoding the activity is classified into fivetypes home work shop education and leisure The analysisresults show that home-work-home and home-work-home-work-home are the most common patterns and the averagelength of the activity chains is close to 3

413 Network Preparation The simulation network of Baod-ing is prepared through OpenMapStreet and it includes 502nodes and 1474 links The link attributes contain lengthcapacity free speed lanes modes and so forth The roadnetwork is showed by Figure 2

42 Initial Demand Preparation The modeling of the initialdemand can be split up into several steps depending on theavailable raw data and the plannerrsquos needs But an initial planshould at least include the following information

(i) Activity locationwhich is given as a set of coordinates(ii) Assigned departure times and arrival times for every

activity(iii) A travel leg among two activities in this paper the

mode is set as car

Algorithm 1 shows a typical initial plan It includesattributes of the person and his initial plan The attributes

Figure 2 Road network of Baoding

are made up of ID age and employment statues The initialplan is made up of 5 activities and they are home workhome work and home in sequence which are set as variableof act type Take the first activity for example the activitylocation is in the facility with ID of 1593 and its coordinate isrepresented by variables of 119909 and119910 and besides the end timeof the activity is represented by variable of end time The legmode and dep time are used to describe themode the personchooses and time the people leaving the facility

Different available data need different processes to pre-pare an initial data Figure 3 shows a detailed preparingprocess based on the available data of BaodingThe process ismainly made up of three parts

Part 1 List All the Available Data for Simulation Part 1 onlycontains one step namely step 1 To check all the available

6 Mathematical Problems in Engineering

Step 1 list available data for simulation

Step 2 generateMATSim population

Step 4 generate facility location

Step 3 generate true plan

MATSimPoptxt Facilityxml

Census Map

TPlanxml

Step 5 generate initial plan

Part 1

Part 2

Part 3

IPlanstxt

Step 1-5 copy information from

TPlanxml to MASTimPopptxt

Step 2-5 assign each activity to a

facility

Step 3-5 generate start

and end time of each activity

Figure 3 The process of preparing the initial data

data and make better use of them is a vital step in thesimulation Take Baoding for example the available dataare the census 2007 of Baoding and the map of Baoding in2007 The census sample includes 2267 personsrsquo daily planbut the number of persons whose travel mode is car is 93which is extremely small Each daily plan includes trip origintrip destination starting time ending time activity type andtravelling leg But unfortunately the data of trip origin anddestination are in traffic zone level which cannot be directlyapplied to agent-based simulation and should be adjustedThe map of Baoding in 2007 comprises the available facilitiesfor performing activities such as shopping leisure andwork

Part 2 Prepare Data for Generating Initial Plan Part 2 is madeup of step 2 step 3 and step 4

In step 2 since the survey sample is really small theMATSim population is synthesized on the basis of censusMTSim population includes a few persons (agents) whoseinformation only includes age home location and worklocation and all the above information is stored in MATSim-Poptxt which will be used for generating initial plan

In step 3 generate a true plan file (TPlanxml) whichcontains a handful of plans whose travel mode was car basedon the census 2007 of Baoding The following information isincluded person ID trip ID origin coordinates destinationcoordinates activity duration and activity type Note thatthe trip origin and destination are in traffic zone level so arandom assigning method was used for selecting a locationfor performing activities

In step 4 prepare the available facilities for perform-ing activities that is getting the exact location type and

attributes of facilities All the information was saved inFactilitiesxml There were five facility types correspondingto five activity types The numbers of facilities for shop-ping education leisure work and home are 256 51 478912 and 1321 respectively In addition before the facilitieslocation is determined the coordination transform shouldbe discussed WGS84-coordinates are widely used like GPSdata OpenStreetMap data and Google earth data For thedistance calculation inWGS84-coordinates (or any sphericalcoordinates) is rather complex in MATSim the coordinatesshould be converted into another coordinate reference system(CRS) This paper chooses the UTM (Universal TransverseMercartor Grid System) as the coordinate used in MATSimAccording to the UTM global zoning Baoding is located inthe zone 50N and its EPSG code is 32650

Part 3 Generating Initial Plan After preparing the requireddata (MATSimPoptxt TPlanxml and Factilitiesxml) in Part2 generating initial plan would be conducted

Step 5-1 copy all the information from a true plan whichis stored in TPlanxml to the plan of each agent who madeup the MATSim population except for the location of eachactivity

Step 5-2 randomly assign each activity to a facility basedonnearby searchingmethod thus the location of each activitycan be generatedThe detailed searchingmethod is describedwith an example as follows Assume that an agent ends itsprevious activity and goes shopping next the controller ofthe MATSim will define a circle around the previous activitylocation with a certain radius (the radius is represented as 119877)and the agent will randomly choose a facility for shopping In

Mathematical Problems in Engineering 7

Previous activity locationNearby facilities for shopping

R

Figure 4 Schematic diagram of randomly assigning each activity toa facility

real life inhabitants will tend to choose a nearer school foreducation choose a nearer shopmarket for shopping andso on So the concept of the searching method seems to berealistic The 119877 was set to 3 km according to Baodingrsquos sizepopulation and so on The schematic diagram is showed inFigure 4

Step 5-3 generate the start and end time of each activityon the basis of activity duration For example the end time ofthe previous activity is 119875endtime and the duration of the nextperformed activity is 119879duration then the Gaussian function isused to generate the next activityrsquos end time and the equationis as follows

119879endtime = 119875endtime + 119879duration + Gaussian sdot 3600 (7)

where 119879endtime is the end time of the next activity Gaussianrepresents the rand number generated based on Gaussiandistribution whose mean is 0 and the standard deviation is1

When all the above steps are completed the initial plan isfinally created

43 Count Data Inputting count data toMATSim is a typicalway to check whether the simulation of travel behavior isrealistic In this paper six count stationsrsquo data will be usedThe count data is obtained by an artificial methodThe surveytime is at May 10 2007 from 700 AM to 900 AM

44 Simulation Configuration In this paper two differentsimulation scenarios will be built up

(i) Scenario 1 10 of all agents carry out Reroute(ii) Scenario 2 10 of all agents will carry out Time

Allocation Mutator but these agents will also carryout Reroute after time changes

0102030405060708090

100

00000 50000 100000 150000 200000

The n

umbe

r of c

ars

Time of day

RerouteTime Allocation Mutator

Figure 5 Comparison of the number of departures of cars betweentwo scenarios

Other simulation configurations of the above three sce-narios are the same

(i) The number of the plans stored in each agentrsquosmemory is limited to 5

(ii) 10 of all agents will randomly select an existing plan(iii) The remaining 70 of all agents will select an existing

plan based on the plan scores(iv) The number of iterations will be set to 50(v) The ldquoQSimrdquo module will be used for mobility simula-

tion

5 Results and Discussion

Simulation results of the two different scenarios will bediscussed in the following aspects

(i) Comparison of the Number of Departures and Arrivals ofCars between Two Scenarios Figures 5 and 6 show the numberof departures and arrivals of cars between the two scenariosrespectively Both figures have the same trend which hastwo peaks The two peaks occur around 800 and 1800respectively In addition in terms of Figure 4 the first peak ofScenario 2 (Time Allocation Mutator) is lower than Scenario1 (Reroute) and the number of cars of Scenario 2 is higherthan Scenario 1 from 500AM to 800AM which indicatesthat some agents advance their departure time to avoid hightraffic volume during the peak time Figure 5 has the sametrend as Figure 4 due to the same reason

(ii) Comparison of the Evolution of the Average Best Score andAverage Executed Score for the Two Scenarios Figures 7 and8 demonstrate the average executed score and average bestscore of two scenarios respectively and they also have thesame trend The score of Scenario 1 which only carries outReroute keeps invariant from iteration 0 and iteration 50 inboth figures while the score of Scenario 2 which carries outTime Allocation Mutator has an increasing trend in both

8 Mathematical Problems in Engineering

Table 1 Bias and error of two scenarios

Time period Biaserror Scenario 1 (Reroute) Scenario 2 (Time Allocation Mutator)

700-800AM

Mean absolute bias minus24 minus147Mean absolute error 158 204Mean relative bias minus075 minus2404Mean relative error 3209 3791

800-900AM

Mean absolute bias minus45 minus222Mean absolute error 252 281Mean relative bias 641 minus2557Mean relative error 4400 4129

700ndash900AM

Mean absolute bias minus35 minus185Mean absolute error 205 243Mean relative bias 283 minus2480Mean relative error 3805 3960

0

20

40

60

80

100

120

00000 50000 100000 150000 200000Time of day

RerouteTime Allocation Mutator

The n

umbe

r of c

ars

Figure 6 Comparison of the number of arrivals of cars between twoscenarios

135

140

145

150

155

160

0 5 10 15 20 25 30 35 40 45 50

Scor

e

Iteration

RerouteTime Allocation Mutator

Figure 7 Comparison of the evolution of the average executed scorefor the two scenarios

figures According to the trendmentioned above we can con-clude that Reroute does not improve the agentsrsquo performancewhile Time Allocation Mutator has a significantly beneficialinfluence on the performance of agentsThe reasonwhy score

130

135

140

145

150

155

160

165

0 5 10 15 20 25 30 35 40 45 50

Scor

e

Iteration

RerouteTime Allocation Mutator

Figure 8 Comparison of the evolution of the average best score forthe two scenarios

of Scenario 1 remains the same is that agents cannot improvetheir performance through changing their routes

(iii) Comparison of the Simulated Data and the Count Dataof the Two Scenarios The comparison between the simulateddata and count data of the two scenarios is presented inFigure 9 Figures 9(a) 9(b) 9(c) and 9(d) demonstrate thecomparison in Scenario 1 at 7-8AM in Scenario 2 at 700-800AM in Scenario 1 at 800-900AM and in Scenario2 at 800-900AM respectively The bias and error of thesimulation results are summarized in Table 1 The meanabsolute bias mean absolute error mean relative bias andmean relative error are jointly used to check the simulationresults The equations to calculate the above indicators are asfollows

(i) mean absolute bias

119864 =1

119899sum(119902simulated minus 119902counted) (8)

Mathematical Problems in Engineering 9

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

Simulated data

7-8 AM

Y = X

Y = 2X

Y = 2X

(a) Simulated data versus count data at 700-800AM (Simulation withReroute only)

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

Simulated data

7-8 AM

Y = X

Y = 2X

Y = 2X

(b) Simulated data versus count data at 700-800AM (Simulation with TimeAllocation Mutator)

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

8-9 AM

Y = X

Y = 2X

Y = 2X

Simulated data

(c) Simulated data versus count data at 800-900AM (Simulation withReroute only)

10

100

1000

10000

Cou

nt d

ata

10 100 1000 10000Simulated data

8-9 AM

Y = X

Y = 2X

Y = 2X

(d) Simulated data versus count data at 800-900AM (Simulation with TimeAllocation Mutator)

Figure 9 Comparison between simulated data and count data

(ii) mean absolute error

|119864| =1

119899sum(

1003816100381610038161003816119902simulated minus 119902counted1003816100381610038161003816)

(9)

(iii) mean relative bias

119890 =1

119899sum(

119902simulated minus 119902counted119902counted

) (10)

(iv) mean relative error

|119890| =1

119899sum(

10038161003816100381610038161003816100381610038161003816

119902simulated minus 119902counted119902counted

10038161003816100381610038161003816100381610038161003816

) (11)

In terms of mean relative error which is commonly usedfor validating the accuracy of simulation the accuracy ofScenario 1 (3805) is close to Scenario 2 (3960) at 700ndash900AM In addition from 700AM to 800AM the mean

10 Mathematical Problems in Engineering

relative error of Scenario 1 (3209) is lower than Scenario 2(3791) while the mean relative error of Scenario 1 (44) ishigher than Scenario 2 (4129) from 800AM to 900AMthus Time Allocation Mutator does not perform better thanReroute in terms of simulation accuracy

6 Conclusions

This paper implements the agent-based simulation of travelbehavior in a medium-sized city in China and the mainachievements of this paper are as follows

(i) A detailed simulation structure which includes avariety of modules is introduced

(ii) Successfully realizing the simulation of travel behav-ior under a condition of limited survey data besidesa framework of preparing the input data is presented

(iii) Simulating the travel behavior of residents in amedium-sized city in China by MATSim was seldomdone in previous studies

However the above achievement is only a basic simula-tion work In the near future the related work below will becarried out

(i) This paper only simulates the travel behavior ofresident whose travel mode is car so other modes willbe added to the simulation scenario to check whetheragent-based simulation results are still realistic

(ii) A large-scale agent-based simulation will be carriedout in a Chinese metropolis such as Beijing Shang-hai on Guangzhou

(iii) Optimize the modules in MATSim to improve itssimulation precision and computing time

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This research was supported by the National Basic ResearchProgram of China (no 2012CB725403) the National Natu-ral Science Foundation of China (nos 51338008 7121000151178032) and the Fundamental Research Funds for theCentral Universities (no 2012YJS069)

References

[1] M Balmer Travel demand modeling for multi-agent trafficsimulations algorithms and systems [MS thesis] ETH ZurichZurich Switzerland 2007

[2] B Raney N Cetin A Vollmy et al ldquoAn agent-basedmicrosim-ulationmodel of Swiss travel first resultsrdquoNetworks and SpatialEconomics vol 3 no 1 pp 23ndash41 2003

[3] B Yu and Z Z Yang ldquoAn ant colony optimization model theperiod vehicle routing problem with time windowsrdquo Trans-portation Research E vol 47 no 2 pp 166ndash181 2011

[4] B Yu Z Yang K Chen andB Yu ldquoHybridmodel for predictionof bus arrival times at next stationrdquo Journal of AdvancedTransportation vol 44 no 3 pp 193ndash204 2010

[5] Y Bin Y Zhongzhen and Y Baozhen ldquoBus arrival timeprediction using support vector machinesrdquo Journal of IntelligentTransportation Systems vol 10 no 4 pp 151ndash158 2006

[6] B Yao P Hu M Zhang et al ldquoArtificial bee colony algorithmwith scanning strategy for periodic vehicle routing problemrdquoSimulation vol 89 no 6 pp 762ndash770 2013

[7] M Florian M Mahut and N Tremblay ldquoApplication of asimulation-based dynamic traffic assignment modelrdquo EuropeanJournal of Operational Research vol 189 no 3 pp 1381ndash13922008

[8] G Bellei GGentile andN Papola ldquoAwithin-day dynamic traf-fic assignment model for urban road networksrdquo TransportationResearch B vol 39 no 1 pp 1ndash29 2005

[9] J C Munoz and J A Laval ldquoSystem optimum dynamic trafficassignment graphical solution method for a congested freewayand one destinationrdquo Transportation Research B vol 40 no 1pp 1ndash15 2006

[10] W Y Szeto Y Jiang and A Sumalee ldquoA cell-based modelfor multi-class doubly stochastic dynamic traffic assignmentrdquoComputer-Aided Civil and Infrastructure Engineering vol 26no 8 pp 595ndash611 2011

[11] I Juran J N Prashker S Bekhor and I Ishai ldquoA dynamic trafficassignment model for the assessment of moving bottlenecksrdquoTransportation Research C vol 17 no 3 pp 240ndash258 2009

[12] C Antoniou M Ben-Akiva and H N Koutsopoulos ldquoNon-linear Kalman filtering algorithms for on-line calibration ofdynamic traffic assignment modelsrdquo IEEE Transactions onIntelligent Transportation Systems vol 8 no 4 pp 661ndash6702007

[13] G Gentile L Meschini and N Papola ldquoSpillback congestionin dynamic traffic assignment a macroscopic flow model withtime-varying bottlenecksrdquo Transportation Research B vol 41no 10 pp 1114ndash1138 2007

[14] B Yao C Yang J Hu J Yao and J Sun ldquoAn improved antcolony optimization for flexible job shop scheduling problemsrdquoAdvanced Science Letters vol 4 no 6-7 pp 2127ndash2131 2011

[15] B Yu Z Yang and S Li ldquoReal-time partway deadheadingstrategy based on transit service reliability assessmentrdquo Trans-portation Research A vol 46 no 8 pp 1265ndash1279 2012

[16] W Davidson R Donnelly P Vovsha et al ldquoSynthesis of firstpractices and operational research approaches in activity-basedtravel demandmodelingrdquoTransportationResearchA vol 41 no5 pp 464ndash488 2007

[17] M Hatzopoulou and E J Miller ldquoLinking an activity-basedtravel demand model with traffic emission and dispersionmodels transportrsquos contribution to air pollution in TorontordquoTransportation Research D vol 15 no 6 pp 315ndash325 2010

[18] X Dong M E Ben-Akiva J L Bowman and J L WalkerldquoMoving from trip-based to activity-based measures of acces-sibilityrdquo Transportation Research A vol 40 no 2 pp 163ndash1802006

[19] W Recker J Duan and H Wang ldquoDevelopment of an esti-mation procedure for an activity-based travel demand modelrdquoComputer-Aided Civil and Infrastructure Engineering vol 23no 7 pp 483ndash501 2008

[20] J E Kang and W W Recker ldquoAn activity-based assessmentof the potential impacts of plug-in hybrid electric vehicles onenergy and emissions using 1-day travel datardquo TransportationResearch D vol 14 no 8 pp 541ndash556 2009

Mathematical Problems in Engineering 11

[21] R M Pendyala R Kitamura A Kikuchi T Yamamoto andS Fujii ldquoFlorida activity mobility simulator overview andpreliminary validation resultsrdquo Transportation Research Recordno 1921 pp 123ndash130 2005

[22] S Yagi and A K Mohammadian ldquoAn activity-based microsim-ulation model of travel demand in the Jakarta Metropolitanareardquo Journal of Choice Modelling vol 3 no 1 pp 32ndash57 2010

[23] B YuWHK Lam andM L Tam ldquoBus arrival time predictionat bus stopwithmultiple routesrdquoTransportation Research C vol19 no 6 pp 1157ndash1170 2011

[24] B Yu Z Yang and B Yao ldquoAn improved ant colony opti-mization for vehicle routing problemrdquo European Journal ofOperational Research vol 196 no 1 pp 171ndash176 2009

[25] M Rieser K Nagel U Beuck M Balmer and J RumenappldquoAgent-oriented coupling of activity-based demand generationwith multiagent traffic simulationrdquo Transportation ResearchRecord vol 2021 no 1 pp 10ndash17 2007

[26] M Balmer KMeisterM Rieser K Nagel andKWAxhausenldquoAgent-based simulation of travel demand structure and com-putational performance of MATSim-Trdquo in Proceedings of the2nd TRB Conference on Innovations in Travel Modeling IVTInstitut fur Verkehrsplanung und Transportsysteme PortlandOre USA June 2008

[27] M Balmer M Rieser K Meister et al ldquoMatsim-T architectureand simulation timesrdquo in Multi-Agent Systems for Traffic andTransportation Engineering pp 57ndash78 2009

[28] A Horni D M Scott M Balmer and K W Axhausen ldquoLoca-tion choice modeling for shopping and leisure activities withMATSim combining microsimulation and time geographyrdquoTransportation Research Record no 2135 pp 87ndash95 2009

[29] D Grether Y Chen M Rieser et al ldquoEffects of a simple modechoicemodel in a large-scale agent-based transport simulationrdquoin Complexity and Spatial Networks pp 167ndash186 SpringerBerlin Germany 2009

[30] W Gao M Balmer and E J Miller ldquoComparison of MATSimand EMME2 on greater toronto and hamilton area networkCanadardquo Transportation Research Record no 2197 pp 118ndash1282010

[31] T W Nicolai L Wang K Nagel et al ldquoCoupling an urbansimulation model with a travel model-a first sensitivity testrdquoin Proceedings of the Computers in Urban Planning and UrbanManagement (CUPUM rsquo11) pp 11ndash07 Also VSP WP LakeLouise Canada 2011

[32] R A Waraich and K W Axhausen ldquoAgent-based parkingchoice modelrdquo Transportation Research Record vol 2319 no 1pp 39ndash46 2012

[33] J W Joubert P J Fourie and K W Axhausen ldquoLarge-scaleagent-based combined traffic simulation of private cars andcommercial vehiclesrdquo Transportation Research Record no 2168pp 24ndash32 2010

[34] D Charypar and K Nagel ldquoGenerating complete all-day activ-ity plans with genetic algorithmsrdquo Transportation vol 32 no 4pp 369ndash397 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 6: Research Article An Initial Implementation of Multiagent ...downloads.hindawi.com/journals/mpe/2014/980623.pdf · Research Article An Initial Implementation of Multiagent Simulation

6 Mathematical Problems in Engineering

Step 1 list available data for simulation

Step 2 generateMATSim population

Step 4 generate facility location

Step 3 generate true plan

MATSimPoptxt Facilityxml

Census Map

TPlanxml

Step 5 generate initial plan

Part 1

Part 2

Part 3

IPlanstxt

Step 1-5 copy information from

TPlanxml to MASTimPopptxt

Step 2-5 assign each activity to a

facility

Step 3-5 generate start

and end time of each activity

Figure 3 The process of preparing the initial data

data and make better use of them is a vital step in thesimulation Take Baoding for example the available dataare the census 2007 of Baoding and the map of Baoding in2007 The census sample includes 2267 personsrsquo daily planbut the number of persons whose travel mode is car is 93which is extremely small Each daily plan includes trip origintrip destination starting time ending time activity type andtravelling leg But unfortunately the data of trip origin anddestination are in traffic zone level which cannot be directlyapplied to agent-based simulation and should be adjustedThe map of Baoding in 2007 comprises the available facilitiesfor performing activities such as shopping leisure andwork

Part 2 Prepare Data for Generating Initial Plan Part 2 is madeup of step 2 step 3 and step 4

In step 2 since the survey sample is really small theMATSim population is synthesized on the basis of censusMTSim population includes a few persons (agents) whoseinformation only includes age home location and worklocation and all the above information is stored in MATSim-Poptxt which will be used for generating initial plan

In step 3 generate a true plan file (TPlanxml) whichcontains a handful of plans whose travel mode was car basedon the census 2007 of Baoding The following information isincluded person ID trip ID origin coordinates destinationcoordinates activity duration and activity type Note thatthe trip origin and destination are in traffic zone level so arandom assigning method was used for selecting a locationfor performing activities

In step 4 prepare the available facilities for perform-ing activities that is getting the exact location type and

attributes of facilities All the information was saved inFactilitiesxml There were five facility types correspondingto five activity types The numbers of facilities for shop-ping education leisure work and home are 256 51 478912 and 1321 respectively In addition before the facilitieslocation is determined the coordination transform shouldbe discussed WGS84-coordinates are widely used like GPSdata OpenStreetMap data and Google earth data For thedistance calculation inWGS84-coordinates (or any sphericalcoordinates) is rather complex in MATSim the coordinatesshould be converted into another coordinate reference system(CRS) This paper chooses the UTM (Universal TransverseMercartor Grid System) as the coordinate used in MATSimAccording to the UTM global zoning Baoding is located inthe zone 50N and its EPSG code is 32650

Part 3 Generating Initial Plan After preparing the requireddata (MATSimPoptxt TPlanxml and Factilitiesxml) in Part2 generating initial plan would be conducted

Step 5-1 copy all the information from a true plan whichis stored in TPlanxml to the plan of each agent who madeup the MATSim population except for the location of eachactivity

Step 5-2 randomly assign each activity to a facility basedonnearby searchingmethod thus the location of each activitycan be generatedThe detailed searchingmethod is describedwith an example as follows Assume that an agent ends itsprevious activity and goes shopping next the controller ofthe MATSim will define a circle around the previous activitylocation with a certain radius (the radius is represented as 119877)and the agent will randomly choose a facility for shopping In

Mathematical Problems in Engineering 7

Previous activity locationNearby facilities for shopping

R

Figure 4 Schematic diagram of randomly assigning each activity toa facility

real life inhabitants will tend to choose a nearer school foreducation choose a nearer shopmarket for shopping andso on So the concept of the searching method seems to berealistic The 119877 was set to 3 km according to Baodingrsquos sizepopulation and so on The schematic diagram is showed inFigure 4

Step 5-3 generate the start and end time of each activityon the basis of activity duration For example the end time ofthe previous activity is 119875endtime and the duration of the nextperformed activity is 119879duration then the Gaussian function isused to generate the next activityrsquos end time and the equationis as follows

119879endtime = 119875endtime + 119879duration + Gaussian sdot 3600 (7)

where 119879endtime is the end time of the next activity Gaussianrepresents the rand number generated based on Gaussiandistribution whose mean is 0 and the standard deviation is1

When all the above steps are completed the initial plan isfinally created

43 Count Data Inputting count data toMATSim is a typicalway to check whether the simulation of travel behavior isrealistic In this paper six count stationsrsquo data will be usedThe count data is obtained by an artificial methodThe surveytime is at May 10 2007 from 700 AM to 900 AM

44 Simulation Configuration In this paper two differentsimulation scenarios will be built up

(i) Scenario 1 10 of all agents carry out Reroute(ii) Scenario 2 10 of all agents will carry out Time

Allocation Mutator but these agents will also carryout Reroute after time changes

0102030405060708090

100

00000 50000 100000 150000 200000

The n

umbe

r of c

ars

Time of day

RerouteTime Allocation Mutator

Figure 5 Comparison of the number of departures of cars betweentwo scenarios

Other simulation configurations of the above three sce-narios are the same

(i) The number of the plans stored in each agentrsquosmemory is limited to 5

(ii) 10 of all agents will randomly select an existing plan(iii) The remaining 70 of all agents will select an existing

plan based on the plan scores(iv) The number of iterations will be set to 50(v) The ldquoQSimrdquo module will be used for mobility simula-

tion

5 Results and Discussion

Simulation results of the two different scenarios will bediscussed in the following aspects

(i) Comparison of the Number of Departures and Arrivals ofCars between Two Scenarios Figures 5 and 6 show the numberof departures and arrivals of cars between the two scenariosrespectively Both figures have the same trend which hastwo peaks The two peaks occur around 800 and 1800respectively In addition in terms of Figure 4 the first peak ofScenario 2 (Time Allocation Mutator) is lower than Scenario1 (Reroute) and the number of cars of Scenario 2 is higherthan Scenario 1 from 500AM to 800AM which indicatesthat some agents advance their departure time to avoid hightraffic volume during the peak time Figure 5 has the sametrend as Figure 4 due to the same reason

(ii) Comparison of the Evolution of the Average Best Score andAverage Executed Score for the Two Scenarios Figures 7 and8 demonstrate the average executed score and average bestscore of two scenarios respectively and they also have thesame trend The score of Scenario 1 which only carries outReroute keeps invariant from iteration 0 and iteration 50 inboth figures while the score of Scenario 2 which carries outTime Allocation Mutator has an increasing trend in both

8 Mathematical Problems in Engineering

Table 1 Bias and error of two scenarios

Time period Biaserror Scenario 1 (Reroute) Scenario 2 (Time Allocation Mutator)

700-800AM

Mean absolute bias minus24 minus147Mean absolute error 158 204Mean relative bias minus075 minus2404Mean relative error 3209 3791

800-900AM

Mean absolute bias minus45 minus222Mean absolute error 252 281Mean relative bias 641 minus2557Mean relative error 4400 4129

700ndash900AM

Mean absolute bias minus35 minus185Mean absolute error 205 243Mean relative bias 283 minus2480Mean relative error 3805 3960

0

20

40

60

80

100

120

00000 50000 100000 150000 200000Time of day

RerouteTime Allocation Mutator

The n

umbe

r of c

ars

Figure 6 Comparison of the number of arrivals of cars between twoscenarios

135

140

145

150

155

160

0 5 10 15 20 25 30 35 40 45 50

Scor

e

Iteration

RerouteTime Allocation Mutator

Figure 7 Comparison of the evolution of the average executed scorefor the two scenarios

figures According to the trendmentioned above we can con-clude that Reroute does not improve the agentsrsquo performancewhile Time Allocation Mutator has a significantly beneficialinfluence on the performance of agentsThe reasonwhy score

130

135

140

145

150

155

160

165

0 5 10 15 20 25 30 35 40 45 50

Scor

e

Iteration

RerouteTime Allocation Mutator

Figure 8 Comparison of the evolution of the average best score forthe two scenarios

of Scenario 1 remains the same is that agents cannot improvetheir performance through changing their routes

(iii) Comparison of the Simulated Data and the Count Dataof the Two Scenarios The comparison between the simulateddata and count data of the two scenarios is presented inFigure 9 Figures 9(a) 9(b) 9(c) and 9(d) demonstrate thecomparison in Scenario 1 at 7-8AM in Scenario 2 at 700-800AM in Scenario 1 at 800-900AM and in Scenario2 at 800-900AM respectively The bias and error of thesimulation results are summarized in Table 1 The meanabsolute bias mean absolute error mean relative bias andmean relative error are jointly used to check the simulationresults The equations to calculate the above indicators are asfollows

(i) mean absolute bias

119864 =1

119899sum(119902simulated minus 119902counted) (8)

Mathematical Problems in Engineering 9

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

Simulated data

7-8 AM

Y = X

Y = 2X

Y = 2X

(a) Simulated data versus count data at 700-800AM (Simulation withReroute only)

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

Simulated data

7-8 AM

Y = X

Y = 2X

Y = 2X

(b) Simulated data versus count data at 700-800AM (Simulation with TimeAllocation Mutator)

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

8-9 AM

Y = X

Y = 2X

Y = 2X

Simulated data

(c) Simulated data versus count data at 800-900AM (Simulation withReroute only)

10

100

1000

10000

Cou

nt d

ata

10 100 1000 10000Simulated data

8-9 AM

Y = X

Y = 2X

Y = 2X

(d) Simulated data versus count data at 800-900AM (Simulation with TimeAllocation Mutator)

Figure 9 Comparison between simulated data and count data

(ii) mean absolute error

|119864| =1

119899sum(

1003816100381610038161003816119902simulated minus 119902counted1003816100381610038161003816)

(9)

(iii) mean relative bias

119890 =1

119899sum(

119902simulated minus 119902counted119902counted

) (10)

(iv) mean relative error

|119890| =1

119899sum(

10038161003816100381610038161003816100381610038161003816

119902simulated minus 119902counted119902counted

10038161003816100381610038161003816100381610038161003816

) (11)

In terms of mean relative error which is commonly usedfor validating the accuracy of simulation the accuracy ofScenario 1 (3805) is close to Scenario 2 (3960) at 700ndash900AM In addition from 700AM to 800AM the mean

10 Mathematical Problems in Engineering

relative error of Scenario 1 (3209) is lower than Scenario 2(3791) while the mean relative error of Scenario 1 (44) ishigher than Scenario 2 (4129) from 800AM to 900AMthus Time Allocation Mutator does not perform better thanReroute in terms of simulation accuracy

6 Conclusions

This paper implements the agent-based simulation of travelbehavior in a medium-sized city in China and the mainachievements of this paper are as follows

(i) A detailed simulation structure which includes avariety of modules is introduced

(ii) Successfully realizing the simulation of travel behav-ior under a condition of limited survey data besidesa framework of preparing the input data is presented

(iii) Simulating the travel behavior of residents in amedium-sized city in China by MATSim was seldomdone in previous studies

However the above achievement is only a basic simula-tion work In the near future the related work below will becarried out

(i) This paper only simulates the travel behavior ofresident whose travel mode is car so other modes willbe added to the simulation scenario to check whetheragent-based simulation results are still realistic

(ii) A large-scale agent-based simulation will be carriedout in a Chinese metropolis such as Beijing Shang-hai on Guangzhou

(iii) Optimize the modules in MATSim to improve itssimulation precision and computing time

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This research was supported by the National Basic ResearchProgram of China (no 2012CB725403) the National Natu-ral Science Foundation of China (nos 51338008 7121000151178032) and the Fundamental Research Funds for theCentral Universities (no 2012YJS069)

References

[1] M Balmer Travel demand modeling for multi-agent trafficsimulations algorithms and systems [MS thesis] ETH ZurichZurich Switzerland 2007

[2] B Raney N Cetin A Vollmy et al ldquoAn agent-basedmicrosim-ulationmodel of Swiss travel first resultsrdquoNetworks and SpatialEconomics vol 3 no 1 pp 23ndash41 2003

[3] B Yu and Z Z Yang ldquoAn ant colony optimization model theperiod vehicle routing problem with time windowsrdquo Trans-portation Research E vol 47 no 2 pp 166ndash181 2011

[4] B Yu Z Yang K Chen andB Yu ldquoHybridmodel for predictionof bus arrival times at next stationrdquo Journal of AdvancedTransportation vol 44 no 3 pp 193ndash204 2010

[5] Y Bin Y Zhongzhen and Y Baozhen ldquoBus arrival timeprediction using support vector machinesrdquo Journal of IntelligentTransportation Systems vol 10 no 4 pp 151ndash158 2006

[6] B Yao P Hu M Zhang et al ldquoArtificial bee colony algorithmwith scanning strategy for periodic vehicle routing problemrdquoSimulation vol 89 no 6 pp 762ndash770 2013

[7] M Florian M Mahut and N Tremblay ldquoApplication of asimulation-based dynamic traffic assignment modelrdquo EuropeanJournal of Operational Research vol 189 no 3 pp 1381ndash13922008

[8] G Bellei GGentile andN Papola ldquoAwithin-day dynamic traf-fic assignment model for urban road networksrdquo TransportationResearch B vol 39 no 1 pp 1ndash29 2005

[9] J C Munoz and J A Laval ldquoSystem optimum dynamic trafficassignment graphical solution method for a congested freewayand one destinationrdquo Transportation Research B vol 40 no 1pp 1ndash15 2006

[10] W Y Szeto Y Jiang and A Sumalee ldquoA cell-based modelfor multi-class doubly stochastic dynamic traffic assignmentrdquoComputer-Aided Civil and Infrastructure Engineering vol 26no 8 pp 595ndash611 2011

[11] I Juran J N Prashker S Bekhor and I Ishai ldquoA dynamic trafficassignment model for the assessment of moving bottlenecksrdquoTransportation Research C vol 17 no 3 pp 240ndash258 2009

[12] C Antoniou M Ben-Akiva and H N Koutsopoulos ldquoNon-linear Kalman filtering algorithms for on-line calibration ofdynamic traffic assignment modelsrdquo IEEE Transactions onIntelligent Transportation Systems vol 8 no 4 pp 661ndash6702007

[13] G Gentile L Meschini and N Papola ldquoSpillback congestionin dynamic traffic assignment a macroscopic flow model withtime-varying bottlenecksrdquo Transportation Research B vol 41no 10 pp 1114ndash1138 2007

[14] B Yao C Yang J Hu J Yao and J Sun ldquoAn improved antcolony optimization for flexible job shop scheduling problemsrdquoAdvanced Science Letters vol 4 no 6-7 pp 2127ndash2131 2011

[15] B Yu Z Yang and S Li ldquoReal-time partway deadheadingstrategy based on transit service reliability assessmentrdquo Trans-portation Research A vol 46 no 8 pp 1265ndash1279 2012

[16] W Davidson R Donnelly P Vovsha et al ldquoSynthesis of firstpractices and operational research approaches in activity-basedtravel demandmodelingrdquoTransportationResearchA vol 41 no5 pp 464ndash488 2007

[17] M Hatzopoulou and E J Miller ldquoLinking an activity-basedtravel demand model with traffic emission and dispersionmodels transportrsquos contribution to air pollution in TorontordquoTransportation Research D vol 15 no 6 pp 315ndash325 2010

[18] X Dong M E Ben-Akiva J L Bowman and J L WalkerldquoMoving from trip-based to activity-based measures of acces-sibilityrdquo Transportation Research A vol 40 no 2 pp 163ndash1802006

[19] W Recker J Duan and H Wang ldquoDevelopment of an esti-mation procedure for an activity-based travel demand modelrdquoComputer-Aided Civil and Infrastructure Engineering vol 23no 7 pp 483ndash501 2008

[20] J E Kang and W W Recker ldquoAn activity-based assessmentof the potential impacts of plug-in hybrid electric vehicles onenergy and emissions using 1-day travel datardquo TransportationResearch D vol 14 no 8 pp 541ndash556 2009

Mathematical Problems in Engineering 11

[21] R M Pendyala R Kitamura A Kikuchi T Yamamoto andS Fujii ldquoFlorida activity mobility simulator overview andpreliminary validation resultsrdquo Transportation Research Recordno 1921 pp 123ndash130 2005

[22] S Yagi and A K Mohammadian ldquoAn activity-based microsim-ulation model of travel demand in the Jakarta Metropolitanareardquo Journal of Choice Modelling vol 3 no 1 pp 32ndash57 2010

[23] B YuWHK Lam andM L Tam ldquoBus arrival time predictionat bus stopwithmultiple routesrdquoTransportation Research C vol19 no 6 pp 1157ndash1170 2011

[24] B Yu Z Yang and B Yao ldquoAn improved ant colony opti-mization for vehicle routing problemrdquo European Journal ofOperational Research vol 196 no 1 pp 171ndash176 2009

[25] M Rieser K Nagel U Beuck M Balmer and J RumenappldquoAgent-oriented coupling of activity-based demand generationwith multiagent traffic simulationrdquo Transportation ResearchRecord vol 2021 no 1 pp 10ndash17 2007

[26] M Balmer KMeisterM Rieser K Nagel andKWAxhausenldquoAgent-based simulation of travel demand structure and com-putational performance of MATSim-Trdquo in Proceedings of the2nd TRB Conference on Innovations in Travel Modeling IVTInstitut fur Verkehrsplanung und Transportsysteme PortlandOre USA June 2008

[27] M Balmer M Rieser K Meister et al ldquoMatsim-T architectureand simulation timesrdquo in Multi-Agent Systems for Traffic andTransportation Engineering pp 57ndash78 2009

[28] A Horni D M Scott M Balmer and K W Axhausen ldquoLoca-tion choice modeling for shopping and leisure activities withMATSim combining microsimulation and time geographyrdquoTransportation Research Record no 2135 pp 87ndash95 2009

[29] D Grether Y Chen M Rieser et al ldquoEffects of a simple modechoicemodel in a large-scale agent-based transport simulationrdquoin Complexity and Spatial Networks pp 167ndash186 SpringerBerlin Germany 2009

[30] W Gao M Balmer and E J Miller ldquoComparison of MATSimand EMME2 on greater toronto and hamilton area networkCanadardquo Transportation Research Record no 2197 pp 118ndash1282010

[31] T W Nicolai L Wang K Nagel et al ldquoCoupling an urbansimulation model with a travel model-a first sensitivity testrdquoin Proceedings of the Computers in Urban Planning and UrbanManagement (CUPUM rsquo11) pp 11ndash07 Also VSP WP LakeLouise Canada 2011

[32] R A Waraich and K W Axhausen ldquoAgent-based parkingchoice modelrdquo Transportation Research Record vol 2319 no 1pp 39ndash46 2012

[33] J W Joubert P J Fourie and K W Axhausen ldquoLarge-scaleagent-based combined traffic simulation of private cars andcommercial vehiclesrdquo Transportation Research Record no 2168pp 24ndash32 2010

[34] D Charypar and K Nagel ldquoGenerating complete all-day activ-ity plans with genetic algorithmsrdquo Transportation vol 32 no 4pp 369ndash397 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 7: Research Article An Initial Implementation of Multiagent ...downloads.hindawi.com/journals/mpe/2014/980623.pdf · Research Article An Initial Implementation of Multiagent Simulation

Mathematical Problems in Engineering 7

Previous activity locationNearby facilities for shopping

R

Figure 4 Schematic diagram of randomly assigning each activity toa facility

real life inhabitants will tend to choose a nearer school foreducation choose a nearer shopmarket for shopping andso on So the concept of the searching method seems to berealistic The 119877 was set to 3 km according to Baodingrsquos sizepopulation and so on The schematic diagram is showed inFigure 4

Step 5-3 generate the start and end time of each activityon the basis of activity duration For example the end time ofthe previous activity is 119875endtime and the duration of the nextperformed activity is 119879duration then the Gaussian function isused to generate the next activityrsquos end time and the equationis as follows

119879endtime = 119875endtime + 119879duration + Gaussian sdot 3600 (7)

where 119879endtime is the end time of the next activity Gaussianrepresents the rand number generated based on Gaussiandistribution whose mean is 0 and the standard deviation is1

When all the above steps are completed the initial plan isfinally created

43 Count Data Inputting count data toMATSim is a typicalway to check whether the simulation of travel behavior isrealistic In this paper six count stationsrsquo data will be usedThe count data is obtained by an artificial methodThe surveytime is at May 10 2007 from 700 AM to 900 AM

44 Simulation Configuration In this paper two differentsimulation scenarios will be built up

(i) Scenario 1 10 of all agents carry out Reroute(ii) Scenario 2 10 of all agents will carry out Time

Allocation Mutator but these agents will also carryout Reroute after time changes

0102030405060708090

100

00000 50000 100000 150000 200000

The n

umbe

r of c

ars

Time of day

RerouteTime Allocation Mutator

Figure 5 Comparison of the number of departures of cars betweentwo scenarios

Other simulation configurations of the above three sce-narios are the same

(i) The number of the plans stored in each agentrsquosmemory is limited to 5

(ii) 10 of all agents will randomly select an existing plan(iii) The remaining 70 of all agents will select an existing

plan based on the plan scores(iv) The number of iterations will be set to 50(v) The ldquoQSimrdquo module will be used for mobility simula-

tion

5 Results and Discussion

Simulation results of the two different scenarios will bediscussed in the following aspects

(i) Comparison of the Number of Departures and Arrivals ofCars between Two Scenarios Figures 5 and 6 show the numberof departures and arrivals of cars between the two scenariosrespectively Both figures have the same trend which hastwo peaks The two peaks occur around 800 and 1800respectively In addition in terms of Figure 4 the first peak ofScenario 2 (Time Allocation Mutator) is lower than Scenario1 (Reroute) and the number of cars of Scenario 2 is higherthan Scenario 1 from 500AM to 800AM which indicatesthat some agents advance their departure time to avoid hightraffic volume during the peak time Figure 5 has the sametrend as Figure 4 due to the same reason

(ii) Comparison of the Evolution of the Average Best Score andAverage Executed Score for the Two Scenarios Figures 7 and8 demonstrate the average executed score and average bestscore of two scenarios respectively and they also have thesame trend The score of Scenario 1 which only carries outReroute keeps invariant from iteration 0 and iteration 50 inboth figures while the score of Scenario 2 which carries outTime Allocation Mutator has an increasing trend in both

8 Mathematical Problems in Engineering

Table 1 Bias and error of two scenarios

Time period Biaserror Scenario 1 (Reroute) Scenario 2 (Time Allocation Mutator)

700-800AM

Mean absolute bias minus24 minus147Mean absolute error 158 204Mean relative bias minus075 minus2404Mean relative error 3209 3791

800-900AM

Mean absolute bias minus45 minus222Mean absolute error 252 281Mean relative bias 641 minus2557Mean relative error 4400 4129

700ndash900AM

Mean absolute bias minus35 minus185Mean absolute error 205 243Mean relative bias 283 minus2480Mean relative error 3805 3960

0

20

40

60

80

100

120

00000 50000 100000 150000 200000Time of day

RerouteTime Allocation Mutator

The n

umbe

r of c

ars

Figure 6 Comparison of the number of arrivals of cars between twoscenarios

135

140

145

150

155

160

0 5 10 15 20 25 30 35 40 45 50

Scor

e

Iteration

RerouteTime Allocation Mutator

Figure 7 Comparison of the evolution of the average executed scorefor the two scenarios

figures According to the trendmentioned above we can con-clude that Reroute does not improve the agentsrsquo performancewhile Time Allocation Mutator has a significantly beneficialinfluence on the performance of agentsThe reasonwhy score

130

135

140

145

150

155

160

165

0 5 10 15 20 25 30 35 40 45 50

Scor

e

Iteration

RerouteTime Allocation Mutator

Figure 8 Comparison of the evolution of the average best score forthe two scenarios

of Scenario 1 remains the same is that agents cannot improvetheir performance through changing their routes

(iii) Comparison of the Simulated Data and the Count Dataof the Two Scenarios The comparison between the simulateddata and count data of the two scenarios is presented inFigure 9 Figures 9(a) 9(b) 9(c) and 9(d) demonstrate thecomparison in Scenario 1 at 7-8AM in Scenario 2 at 700-800AM in Scenario 1 at 800-900AM and in Scenario2 at 800-900AM respectively The bias and error of thesimulation results are summarized in Table 1 The meanabsolute bias mean absolute error mean relative bias andmean relative error are jointly used to check the simulationresults The equations to calculate the above indicators are asfollows

(i) mean absolute bias

119864 =1

119899sum(119902simulated minus 119902counted) (8)

Mathematical Problems in Engineering 9

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

Simulated data

7-8 AM

Y = X

Y = 2X

Y = 2X

(a) Simulated data versus count data at 700-800AM (Simulation withReroute only)

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

Simulated data

7-8 AM

Y = X

Y = 2X

Y = 2X

(b) Simulated data versus count data at 700-800AM (Simulation with TimeAllocation Mutator)

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

8-9 AM

Y = X

Y = 2X

Y = 2X

Simulated data

(c) Simulated data versus count data at 800-900AM (Simulation withReroute only)

10

100

1000

10000

Cou

nt d

ata

10 100 1000 10000Simulated data

8-9 AM

Y = X

Y = 2X

Y = 2X

(d) Simulated data versus count data at 800-900AM (Simulation with TimeAllocation Mutator)

Figure 9 Comparison between simulated data and count data

(ii) mean absolute error

|119864| =1

119899sum(

1003816100381610038161003816119902simulated minus 119902counted1003816100381610038161003816)

(9)

(iii) mean relative bias

119890 =1

119899sum(

119902simulated minus 119902counted119902counted

) (10)

(iv) mean relative error

|119890| =1

119899sum(

10038161003816100381610038161003816100381610038161003816

119902simulated minus 119902counted119902counted

10038161003816100381610038161003816100381610038161003816

) (11)

In terms of mean relative error which is commonly usedfor validating the accuracy of simulation the accuracy ofScenario 1 (3805) is close to Scenario 2 (3960) at 700ndash900AM In addition from 700AM to 800AM the mean

10 Mathematical Problems in Engineering

relative error of Scenario 1 (3209) is lower than Scenario 2(3791) while the mean relative error of Scenario 1 (44) ishigher than Scenario 2 (4129) from 800AM to 900AMthus Time Allocation Mutator does not perform better thanReroute in terms of simulation accuracy

6 Conclusions

This paper implements the agent-based simulation of travelbehavior in a medium-sized city in China and the mainachievements of this paper are as follows

(i) A detailed simulation structure which includes avariety of modules is introduced

(ii) Successfully realizing the simulation of travel behav-ior under a condition of limited survey data besidesa framework of preparing the input data is presented

(iii) Simulating the travel behavior of residents in amedium-sized city in China by MATSim was seldomdone in previous studies

However the above achievement is only a basic simula-tion work In the near future the related work below will becarried out

(i) This paper only simulates the travel behavior ofresident whose travel mode is car so other modes willbe added to the simulation scenario to check whetheragent-based simulation results are still realistic

(ii) A large-scale agent-based simulation will be carriedout in a Chinese metropolis such as Beijing Shang-hai on Guangzhou

(iii) Optimize the modules in MATSim to improve itssimulation precision and computing time

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This research was supported by the National Basic ResearchProgram of China (no 2012CB725403) the National Natu-ral Science Foundation of China (nos 51338008 7121000151178032) and the Fundamental Research Funds for theCentral Universities (no 2012YJS069)

References

[1] M Balmer Travel demand modeling for multi-agent trafficsimulations algorithms and systems [MS thesis] ETH ZurichZurich Switzerland 2007

[2] B Raney N Cetin A Vollmy et al ldquoAn agent-basedmicrosim-ulationmodel of Swiss travel first resultsrdquoNetworks and SpatialEconomics vol 3 no 1 pp 23ndash41 2003

[3] B Yu and Z Z Yang ldquoAn ant colony optimization model theperiod vehicle routing problem with time windowsrdquo Trans-portation Research E vol 47 no 2 pp 166ndash181 2011

[4] B Yu Z Yang K Chen andB Yu ldquoHybridmodel for predictionof bus arrival times at next stationrdquo Journal of AdvancedTransportation vol 44 no 3 pp 193ndash204 2010

[5] Y Bin Y Zhongzhen and Y Baozhen ldquoBus arrival timeprediction using support vector machinesrdquo Journal of IntelligentTransportation Systems vol 10 no 4 pp 151ndash158 2006

[6] B Yao P Hu M Zhang et al ldquoArtificial bee colony algorithmwith scanning strategy for periodic vehicle routing problemrdquoSimulation vol 89 no 6 pp 762ndash770 2013

[7] M Florian M Mahut and N Tremblay ldquoApplication of asimulation-based dynamic traffic assignment modelrdquo EuropeanJournal of Operational Research vol 189 no 3 pp 1381ndash13922008

[8] G Bellei GGentile andN Papola ldquoAwithin-day dynamic traf-fic assignment model for urban road networksrdquo TransportationResearch B vol 39 no 1 pp 1ndash29 2005

[9] J C Munoz and J A Laval ldquoSystem optimum dynamic trafficassignment graphical solution method for a congested freewayand one destinationrdquo Transportation Research B vol 40 no 1pp 1ndash15 2006

[10] W Y Szeto Y Jiang and A Sumalee ldquoA cell-based modelfor multi-class doubly stochastic dynamic traffic assignmentrdquoComputer-Aided Civil and Infrastructure Engineering vol 26no 8 pp 595ndash611 2011

[11] I Juran J N Prashker S Bekhor and I Ishai ldquoA dynamic trafficassignment model for the assessment of moving bottlenecksrdquoTransportation Research C vol 17 no 3 pp 240ndash258 2009

[12] C Antoniou M Ben-Akiva and H N Koutsopoulos ldquoNon-linear Kalman filtering algorithms for on-line calibration ofdynamic traffic assignment modelsrdquo IEEE Transactions onIntelligent Transportation Systems vol 8 no 4 pp 661ndash6702007

[13] G Gentile L Meschini and N Papola ldquoSpillback congestionin dynamic traffic assignment a macroscopic flow model withtime-varying bottlenecksrdquo Transportation Research B vol 41no 10 pp 1114ndash1138 2007

[14] B Yao C Yang J Hu J Yao and J Sun ldquoAn improved antcolony optimization for flexible job shop scheduling problemsrdquoAdvanced Science Letters vol 4 no 6-7 pp 2127ndash2131 2011

[15] B Yu Z Yang and S Li ldquoReal-time partway deadheadingstrategy based on transit service reliability assessmentrdquo Trans-portation Research A vol 46 no 8 pp 1265ndash1279 2012

[16] W Davidson R Donnelly P Vovsha et al ldquoSynthesis of firstpractices and operational research approaches in activity-basedtravel demandmodelingrdquoTransportationResearchA vol 41 no5 pp 464ndash488 2007

[17] M Hatzopoulou and E J Miller ldquoLinking an activity-basedtravel demand model with traffic emission and dispersionmodels transportrsquos contribution to air pollution in TorontordquoTransportation Research D vol 15 no 6 pp 315ndash325 2010

[18] X Dong M E Ben-Akiva J L Bowman and J L WalkerldquoMoving from trip-based to activity-based measures of acces-sibilityrdquo Transportation Research A vol 40 no 2 pp 163ndash1802006

[19] W Recker J Duan and H Wang ldquoDevelopment of an esti-mation procedure for an activity-based travel demand modelrdquoComputer-Aided Civil and Infrastructure Engineering vol 23no 7 pp 483ndash501 2008

[20] J E Kang and W W Recker ldquoAn activity-based assessmentof the potential impacts of plug-in hybrid electric vehicles onenergy and emissions using 1-day travel datardquo TransportationResearch D vol 14 no 8 pp 541ndash556 2009

Mathematical Problems in Engineering 11

[21] R M Pendyala R Kitamura A Kikuchi T Yamamoto andS Fujii ldquoFlorida activity mobility simulator overview andpreliminary validation resultsrdquo Transportation Research Recordno 1921 pp 123ndash130 2005

[22] S Yagi and A K Mohammadian ldquoAn activity-based microsim-ulation model of travel demand in the Jakarta Metropolitanareardquo Journal of Choice Modelling vol 3 no 1 pp 32ndash57 2010

[23] B YuWHK Lam andM L Tam ldquoBus arrival time predictionat bus stopwithmultiple routesrdquoTransportation Research C vol19 no 6 pp 1157ndash1170 2011

[24] B Yu Z Yang and B Yao ldquoAn improved ant colony opti-mization for vehicle routing problemrdquo European Journal ofOperational Research vol 196 no 1 pp 171ndash176 2009

[25] M Rieser K Nagel U Beuck M Balmer and J RumenappldquoAgent-oriented coupling of activity-based demand generationwith multiagent traffic simulationrdquo Transportation ResearchRecord vol 2021 no 1 pp 10ndash17 2007

[26] M Balmer KMeisterM Rieser K Nagel andKWAxhausenldquoAgent-based simulation of travel demand structure and com-putational performance of MATSim-Trdquo in Proceedings of the2nd TRB Conference on Innovations in Travel Modeling IVTInstitut fur Verkehrsplanung und Transportsysteme PortlandOre USA June 2008

[27] M Balmer M Rieser K Meister et al ldquoMatsim-T architectureand simulation timesrdquo in Multi-Agent Systems for Traffic andTransportation Engineering pp 57ndash78 2009

[28] A Horni D M Scott M Balmer and K W Axhausen ldquoLoca-tion choice modeling for shopping and leisure activities withMATSim combining microsimulation and time geographyrdquoTransportation Research Record no 2135 pp 87ndash95 2009

[29] D Grether Y Chen M Rieser et al ldquoEffects of a simple modechoicemodel in a large-scale agent-based transport simulationrdquoin Complexity and Spatial Networks pp 167ndash186 SpringerBerlin Germany 2009

[30] W Gao M Balmer and E J Miller ldquoComparison of MATSimand EMME2 on greater toronto and hamilton area networkCanadardquo Transportation Research Record no 2197 pp 118ndash1282010

[31] T W Nicolai L Wang K Nagel et al ldquoCoupling an urbansimulation model with a travel model-a first sensitivity testrdquoin Proceedings of the Computers in Urban Planning and UrbanManagement (CUPUM rsquo11) pp 11ndash07 Also VSP WP LakeLouise Canada 2011

[32] R A Waraich and K W Axhausen ldquoAgent-based parkingchoice modelrdquo Transportation Research Record vol 2319 no 1pp 39ndash46 2012

[33] J W Joubert P J Fourie and K W Axhausen ldquoLarge-scaleagent-based combined traffic simulation of private cars andcommercial vehiclesrdquo Transportation Research Record no 2168pp 24ndash32 2010

[34] D Charypar and K Nagel ldquoGenerating complete all-day activ-ity plans with genetic algorithmsrdquo Transportation vol 32 no 4pp 369ndash397 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 8: Research Article An Initial Implementation of Multiagent ...downloads.hindawi.com/journals/mpe/2014/980623.pdf · Research Article An Initial Implementation of Multiagent Simulation

8 Mathematical Problems in Engineering

Table 1 Bias and error of two scenarios

Time period Biaserror Scenario 1 (Reroute) Scenario 2 (Time Allocation Mutator)

700-800AM

Mean absolute bias minus24 minus147Mean absolute error 158 204Mean relative bias minus075 minus2404Mean relative error 3209 3791

800-900AM

Mean absolute bias minus45 minus222Mean absolute error 252 281Mean relative bias 641 minus2557Mean relative error 4400 4129

700ndash900AM

Mean absolute bias minus35 minus185Mean absolute error 205 243Mean relative bias 283 minus2480Mean relative error 3805 3960

0

20

40

60

80

100

120

00000 50000 100000 150000 200000Time of day

RerouteTime Allocation Mutator

The n

umbe

r of c

ars

Figure 6 Comparison of the number of arrivals of cars between twoscenarios

135

140

145

150

155

160

0 5 10 15 20 25 30 35 40 45 50

Scor

e

Iteration

RerouteTime Allocation Mutator

Figure 7 Comparison of the evolution of the average executed scorefor the two scenarios

figures According to the trendmentioned above we can con-clude that Reroute does not improve the agentsrsquo performancewhile Time Allocation Mutator has a significantly beneficialinfluence on the performance of agentsThe reasonwhy score

130

135

140

145

150

155

160

165

0 5 10 15 20 25 30 35 40 45 50

Scor

e

Iteration

RerouteTime Allocation Mutator

Figure 8 Comparison of the evolution of the average best score forthe two scenarios

of Scenario 1 remains the same is that agents cannot improvetheir performance through changing their routes

(iii) Comparison of the Simulated Data and the Count Dataof the Two Scenarios The comparison between the simulateddata and count data of the two scenarios is presented inFigure 9 Figures 9(a) 9(b) 9(c) and 9(d) demonstrate thecomparison in Scenario 1 at 7-8AM in Scenario 2 at 700-800AM in Scenario 1 at 800-900AM and in Scenario2 at 800-900AM respectively The bias and error of thesimulation results are summarized in Table 1 The meanabsolute bias mean absolute error mean relative bias andmean relative error are jointly used to check the simulationresults The equations to calculate the above indicators are asfollows

(i) mean absolute bias

119864 =1

119899sum(119902simulated minus 119902counted) (8)

Mathematical Problems in Engineering 9

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

Simulated data

7-8 AM

Y = X

Y = 2X

Y = 2X

(a) Simulated data versus count data at 700-800AM (Simulation withReroute only)

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

Simulated data

7-8 AM

Y = X

Y = 2X

Y = 2X

(b) Simulated data versus count data at 700-800AM (Simulation with TimeAllocation Mutator)

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

8-9 AM

Y = X

Y = 2X

Y = 2X

Simulated data

(c) Simulated data versus count data at 800-900AM (Simulation withReroute only)

10

100

1000

10000

Cou

nt d

ata

10 100 1000 10000Simulated data

8-9 AM

Y = X

Y = 2X

Y = 2X

(d) Simulated data versus count data at 800-900AM (Simulation with TimeAllocation Mutator)

Figure 9 Comparison between simulated data and count data

(ii) mean absolute error

|119864| =1

119899sum(

1003816100381610038161003816119902simulated minus 119902counted1003816100381610038161003816)

(9)

(iii) mean relative bias

119890 =1

119899sum(

119902simulated minus 119902counted119902counted

) (10)

(iv) mean relative error

|119890| =1

119899sum(

10038161003816100381610038161003816100381610038161003816

119902simulated minus 119902counted119902counted

10038161003816100381610038161003816100381610038161003816

) (11)

In terms of mean relative error which is commonly usedfor validating the accuracy of simulation the accuracy ofScenario 1 (3805) is close to Scenario 2 (3960) at 700ndash900AM In addition from 700AM to 800AM the mean

10 Mathematical Problems in Engineering

relative error of Scenario 1 (3209) is lower than Scenario 2(3791) while the mean relative error of Scenario 1 (44) ishigher than Scenario 2 (4129) from 800AM to 900AMthus Time Allocation Mutator does not perform better thanReroute in terms of simulation accuracy

6 Conclusions

This paper implements the agent-based simulation of travelbehavior in a medium-sized city in China and the mainachievements of this paper are as follows

(i) A detailed simulation structure which includes avariety of modules is introduced

(ii) Successfully realizing the simulation of travel behav-ior under a condition of limited survey data besidesa framework of preparing the input data is presented

(iii) Simulating the travel behavior of residents in amedium-sized city in China by MATSim was seldomdone in previous studies

However the above achievement is only a basic simula-tion work In the near future the related work below will becarried out

(i) This paper only simulates the travel behavior ofresident whose travel mode is car so other modes willbe added to the simulation scenario to check whetheragent-based simulation results are still realistic

(ii) A large-scale agent-based simulation will be carriedout in a Chinese metropolis such as Beijing Shang-hai on Guangzhou

(iii) Optimize the modules in MATSim to improve itssimulation precision and computing time

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This research was supported by the National Basic ResearchProgram of China (no 2012CB725403) the National Natu-ral Science Foundation of China (nos 51338008 7121000151178032) and the Fundamental Research Funds for theCentral Universities (no 2012YJS069)

References

[1] M Balmer Travel demand modeling for multi-agent trafficsimulations algorithms and systems [MS thesis] ETH ZurichZurich Switzerland 2007

[2] B Raney N Cetin A Vollmy et al ldquoAn agent-basedmicrosim-ulationmodel of Swiss travel first resultsrdquoNetworks and SpatialEconomics vol 3 no 1 pp 23ndash41 2003

[3] B Yu and Z Z Yang ldquoAn ant colony optimization model theperiod vehicle routing problem with time windowsrdquo Trans-portation Research E vol 47 no 2 pp 166ndash181 2011

[4] B Yu Z Yang K Chen andB Yu ldquoHybridmodel for predictionof bus arrival times at next stationrdquo Journal of AdvancedTransportation vol 44 no 3 pp 193ndash204 2010

[5] Y Bin Y Zhongzhen and Y Baozhen ldquoBus arrival timeprediction using support vector machinesrdquo Journal of IntelligentTransportation Systems vol 10 no 4 pp 151ndash158 2006

[6] B Yao P Hu M Zhang et al ldquoArtificial bee colony algorithmwith scanning strategy for periodic vehicle routing problemrdquoSimulation vol 89 no 6 pp 762ndash770 2013

[7] M Florian M Mahut and N Tremblay ldquoApplication of asimulation-based dynamic traffic assignment modelrdquo EuropeanJournal of Operational Research vol 189 no 3 pp 1381ndash13922008

[8] G Bellei GGentile andN Papola ldquoAwithin-day dynamic traf-fic assignment model for urban road networksrdquo TransportationResearch B vol 39 no 1 pp 1ndash29 2005

[9] J C Munoz and J A Laval ldquoSystem optimum dynamic trafficassignment graphical solution method for a congested freewayand one destinationrdquo Transportation Research B vol 40 no 1pp 1ndash15 2006

[10] W Y Szeto Y Jiang and A Sumalee ldquoA cell-based modelfor multi-class doubly stochastic dynamic traffic assignmentrdquoComputer-Aided Civil and Infrastructure Engineering vol 26no 8 pp 595ndash611 2011

[11] I Juran J N Prashker S Bekhor and I Ishai ldquoA dynamic trafficassignment model for the assessment of moving bottlenecksrdquoTransportation Research C vol 17 no 3 pp 240ndash258 2009

[12] C Antoniou M Ben-Akiva and H N Koutsopoulos ldquoNon-linear Kalman filtering algorithms for on-line calibration ofdynamic traffic assignment modelsrdquo IEEE Transactions onIntelligent Transportation Systems vol 8 no 4 pp 661ndash6702007

[13] G Gentile L Meschini and N Papola ldquoSpillback congestionin dynamic traffic assignment a macroscopic flow model withtime-varying bottlenecksrdquo Transportation Research B vol 41no 10 pp 1114ndash1138 2007

[14] B Yao C Yang J Hu J Yao and J Sun ldquoAn improved antcolony optimization for flexible job shop scheduling problemsrdquoAdvanced Science Letters vol 4 no 6-7 pp 2127ndash2131 2011

[15] B Yu Z Yang and S Li ldquoReal-time partway deadheadingstrategy based on transit service reliability assessmentrdquo Trans-portation Research A vol 46 no 8 pp 1265ndash1279 2012

[16] W Davidson R Donnelly P Vovsha et al ldquoSynthesis of firstpractices and operational research approaches in activity-basedtravel demandmodelingrdquoTransportationResearchA vol 41 no5 pp 464ndash488 2007

[17] M Hatzopoulou and E J Miller ldquoLinking an activity-basedtravel demand model with traffic emission and dispersionmodels transportrsquos contribution to air pollution in TorontordquoTransportation Research D vol 15 no 6 pp 315ndash325 2010

[18] X Dong M E Ben-Akiva J L Bowman and J L WalkerldquoMoving from trip-based to activity-based measures of acces-sibilityrdquo Transportation Research A vol 40 no 2 pp 163ndash1802006

[19] W Recker J Duan and H Wang ldquoDevelopment of an esti-mation procedure for an activity-based travel demand modelrdquoComputer-Aided Civil and Infrastructure Engineering vol 23no 7 pp 483ndash501 2008

[20] J E Kang and W W Recker ldquoAn activity-based assessmentof the potential impacts of plug-in hybrid electric vehicles onenergy and emissions using 1-day travel datardquo TransportationResearch D vol 14 no 8 pp 541ndash556 2009

Mathematical Problems in Engineering 11

[21] R M Pendyala R Kitamura A Kikuchi T Yamamoto andS Fujii ldquoFlorida activity mobility simulator overview andpreliminary validation resultsrdquo Transportation Research Recordno 1921 pp 123ndash130 2005

[22] S Yagi and A K Mohammadian ldquoAn activity-based microsim-ulation model of travel demand in the Jakarta Metropolitanareardquo Journal of Choice Modelling vol 3 no 1 pp 32ndash57 2010

[23] B YuWHK Lam andM L Tam ldquoBus arrival time predictionat bus stopwithmultiple routesrdquoTransportation Research C vol19 no 6 pp 1157ndash1170 2011

[24] B Yu Z Yang and B Yao ldquoAn improved ant colony opti-mization for vehicle routing problemrdquo European Journal ofOperational Research vol 196 no 1 pp 171ndash176 2009

[25] M Rieser K Nagel U Beuck M Balmer and J RumenappldquoAgent-oriented coupling of activity-based demand generationwith multiagent traffic simulationrdquo Transportation ResearchRecord vol 2021 no 1 pp 10ndash17 2007

[26] M Balmer KMeisterM Rieser K Nagel andKWAxhausenldquoAgent-based simulation of travel demand structure and com-putational performance of MATSim-Trdquo in Proceedings of the2nd TRB Conference on Innovations in Travel Modeling IVTInstitut fur Verkehrsplanung und Transportsysteme PortlandOre USA June 2008

[27] M Balmer M Rieser K Meister et al ldquoMatsim-T architectureand simulation timesrdquo in Multi-Agent Systems for Traffic andTransportation Engineering pp 57ndash78 2009

[28] A Horni D M Scott M Balmer and K W Axhausen ldquoLoca-tion choice modeling for shopping and leisure activities withMATSim combining microsimulation and time geographyrdquoTransportation Research Record no 2135 pp 87ndash95 2009

[29] D Grether Y Chen M Rieser et al ldquoEffects of a simple modechoicemodel in a large-scale agent-based transport simulationrdquoin Complexity and Spatial Networks pp 167ndash186 SpringerBerlin Germany 2009

[30] W Gao M Balmer and E J Miller ldquoComparison of MATSimand EMME2 on greater toronto and hamilton area networkCanadardquo Transportation Research Record no 2197 pp 118ndash1282010

[31] T W Nicolai L Wang K Nagel et al ldquoCoupling an urbansimulation model with a travel model-a first sensitivity testrdquoin Proceedings of the Computers in Urban Planning and UrbanManagement (CUPUM rsquo11) pp 11ndash07 Also VSP WP LakeLouise Canada 2011

[32] R A Waraich and K W Axhausen ldquoAgent-based parkingchoice modelrdquo Transportation Research Record vol 2319 no 1pp 39ndash46 2012

[33] J W Joubert P J Fourie and K W Axhausen ldquoLarge-scaleagent-based combined traffic simulation of private cars andcommercial vehiclesrdquo Transportation Research Record no 2168pp 24ndash32 2010

[34] D Charypar and K Nagel ldquoGenerating complete all-day activ-ity plans with genetic algorithmsrdquo Transportation vol 32 no 4pp 369ndash397 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 9: Research Article An Initial Implementation of Multiagent ...downloads.hindawi.com/journals/mpe/2014/980623.pdf · Research Article An Initial Implementation of Multiagent Simulation

Mathematical Problems in Engineering 9

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

Simulated data

7-8 AM

Y = X

Y = 2X

Y = 2X

(a) Simulated data versus count data at 700-800AM (Simulation withReroute only)

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

Simulated data

7-8 AM

Y = X

Y = 2X

Y = 2X

(b) Simulated data versus count data at 700-800AM (Simulation with TimeAllocation Mutator)

10

100

1000

10000

10 100 1000 10000

Cou

nt d

ata

8-9 AM

Y = X

Y = 2X

Y = 2X

Simulated data

(c) Simulated data versus count data at 800-900AM (Simulation withReroute only)

10

100

1000

10000

Cou

nt d

ata

10 100 1000 10000Simulated data

8-9 AM

Y = X

Y = 2X

Y = 2X

(d) Simulated data versus count data at 800-900AM (Simulation with TimeAllocation Mutator)

Figure 9 Comparison between simulated data and count data

(ii) mean absolute error

|119864| =1

119899sum(

1003816100381610038161003816119902simulated minus 119902counted1003816100381610038161003816)

(9)

(iii) mean relative bias

119890 =1

119899sum(

119902simulated minus 119902counted119902counted

) (10)

(iv) mean relative error

|119890| =1

119899sum(

10038161003816100381610038161003816100381610038161003816

119902simulated minus 119902counted119902counted

10038161003816100381610038161003816100381610038161003816

) (11)

In terms of mean relative error which is commonly usedfor validating the accuracy of simulation the accuracy ofScenario 1 (3805) is close to Scenario 2 (3960) at 700ndash900AM In addition from 700AM to 800AM the mean

10 Mathematical Problems in Engineering

relative error of Scenario 1 (3209) is lower than Scenario 2(3791) while the mean relative error of Scenario 1 (44) ishigher than Scenario 2 (4129) from 800AM to 900AMthus Time Allocation Mutator does not perform better thanReroute in terms of simulation accuracy

6 Conclusions

This paper implements the agent-based simulation of travelbehavior in a medium-sized city in China and the mainachievements of this paper are as follows

(i) A detailed simulation structure which includes avariety of modules is introduced

(ii) Successfully realizing the simulation of travel behav-ior under a condition of limited survey data besidesa framework of preparing the input data is presented

(iii) Simulating the travel behavior of residents in amedium-sized city in China by MATSim was seldomdone in previous studies

However the above achievement is only a basic simula-tion work In the near future the related work below will becarried out

(i) This paper only simulates the travel behavior ofresident whose travel mode is car so other modes willbe added to the simulation scenario to check whetheragent-based simulation results are still realistic

(ii) A large-scale agent-based simulation will be carriedout in a Chinese metropolis such as Beijing Shang-hai on Guangzhou

(iii) Optimize the modules in MATSim to improve itssimulation precision and computing time

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This research was supported by the National Basic ResearchProgram of China (no 2012CB725403) the National Natu-ral Science Foundation of China (nos 51338008 7121000151178032) and the Fundamental Research Funds for theCentral Universities (no 2012YJS069)

References

[1] M Balmer Travel demand modeling for multi-agent trafficsimulations algorithms and systems [MS thesis] ETH ZurichZurich Switzerland 2007

[2] B Raney N Cetin A Vollmy et al ldquoAn agent-basedmicrosim-ulationmodel of Swiss travel first resultsrdquoNetworks and SpatialEconomics vol 3 no 1 pp 23ndash41 2003

[3] B Yu and Z Z Yang ldquoAn ant colony optimization model theperiod vehicle routing problem with time windowsrdquo Trans-portation Research E vol 47 no 2 pp 166ndash181 2011

[4] B Yu Z Yang K Chen andB Yu ldquoHybridmodel for predictionof bus arrival times at next stationrdquo Journal of AdvancedTransportation vol 44 no 3 pp 193ndash204 2010

[5] Y Bin Y Zhongzhen and Y Baozhen ldquoBus arrival timeprediction using support vector machinesrdquo Journal of IntelligentTransportation Systems vol 10 no 4 pp 151ndash158 2006

[6] B Yao P Hu M Zhang et al ldquoArtificial bee colony algorithmwith scanning strategy for periodic vehicle routing problemrdquoSimulation vol 89 no 6 pp 762ndash770 2013

[7] M Florian M Mahut and N Tremblay ldquoApplication of asimulation-based dynamic traffic assignment modelrdquo EuropeanJournal of Operational Research vol 189 no 3 pp 1381ndash13922008

[8] G Bellei GGentile andN Papola ldquoAwithin-day dynamic traf-fic assignment model for urban road networksrdquo TransportationResearch B vol 39 no 1 pp 1ndash29 2005

[9] J C Munoz and J A Laval ldquoSystem optimum dynamic trafficassignment graphical solution method for a congested freewayand one destinationrdquo Transportation Research B vol 40 no 1pp 1ndash15 2006

[10] W Y Szeto Y Jiang and A Sumalee ldquoA cell-based modelfor multi-class doubly stochastic dynamic traffic assignmentrdquoComputer-Aided Civil and Infrastructure Engineering vol 26no 8 pp 595ndash611 2011

[11] I Juran J N Prashker S Bekhor and I Ishai ldquoA dynamic trafficassignment model for the assessment of moving bottlenecksrdquoTransportation Research C vol 17 no 3 pp 240ndash258 2009

[12] C Antoniou M Ben-Akiva and H N Koutsopoulos ldquoNon-linear Kalman filtering algorithms for on-line calibration ofdynamic traffic assignment modelsrdquo IEEE Transactions onIntelligent Transportation Systems vol 8 no 4 pp 661ndash6702007

[13] G Gentile L Meschini and N Papola ldquoSpillback congestionin dynamic traffic assignment a macroscopic flow model withtime-varying bottlenecksrdquo Transportation Research B vol 41no 10 pp 1114ndash1138 2007

[14] B Yao C Yang J Hu J Yao and J Sun ldquoAn improved antcolony optimization for flexible job shop scheduling problemsrdquoAdvanced Science Letters vol 4 no 6-7 pp 2127ndash2131 2011

[15] B Yu Z Yang and S Li ldquoReal-time partway deadheadingstrategy based on transit service reliability assessmentrdquo Trans-portation Research A vol 46 no 8 pp 1265ndash1279 2012

[16] W Davidson R Donnelly P Vovsha et al ldquoSynthesis of firstpractices and operational research approaches in activity-basedtravel demandmodelingrdquoTransportationResearchA vol 41 no5 pp 464ndash488 2007

[17] M Hatzopoulou and E J Miller ldquoLinking an activity-basedtravel demand model with traffic emission and dispersionmodels transportrsquos contribution to air pollution in TorontordquoTransportation Research D vol 15 no 6 pp 315ndash325 2010

[18] X Dong M E Ben-Akiva J L Bowman and J L WalkerldquoMoving from trip-based to activity-based measures of acces-sibilityrdquo Transportation Research A vol 40 no 2 pp 163ndash1802006

[19] W Recker J Duan and H Wang ldquoDevelopment of an esti-mation procedure for an activity-based travel demand modelrdquoComputer-Aided Civil and Infrastructure Engineering vol 23no 7 pp 483ndash501 2008

[20] J E Kang and W W Recker ldquoAn activity-based assessmentof the potential impacts of plug-in hybrid electric vehicles onenergy and emissions using 1-day travel datardquo TransportationResearch D vol 14 no 8 pp 541ndash556 2009

Mathematical Problems in Engineering 11

[21] R M Pendyala R Kitamura A Kikuchi T Yamamoto andS Fujii ldquoFlorida activity mobility simulator overview andpreliminary validation resultsrdquo Transportation Research Recordno 1921 pp 123ndash130 2005

[22] S Yagi and A K Mohammadian ldquoAn activity-based microsim-ulation model of travel demand in the Jakarta Metropolitanareardquo Journal of Choice Modelling vol 3 no 1 pp 32ndash57 2010

[23] B YuWHK Lam andM L Tam ldquoBus arrival time predictionat bus stopwithmultiple routesrdquoTransportation Research C vol19 no 6 pp 1157ndash1170 2011

[24] B Yu Z Yang and B Yao ldquoAn improved ant colony opti-mization for vehicle routing problemrdquo European Journal ofOperational Research vol 196 no 1 pp 171ndash176 2009

[25] M Rieser K Nagel U Beuck M Balmer and J RumenappldquoAgent-oriented coupling of activity-based demand generationwith multiagent traffic simulationrdquo Transportation ResearchRecord vol 2021 no 1 pp 10ndash17 2007

[26] M Balmer KMeisterM Rieser K Nagel andKWAxhausenldquoAgent-based simulation of travel demand structure and com-putational performance of MATSim-Trdquo in Proceedings of the2nd TRB Conference on Innovations in Travel Modeling IVTInstitut fur Verkehrsplanung und Transportsysteme PortlandOre USA June 2008

[27] M Balmer M Rieser K Meister et al ldquoMatsim-T architectureand simulation timesrdquo in Multi-Agent Systems for Traffic andTransportation Engineering pp 57ndash78 2009

[28] A Horni D M Scott M Balmer and K W Axhausen ldquoLoca-tion choice modeling for shopping and leisure activities withMATSim combining microsimulation and time geographyrdquoTransportation Research Record no 2135 pp 87ndash95 2009

[29] D Grether Y Chen M Rieser et al ldquoEffects of a simple modechoicemodel in a large-scale agent-based transport simulationrdquoin Complexity and Spatial Networks pp 167ndash186 SpringerBerlin Germany 2009

[30] W Gao M Balmer and E J Miller ldquoComparison of MATSimand EMME2 on greater toronto and hamilton area networkCanadardquo Transportation Research Record no 2197 pp 118ndash1282010

[31] T W Nicolai L Wang K Nagel et al ldquoCoupling an urbansimulation model with a travel model-a first sensitivity testrdquoin Proceedings of the Computers in Urban Planning and UrbanManagement (CUPUM rsquo11) pp 11ndash07 Also VSP WP LakeLouise Canada 2011

[32] R A Waraich and K W Axhausen ldquoAgent-based parkingchoice modelrdquo Transportation Research Record vol 2319 no 1pp 39ndash46 2012

[33] J W Joubert P J Fourie and K W Axhausen ldquoLarge-scaleagent-based combined traffic simulation of private cars andcommercial vehiclesrdquo Transportation Research Record no 2168pp 24ndash32 2010

[34] D Charypar and K Nagel ldquoGenerating complete all-day activ-ity plans with genetic algorithmsrdquo Transportation vol 32 no 4pp 369ndash397 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 10: Research Article An Initial Implementation of Multiagent ...downloads.hindawi.com/journals/mpe/2014/980623.pdf · Research Article An Initial Implementation of Multiagent Simulation

10 Mathematical Problems in Engineering

relative error of Scenario 1 (3209) is lower than Scenario 2(3791) while the mean relative error of Scenario 1 (44) ishigher than Scenario 2 (4129) from 800AM to 900AMthus Time Allocation Mutator does not perform better thanReroute in terms of simulation accuracy

6 Conclusions

This paper implements the agent-based simulation of travelbehavior in a medium-sized city in China and the mainachievements of this paper are as follows

(i) A detailed simulation structure which includes avariety of modules is introduced

(ii) Successfully realizing the simulation of travel behav-ior under a condition of limited survey data besidesa framework of preparing the input data is presented

(iii) Simulating the travel behavior of residents in amedium-sized city in China by MATSim was seldomdone in previous studies

However the above achievement is only a basic simula-tion work In the near future the related work below will becarried out

(i) This paper only simulates the travel behavior ofresident whose travel mode is car so other modes willbe added to the simulation scenario to check whetheragent-based simulation results are still realistic

(ii) A large-scale agent-based simulation will be carriedout in a Chinese metropolis such as Beijing Shang-hai on Guangzhou

(iii) Optimize the modules in MATSim to improve itssimulation precision and computing time

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

This research was supported by the National Basic ResearchProgram of China (no 2012CB725403) the National Natu-ral Science Foundation of China (nos 51338008 7121000151178032) and the Fundamental Research Funds for theCentral Universities (no 2012YJS069)

References

[1] M Balmer Travel demand modeling for multi-agent trafficsimulations algorithms and systems [MS thesis] ETH ZurichZurich Switzerland 2007

[2] B Raney N Cetin A Vollmy et al ldquoAn agent-basedmicrosim-ulationmodel of Swiss travel first resultsrdquoNetworks and SpatialEconomics vol 3 no 1 pp 23ndash41 2003

[3] B Yu and Z Z Yang ldquoAn ant colony optimization model theperiod vehicle routing problem with time windowsrdquo Trans-portation Research E vol 47 no 2 pp 166ndash181 2011

[4] B Yu Z Yang K Chen andB Yu ldquoHybridmodel for predictionof bus arrival times at next stationrdquo Journal of AdvancedTransportation vol 44 no 3 pp 193ndash204 2010

[5] Y Bin Y Zhongzhen and Y Baozhen ldquoBus arrival timeprediction using support vector machinesrdquo Journal of IntelligentTransportation Systems vol 10 no 4 pp 151ndash158 2006

[6] B Yao P Hu M Zhang et al ldquoArtificial bee colony algorithmwith scanning strategy for periodic vehicle routing problemrdquoSimulation vol 89 no 6 pp 762ndash770 2013

[7] M Florian M Mahut and N Tremblay ldquoApplication of asimulation-based dynamic traffic assignment modelrdquo EuropeanJournal of Operational Research vol 189 no 3 pp 1381ndash13922008

[8] G Bellei GGentile andN Papola ldquoAwithin-day dynamic traf-fic assignment model for urban road networksrdquo TransportationResearch B vol 39 no 1 pp 1ndash29 2005

[9] J C Munoz and J A Laval ldquoSystem optimum dynamic trafficassignment graphical solution method for a congested freewayand one destinationrdquo Transportation Research B vol 40 no 1pp 1ndash15 2006

[10] W Y Szeto Y Jiang and A Sumalee ldquoA cell-based modelfor multi-class doubly stochastic dynamic traffic assignmentrdquoComputer-Aided Civil and Infrastructure Engineering vol 26no 8 pp 595ndash611 2011

[11] I Juran J N Prashker S Bekhor and I Ishai ldquoA dynamic trafficassignment model for the assessment of moving bottlenecksrdquoTransportation Research C vol 17 no 3 pp 240ndash258 2009

[12] C Antoniou M Ben-Akiva and H N Koutsopoulos ldquoNon-linear Kalman filtering algorithms for on-line calibration ofdynamic traffic assignment modelsrdquo IEEE Transactions onIntelligent Transportation Systems vol 8 no 4 pp 661ndash6702007

[13] G Gentile L Meschini and N Papola ldquoSpillback congestionin dynamic traffic assignment a macroscopic flow model withtime-varying bottlenecksrdquo Transportation Research B vol 41no 10 pp 1114ndash1138 2007

[14] B Yao C Yang J Hu J Yao and J Sun ldquoAn improved antcolony optimization for flexible job shop scheduling problemsrdquoAdvanced Science Letters vol 4 no 6-7 pp 2127ndash2131 2011

[15] B Yu Z Yang and S Li ldquoReal-time partway deadheadingstrategy based on transit service reliability assessmentrdquo Trans-portation Research A vol 46 no 8 pp 1265ndash1279 2012

[16] W Davidson R Donnelly P Vovsha et al ldquoSynthesis of firstpractices and operational research approaches in activity-basedtravel demandmodelingrdquoTransportationResearchA vol 41 no5 pp 464ndash488 2007

[17] M Hatzopoulou and E J Miller ldquoLinking an activity-basedtravel demand model with traffic emission and dispersionmodels transportrsquos contribution to air pollution in TorontordquoTransportation Research D vol 15 no 6 pp 315ndash325 2010

[18] X Dong M E Ben-Akiva J L Bowman and J L WalkerldquoMoving from trip-based to activity-based measures of acces-sibilityrdquo Transportation Research A vol 40 no 2 pp 163ndash1802006

[19] W Recker J Duan and H Wang ldquoDevelopment of an esti-mation procedure for an activity-based travel demand modelrdquoComputer-Aided Civil and Infrastructure Engineering vol 23no 7 pp 483ndash501 2008

[20] J E Kang and W W Recker ldquoAn activity-based assessmentof the potential impacts of plug-in hybrid electric vehicles onenergy and emissions using 1-day travel datardquo TransportationResearch D vol 14 no 8 pp 541ndash556 2009

Mathematical Problems in Engineering 11

[21] R M Pendyala R Kitamura A Kikuchi T Yamamoto andS Fujii ldquoFlorida activity mobility simulator overview andpreliminary validation resultsrdquo Transportation Research Recordno 1921 pp 123ndash130 2005

[22] S Yagi and A K Mohammadian ldquoAn activity-based microsim-ulation model of travel demand in the Jakarta Metropolitanareardquo Journal of Choice Modelling vol 3 no 1 pp 32ndash57 2010

[23] B YuWHK Lam andM L Tam ldquoBus arrival time predictionat bus stopwithmultiple routesrdquoTransportation Research C vol19 no 6 pp 1157ndash1170 2011

[24] B Yu Z Yang and B Yao ldquoAn improved ant colony opti-mization for vehicle routing problemrdquo European Journal ofOperational Research vol 196 no 1 pp 171ndash176 2009

[25] M Rieser K Nagel U Beuck M Balmer and J RumenappldquoAgent-oriented coupling of activity-based demand generationwith multiagent traffic simulationrdquo Transportation ResearchRecord vol 2021 no 1 pp 10ndash17 2007

[26] M Balmer KMeisterM Rieser K Nagel andKWAxhausenldquoAgent-based simulation of travel demand structure and com-putational performance of MATSim-Trdquo in Proceedings of the2nd TRB Conference on Innovations in Travel Modeling IVTInstitut fur Verkehrsplanung und Transportsysteme PortlandOre USA June 2008

[27] M Balmer M Rieser K Meister et al ldquoMatsim-T architectureand simulation timesrdquo in Multi-Agent Systems for Traffic andTransportation Engineering pp 57ndash78 2009

[28] A Horni D M Scott M Balmer and K W Axhausen ldquoLoca-tion choice modeling for shopping and leisure activities withMATSim combining microsimulation and time geographyrdquoTransportation Research Record no 2135 pp 87ndash95 2009

[29] D Grether Y Chen M Rieser et al ldquoEffects of a simple modechoicemodel in a large-scale agent-based transport simulationrdquoin Complexity and Spatial Networks pp 167ndash186 SpringerBerlin Germany 2009

[30] W Gao M Balmer and E J Miller ldquoComparison of MATSimand EMME2 on greater toronto and hamilton area networkCanadardquo Transportation Research Record no 2197 pp 118ndash1282010

[31] T W Nicolai L Wang K Nagel et al ldquoCoupling an urbansimulation model with a travel model-a first sensitivity testrdquoin Proceedings of the Computers in Urban Planning and UrbanManagement (CUPUM rsquo11) pp 11ndash07 Also VSP WP LakeLouise Canada 2011

[32] R A Waraich and K W Axhausen ldquoAgent-based parkingchoice modelrdquo Transportation Research Record vol 2319 no 1pp 39ndash46 2012

[33] J W Joubert P J Fourie and K W Axhausen ldquoLarge-scaleagent-based combined traffic simulation of private cars andcommercial vehiclesrdquo Transportation Research Record no 2168pp 24ndash32 2010

[34] D Charypar and K Nagel ldquoGenerating complete all-day activ-ity plans with genetic algorithmsrdquo Transportation vol 32 no 4pp 369ndash397 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 11: Research Article An Initial Implementation of Multiagent ...downloads.hindawi.com/journals/mpe/2014/980623.pdf · Research Article An Initial Implementation of Multiagent Simulation

Mathematical Problems in Engineering 11

[21] R M Pendyala R Kitamura A Kikuchi T Yamamoto andS Fujii ldquoFlorida activity mobility simulator overview andpreliminary validation resultsrdquo Transportation Research Recordno 1921 pp 123ndash130 2005

[22] S Yagi and A K Mohammadian ldquoAn activity-based microsim-ulation model of travel demand in the Jakarta Metropolitanareardquo Journal of Choice Modelling vol 3 no 1 pp 32ndash57 2010

[23] B YuWHK Lam andM L Tam ldquoBus arrival time predictionat bus stopwithmultiple routesrdquoTransportation Research C vol19 no 6 pp 1157ndash1170 2011

[24] B Yu Z Yang and B Yao ldquoAn improved ant colony opti-mization for vehicle routing problemrdquo European Journal ofOperational Research vol 196 no 1 pp 171ndash176 2009

[25] M Rieser K Nagel U Beuck M Balmer and J RumenappldquoAgent-oriented coupling of activity-based demand generationwith multiagent traffic simulationrdquo Transportation ResearchRecord vol 2021 no 1 pp 10ndash17 2007

[26] M Balmer KMeisterM Rieser K Nagel andKWAxhausenldquoAgent-based simulation of travel demand structure and com-putational performance of MATSim-Trdquo in Proceedings of the2nd TRB Conference on Innovations in Travel Modeling IVTInstitut fur Verkehrsplanung und Transportsysteme PortlandOre USA June 2008

[27] M Balmer M Rieser K Meister et al ldquoMatsim-T architectureand simulation timesrdquo in Multi-Agent Systems for Traffic andTransportation Engineering pp 57ndash78 2009

[28] A Horni D M Scott M Balmer and K W Axhausen ldquoLoca-tion choice modeling for shopping and leisure activities withMATSim combining microsimulation and time geographyrdquoTransportation Research Record no 2135 pp 87ndash95 2009

[29] D Grether Y Chen M Rieser et al ldquoEffects of a simple modechoicemodel in a large-scale agent-based transport simulationrdquoin Complexity and Spatial Networks pp 167ndash186 SpringerBerlin Germany 2009

[30] W Gao M Balmer and E J Miller ldquoComparison of MATSimand EMME2 on greater toronto and hamilton area networkCanadardquo Transportation Research Record no 2197 pp 118ndash1282010

[31] T W Nicolai L Wang K Nagel et al ldquoCoupling an urbansimulation model with a travel model-a first sensitivity testrdquoin Proceedings of the Computers in Urban Planning and UrbanManagement (CUPUM rsquo11) pp 11ndash07 Also VSP WP LakeLouise Canada 2011

[32] R A Waraich and K W Axhausen ldquoAgent-based parkingchoice modelrdquo Transportation Research Record vol 2319 no 1pp 39ndash46 2012

[33] J W Joubert P J Fourie and K W Axhausen ldquoLarge-scaleagent-based combined traffic simulation of private cars andcommercial vehiclesrdquo Transportation Research Record no 2168pp 24ndash32 2010

[34] D Charypar and K Nagel ldquoGenerating complete all-day activ-ity plans with genetic algorithmsrdquo Transportation vol 32 no 4pp 369ndash397 2005

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of

Page 12: Research Article An Initial Implementation of Multiagent ...downloads.hindawi.com/journals/mpe/2014/980623.pdf · Research Article An Initial Implementation of Multiagent Simulation

Submit your manuscripts athttpwwwhindawicom

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttpwwwhindawicom

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

CombinatoricsHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom

Volume 2014 Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Stochastic AnalysisInternational Journal of