SUMO (Simulation Of Urban MObility) An Open-source Traffic . - Eclipse

Transcription

SUMO (Simulation of Urban MObility)An open-source traffic simulationDaniel Krajzewicz, Georg Hertkorn and Peter WagnerGerman Aerospace Centre,Institute for Transportation ResearchRutherfordstr. 2, 12489 Berlin, GermanyE-mail: Daniel.Krajzewicz@dlr.de,Georg.Hertkorn@dlr.de, Peter.Wagner@dlr.deKEYWORDStraffic simulation, microscopic, continuous,multimodal, open source, car-driver model, trafficresearch, road trafficABSTRACTAs no exact model of traffic flow exists due to its highcomplexity and chaotic organisation, researchersmainly try to predict traffic using simulations.Within this field, many simulation packages exist anddiffer in their software architecture paradigm as well asin the models that describe traffic itself.We will introduce yet another system which, incontrast to most of the other simulation softwarepackages, is available as an open-source program andmay therefore be extended in order to fit a researcher’sown needs and also be used as a reference testbed fornew traffic models.INTRODUCTIONWhen trying to improve traffic, a valid model to workwith is needed.Although some people may assume traffic can bedescribed by departure times and routes with certaindurations, traffic is highly conditioned by anindividual’s private wish for mobility – making uparound 60% of traffic – and due to this, neitherdeparture times nor fixed and earlier known routes areavailable. This is a great problem for modelling trafficitself. Especially the private transit leads to animpossibility of describing traffic by the use ofmathematical formulas. Both, a modern human being’swishes to leave and arrive at certain places and atcertain times on the one hand, and the movement of thevehicle on the street on the other, influence traffic andone another: the street network’s work load depends onthe drivers’ departure times and determines the speedof movement. Vice versa the load affects the departuretimes of the drivers’ as they wish to move fast andarrive at a certain time.Beside this, traffic is conditioned by values like theweather, the infrastructure within the region or otherincidents affecting the system.This complexity yields in varied behaviour of thewhole system where system means the generation oftraffic and traffic itself, and as no valid mathematicalmodels that take into account all these influences areChristian RösselCentre for Applied Informatics CologneWeyertal 80, 50931 Köln, GermanyE-mail: roessel@zpr.uni-koeln.deavailable, simulation is the only way to show weakpoints of the street network or predict its traffic.For this purpose, many simulation software packageswere developed. Some of them were tested within theSMARTEST-project (SMARTEST 1999).Such traffic simulation software packages differ intheir portfolios of modelled artifacts as well as in theirusage paradigm: Some are conceived as Windowsusing applications while other which are rather toolsfor traffic researchers, are simple command-line toolsor programs. SMARTEST also holds a list of featuresthat such packages have.SMARTEST was mostly dealing with microscopicsimulations. Simulations of this type regard singlevehicles as atomic parts, not the whole traffic flowitself (macroscopic) or single parts of the vehicles ordrivers (sub-microscopic). Such vehicle models maybe discrete in time and space using cellular automata oronly discrete in time (Nagel and Schreckenberg 1992,Brockfeld et al 2001) or may even be fully continuousmodels. Figure 1 shows the difference between spacediscrete and space-continuous simulations.Figure 1: Space-discrete vs. Space-continuoussimulationFrom a researcher’s point of view, when using theavailable simulation software packages, severalproblems may arise due to their availability as a readyto-use software black-box, especially whencommercial products are regarded.At first, one can not examine the underlying model of asimulation. Also, due to different softwarearchitectures, a comparison of different models‘features (like simulation speed, its ability to describethe reality, etc.) is difficult if not impossible.Furthermore, such simulation tools can not bespontaneously extended by introducing ones own ideassuch as new types of sensors, measurements or models.

