Performance Improvements for Large-Scale Traffic Simulation in MATSim

  • Rashid A. WaraichEmail author
  • David Charypar
  • Michael Balmer
  • Kay W. Axhausen
Part of the Geotechnologies and the Environment book series (GEOTECH, volume 13)


In contrast to aggregated macroscopic models of traffic simulation, multi-agent microscopic models, such as MATSim, enable modeling of individual behavior and facilitate more detailed traffic analysis. However, such detailed modeling also leads to an increased computational burden, such that simulation performance becomes critical.

This paper looks specifically at the MATSim simulation framework and proposes several ways to improve its performance. This is achieved through a combination of several approaches, including reducing disk access, decoupling computational tasks, and making use of parallel computing. Additionally, for the traffic simulation, an event-based model is adopted instead of a fixed-increment time advance approach.

Experiments show that by applying these methods, a simulation speedup of four times and more is achieved (depending on the scenario) when compared to the current Java micro-simulation in MATSim.

Initial simulation experiments on a high-resolution navigation network of Switzerland – containing around one million roads and 7.3 million agents – demonstrate that real-world scenarios can now be executed in around one-and-a-half weeks using the improved model. Ways to further shorten the computational time of MATSim are also described.


Large-scale traffic simulation Agent-based modeling Parallelization 


  1. Amdahl G (1967) Validity of the single processor approach to achieving large scale computing capabilities. In: Spring joint computer conference. ACM, New York, pp 483–485Google Scholar
  2. Axhausen KW (1988) Eine ereignisorientierte simulation von Aktivitätenketten zur Parkstandswahl. Ph.D. thesis, University of Karlsruhe, Karlsruhe (in German)Google Scholar
  3. Axhausen KW, Gärling T (1992) Activity based approaches to travel analysis: conceptual frameworks, models and research problems. Transp Rev 12(4):323–341CrossRefGoogle Scholar
  4. Balmer M, Rieser M, Meister K, Charypar D, Lefebvre N, Nagel K (2009) MATSim-T: architecture and simulation times. In: Bazzan ALC, Klügl F (eds) Multi-agent systems for traffic and transportation engineering. Information Science Reference, Hershey, pp 57–78CrossRefGoogle Scholar
  5. Barceló J, Ferrer JL, García D, Florian M, Le Saux E (1998) Parallelization of microscopic traffic simulation for ATT systems analysis. In: Equilibrium and advanced transportation modelling. Springer, New York, pp 1–26CrossRefGoogle Scholar
  6. Ben-Akiva M, Bierlaire M, Koutsopoulos H, Mishalani R (1998) DynaMIT: a simulation-based system for traffic prediction. In: DACCORS short term forecasting workshop, The Netherlands, February 1998.Google Scholar
  7. Cayford R, Wie-Hua L, Daganzo CF (1997) The NETCELL simulation package: technical description. California PATH research report UCB–ITS–PRR–97–23, University of California, Berkeley, CAGoogle Scholar
  8. Cetin N (2005) Large-scale parallel graph-based simulations. Ph.D. thesis, ETH Zurich, Zurich.Google Scholar
  9. Charypar D, Axhausen KW, Nagel K (2007a) An event-driven queue-based traffic flow microsimulation. Transp Res Rec 2003:35–40CrossRefGoogle Scholar
  10. Charypar D, Axhausen KW, Nagel K (2007b) An event-driven parallel queue-based microsimulation for large scale traffic scenarios. In: The 11th world conference on transportation research, Berkeley, June 2007Google Scholar
  11. Ciari F, Balmer M, Axhausen KW (2008) Concepts for a large scale car-sharing system: modelling and evaluation with an agent-based approach, Arbeitsberichte Verkehrs und Raumplanung, 517. IVT, ETH Zürich, ZürichGoogle Scholar
  12. de Dios Ortúzar J, Willumsen LG (2011) Modelling transport, 4th edn. Wiley, ChichesterCrossRefGoogle Scholar
  13. Fellendorf M, Vortisch P (2010) Microscopic traffic flow simulator VISSIM. In: Barceló J (ed) Fundamentals of traffic simulation. Springer, New York, pp 63–93CrossRefGoogle Scholar
  14. Hahne E (1991) Round-Robin scheduling for max-fin fairness in data networks. IEEE J Select Areas Commun 9(7):1024–1039CrossRefGoogle Scholar
  15. Holland JH (1992) Adaptation in natural and artificial systems: an introductory analysis with applications to biology, control, and artificial intelligence. MIT Press, CambridgeGoogle Scholar
  16. Lea D (1999) Concurrent programming in Java: design principles and patterns. Addison-Wesley Longman Publishing Co., Inc., BostonGoogle Scholar
  17. Lindholm T, Yellin F (1999) Java virtual machine specification. Addison-Wesley Longman Publishing Co., Inc., BostonGoogle Scholar
  18. MATSim (2009) Multi agent transportation simulation toolkit. Webpage:, August 2009
  19. Meister K, Balmer M, Axhausen KW, Nagel K (2006) planomat: a comprehensive scheduler for a large-scale multi-agent transportation simulation. Paper presented at the 11th international conference on travel behaviour research, Kyoto, August 2006Google Scholar
  20. Meister K, Balmer M, Ciari F, Horni A, Rieser M, Waraich RA, Axhausen KW (2010) Large-scale agent-based travel demand optimization applied to Switzerland, including mode choice. In: The 12th world conference on transportation research, Lisbon, July 2010Google Scholar
  21. Nagel K, Rickert M (2001) Parallel implementation of the TRANSIMS micro-simulation. Parallel Comput 27(12):1611–1639CrossRefGoogle Scholar
  22. NAVTEQ (2009) NAVTEQ. Webpage: June 2009
  23. Nökel K, Schmidt M (2002) Parallel DYNEMO: meso-scopic traffic flow simulation on large networks. Netw Spatial Econ 2(4):387–403CrossRefGoogle Scholar
  24. OMNeT++ (2009) OMNeT++. Webpage:
  25. Raney B, Cetin N, Völlmy A, Vrtic M, Axhausen K, Nagel K (2003) An agent-based microsimulation model of Swiss travel: first results. Netw Spatial Econ 3(1):23–41CrossRefGoogle Scholar
  26. Snir M, Otto S, Walker D, Dongarra J, Huss-Lederman S (1995) MPI: the complete reference. MIT Press, Cambridge, MAGoogle Scholar
  27. Strippgen D, Nagel K (2009) Using common graphics hardware formulti-agent traffic simulation with cuda. In: Simutools’09: proceedings of the 2nd international conference on simulation tools and techniques. ICST, Brussels, pp 1–8Google Scholar
  28. Waraich RA, Galus MD, Dobler C, Balmer M, Andersson G, Axhausen KW (2009) Plug-in hybrid electric vehicles and smart grid: investigations based on a micro-simulation. In: Proceedings of the 12th international conference on travel behaviour research (IATBR), Jaipur, December 2009Google Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Rashid A. Waraich
    • 1
    Email author
  • David Charypar
    • 1
  • Michael Balmer
    • 2
  • Kay W. Axhausen
    • 1
  1. 1.Institute for Transport Planning and Systems (IVT)ETH ZurichZurichSwitzerland
  2. 2.Senozon AGZürichSwitzerland

Personalised recommendations