To introduce a tool which accomplishes these not yetsupported tasks, our institute – together with the Centrefor Applied Informatics (Cologne, Germany) – isworking on a traffic simulation software called SUMO(„Simulation of Urban MObility“). In fact, thissoftware is a continuous, microscopic and multi-modaltraffic simulation and is – in spite of it’s name - alsocapable of modelling traffic on networks larger thansingle cities, e.g. highway networks, without anychanges.THE SIMULATIONBasic ParadigmsSUMO is conceived to simulate a traffic road networkof the size of a city.As the simulation is multi-modal, which means that notonly are car movements within the city modelled, butalso public transport systems on the street network,including alternative train networks, the atomic part ofthe simulation is a single human being. This humanbeing is described by a departure time and the routehe/she takes which again is made up of subroutes thatdescribe a single traffic modality.is moving on. The simulation of street vehicles is timediscrete and space-continuous. As our car-driver modelis continuous - as the majority of car-driver models are- we decided to use this approach.When simulating traffic, the street attributes, such asmaximum velocity and right of way rules, areregarded.FeaturesIn the current version – 0.7 – SUMO contains thefollowing features:- collision free vehicle movement- different vehicle types- multi-lane streets with lane changing- junction-based right-of-way rules (junctions withstreets having equal / different priorities, e.g.right-before-left)- lane-to-lane connections- a XML-raw-output containing information aboutthe state of the net for every time step- detectors with independent GnuPlot or CSV(comma separated value) – output- input from XML-files which may be spread overseveral files for a better handlingCar-Driver ModelFigure 2: MultimodalityThus, a simulated person may take his/her car to thenearest public transportation system station andcontinue his travel by other means of transport. Apartfrom movements using motorised vehicles, a personmay also walk. Walking is not simulated at all but ismodelled estimating the time the person needs to reachthe destination. Figure 2 displays a such a compoundroute.The model used currently within SUMO is the Gippsmodel extension (invented and described in: Krauß1998, Janz 1998). It is capable of displaying mainfeatures of traffic like free and congested flow.In each time step the vehicle‘s speed is adapted to thespeed of the leading vehicle in a way that yields to acollision-free system behaviour within the followingsimulation step(s).This velocity is called the safe velocity vsafe, and iscomputed using the following equation:vl(t):g(t):tau:b:Figure 3: Different simulation classes (from left toright: macroscopic, microscopic, sub-microscopic)The traffic flow is simulated microscopically. Thismeans, that every vehicle that moves within thesimulated network is modelled individually and has acertain place and speed. In every time step which has aduration of 1s, these values are updated in dependenceto the vehicle ahead and the street network the vehiclespeed of the leading vehicle in time tgap to the leading vehicle in time tthe driver’s reaction time (usually 1s)the deceleration functionTo bind the acceleration to the vehicle’s physicalabilities, the resulting “wished” or “desired” speed iscomputed as the minimum of the vehicle‘s possiblemaximum velocity, the vehicle’s speed plus themaximum acceleration with the safe velocity computedas shown above, therefore a vehicle will not “drive” or“accelerate” faster than is possible for it:Further, the driver is simulated by assuming he ismaking errors and so fails to perfectly adapt to the

desired velocity. This is done by subtracting a random“human error” from the desired speed:As the vehicle must not drive backwards, once again –after the previous computations – the maximum of thecomputed speed and zero must be taken and will be thevehicle’s final speed for the current time step.This model is collision-free to allow simulationswithout any artifacts that arise from the imperfectionof the underlying model (An impressive in-depthdescription of the model and the underlyingassumptions and rules may be found in Krauß 1998and Janz 1998).Traffic LightsTraffic lights play an important role within the trafficmanagement as they improve traffic flow. Apart fromsimple right-of-way rules, each simulated junction mayalso be a junction with traffic lights. As some junctionsin Germany allow to ignore the red stoplight whenturning right, an extension to the right-of-way rulesregarding this is being implemented.Simulation OutputBy now, two different outputs are available. The first isa so-called „raw“ output which contains all edges(streets) and all lanes along with the vehicles drivingon them for every time step, where vehicles aredescribed by their name, position and speed. Thisoutput is complete and may be used as input to postprocessing tools for evaluation. However, a largesimulation produces a nearly unmanageable amount ofdata, so other outputs have been invented.The first processed output that may be generated by thesimulation, is a log-file made by simulated detectorswhich may be positioned on a certain position of acertain lane. These detectors are a simulation of inductloops and are able to compute the flow, the averagevelocity on the lane, and other values. The results ofthis computation are written into a file using the CSVor the GnuPlot-format. Every detector has it’s own file.Software DevelopmentBeing a tool for traffic researchers, SUMO is designedto be fast and exact instead of trying to be a softwarethat is pleasant to look at. So, although theimplementation of a GUI will be one of our next tasks,the main program is meant to be started from acommand line and produce an output which must bepost-processed when one wants visual results. Thisprevents data arising from the GUI from slowing downthe system, giving more memory and system time tothe simulation itself.SUMO is implemented in C . During development,we try to use only standardised parts of this language.One of them is the STL which – when not comingdirectly with the compiler – may be additionallydownloaded as free implementations exist (STLPort2001). The code is well documented and formatted andwe will follow Ellemtel-guidelines (Ellemtel 19901992) that assure portability compatibility with mostsystems.Due to this, our software is compilable using mostplatforms and we validated this for the followingenvironments:- Windows using MSVC - Solaris using SUN-C -compiler and STL-Port- Linux using gccSimulation BenchmarksThe simulation is capable of simulating large cities likeBerlin, Munich or Cologne on a normal desktopcomputer. Most of our tests were done on Intel PC’srunning at 933MHz and having 256MB of memory.The simulation is capable of simulating around1Million vehicle movements per second depending onthe network’s complexity. Further optimisations willfollow.ExtensibilityHoping for the participation of other interestedpersons, we try to supply potential developers with allinformation needed to extend and modify the program.Beside things like intelligent traffic lights, models forcars equipped with ACC systems, etc., we hope tosupply interested researchers with a common testbedfor their microscopic models.The documentation (SUMO 2002) shows how toextend the simulation – and other tools.ONGOING PROJECTSWithin our institute some projects use SUMO tovalidate their assumptions about new technologies. Thefollowing projects have already started using SUMO orwill use it within the next months:- A project from California, investigates whetherthe detector loops spread on different highwaylanes may be used to predict jams.- We try to validate our traffic flow predictionsbased on floating car data retrieved from Taxis inBerlin, Vienna and Würzburg .- An internal project is trying to predict theadvantages of new sensor technologies, on routeprediction and the concluding traffic light phases.- A project from the US tries to improve trafficwithin a highway off-ramp area.ADDITIONAL TOOLSSUMO consists of more than a single application.Some other modules exist that allow to build assigneddata needed for simulations and research.The following modules are now being developed:

Sumo-netconvertDue to it’s high complexity, the SUMO’s networkdescription is not meant to be generated by a humanuser. Instead, we use this tool to convert common datalike lists of edges and optional nodes into a completeSUMO-network.During this process, SUMO-NETCONVERT reads inthe available data, computes the needed input forSUMO and writes the results into a XML-file.By now, four different input formats may be convertedinto SUMO-networks:- simple XML-data containing edge types, nodesand edges- CSV-data containing edge types, nodes and edges- Cell-input files (Cell is a queue-simulationdeveloped by the ZAIK)- VISUM-networksAs SUMO is used within the INVENT-project, somefurther import functions will be implemented withinthis year: ArcView, VISSIM and possibly GDF wherean indirect import of GDF is already possible byconverting it into XML using a script and then usingthe generated XML-descriptions as input to SUMONETCONVERT.The next figure shows which data may be computedfrom a simple list of nodes and edges. The flow isaligned from left to right and from top to bottom. Thefirst step is to determine the priorities on the junction,the second to compute the relationships between thelanes and edges that may be reached, and within thethird step, the destination edges are split among theincoming lanes. The computation is flexible anddepends on the number of incoming and outgoingedges and their sizes as well as the priorities they havewithin the network and on the resulting type ofjunction.SUMO-NETCONVERT is also responsible for thebuilding of traffic light phases where either thepriorities of the streets that build up a certain junctionor their traffic flows are used. As in the real world – atleast in Germany – phases of traffic are adaptedindividually for each junction and the certain phasedata may not be available for all junctions, we useheuristics to generate a realistic output.Figure 5: The city of Berlin build from high-qualitydigital map dataSumo-routerBeside the static part – the network – the simulationconsists of moving vehicles. With the increase of thequality of simulations, the need to model apopulations’ mobility has increased as well. In suchcases, vehicles are not spread statistically over thenetwork, instead a single person’s daily plan consistingof routes with certain departure times is used. Whiledata needed to describe the departure times and aroute’s origin and destination are given, the routesthemselves must be computed. To avoid onlinecomputation of these during the simulation, thiscomputation is done using a separate module, theSUMO-ROUTER. This module reads the departuretimes, origins and destinations for a set of virtualhumans that will be simulated, then computes theroutes through the network itself using the well-knownDijkstra routing algorithm (Dijkstra 1959).Figure 4: Conversion of simple, plain network datainto a complete descriptionThe next picture shows the need of such a net-buildingtool when a whole city is wished to be modelled.Neither the number of the streets nor the complexity oftheir relationships allows the processing of the networkdescription by a human user.Figure 6: Routing in a small networkAs the speed on the streets changes with the trafficamount and therefore the computation of routes using anetwork where the traffic is not yet known does not

regard the real-world situation, the routing will be doneusing the Dynamic User Equilibrium approachdeveloped by Christian Gawron (Gawron 1998) whererouting and simulation are repeated several times toachieve a real-world behaviour of drivers.Furthermore, the router supports dynamic networkload: the fact that the load on a depends on the time ofday is also regarded.programming languages. This, too, will beinvestigated.Also, as the amount of traffic to be simulated isgrowing and some research experiments need severalsimulations to compute a single value (for instance incase of traffic light optimisation where several timingschemes must be tested), the system will be extendedto allow the usage of computer clusters.PlannedParticipationOther tools are planned due to the growing number ofdifferent projects investigating varoius topics andmethods.Some planned modules are:- traffic light optimisation- post-processing tools for raw-output evaluationWe also hope to gain help from other persons orinstitutes that are interested in traffic simulation andwant to participate on SUMO’s development byextending, improving or simply using and criticizing it.We highly invite you to visit the SUMO-pages SWe try to build and establish a common platform fortraffic research by providing a simulation tool that maybe applied by non-programming users in a simple waysupporting them with methods and tools mostly neededwhen working on traffic simulations. Due to it’s highportability, the tool may be used on different operatingsystems.Besides this, the platform is also extendable by othersin order to allow them to improve the software andinclude ideas we have not taken into account.Additionally, models originally implemented may bereplaced by own methods allowing their comparison tothe existing models in respect to the simulation qualityand speed.Brockfeld, E. et al. 2001. „Optimizing Traffic Lights in aCellular Automaton Model for City Traffic“. In: PhysicalReview E 64, 056132E. W. Dijkstra. 1959. „A note on two problems in connexionwith graphs“. In: Numerische Mathematik, 1:269-271.Directorate General VII - Transport of the EuropeanCommission. „SMARTEST home st/Ellemtel. 1990-1992. Coding Standards tian Gawron. 1998. „Simulation-Based TrafficAssignment“. Inaugural Dissertation.Stefan Janz. 1998. „Mikroskopische Minimalmodelle desStraßenverkehrs“. Diploma Thesis.Stefan Krauß. 1998. „Microscopic Modeling of Traffic Flow:Investigation of Collision Free Vehicle Dynamics“.Hauptabteilung Mobilität und Systemtechnik des DLRKöln. ISSN 1434-8454K. Nagel, M. Schreckenberg. 1992. Journal of Physics I 2,2221STLPort. 2001. Company Homepage.http://www.stlport.org/index.htmlSUMO: G. Hertkorn, D. Krajzewicz, C. Rössel. 2002.SUMO Homepage. http://sumo.sourceforge.netTrollTech. 2002. Troll Tech Homepage.http://www.trolltech.comFUTURE WORKOngoing WorkFurther work will be done as this simulation will beused by our institute for different purposes. Projectsconcerned about the verification of floating car data,the prediction of improvements on traffic foreseeingand traffic light optimisation through new sensors thatobserve traffic will increase the need to extend thesimulation software by artifacts reflecting thesedevices and so will increase the simulation’scomplexity.To trace and validate the simulation, a GUI will beimplemented where the loaded map, together withvehicle movements and generalised information, willbe displayed. To stay portable, the GUI will beimplemented using the Qt-windowing library(TrollTech 2002) which is free to use and available formost systems including Windows, UNIX/Linux andMacintosh. Two different types of GUI support will beimplemented. While the first application is thesimulation itself extended by a windowing system, thesecond will be an interface that soley displays datacoming from simulation module(s).Some running projects have shown the need tointegrate the software into other software packages orto build interfaces between the software and otherBIOGRAPHYBorn in Bydgoszcz, Poland, 1972, DANIELKRAJZEWICZ has finished his study of computerscience at the Technical University in Berlin by themiddle of the year 2000 with artificial intelligence andcomputer graphics as main topics. After work on textclassification he changed to the Institute forTransportation Research of the German AerospaceCentre where he now works on a cognitive drivermodel and an open-source urban traffic simulation.

traffic simulation and is - in spite of it's name - also capable of modelling traffic on networks larger than single cities, e.g. highway networks, without any changes. THE SIMULATION Basic Paradigms SUMO is conceived to simulate a traffic road network of the size of a city. As the simulation is multi-modal, which means that not