skip to main content
10.1145/3557989.3566157acmconferencesArticle/Chapter ViewAbstractPublication PagesgisConference Proceedingsconference-collections
research-article

Mesa-Geo: A GIS Extension for the Mesa Agent-Based Modeling Framework in Python

Published:01 November 2022Publication History

ABSTRACT

Mesa is an open-source agent-based modeling (ABM) framework implemented in the Python programming language, allowing users to build and visualize agent-based models. It has been used in a diverse range of application areas over the years ranging from biology to workforce dynamics. However, there has been no direct support for integrating geographical data from geographical information systems (GIS) into models created with Mesa. Users have had to rely on their own implementations to meet such needs. In this paper we present Mesa-Geo, a GIS extension for Mesa, which allows users to import, manipulate, visualise and export geographical data for ABM. We introduce the main components and functionalities of Mesa-Geo, followed by example applications utilizing geographical data which demonstrates Mesa-Geo's core functionalities and features common to agent-based models. Finally, we conclude with a discussion and outlook on future directions for Mesa-Geo.

References

  1. Sameera Abar, Georgios K. Theodoropoulos, Pierre Lemarinier, and Gregory M. P. O'Hare. 2017. Agent Based Modelling and Simulation Tools: a Review of the State-of-Art Software. Computer Science Review 24 (May 2017), 13--33. Google ScholarGoogle ScholarCross RefCross Ref
  2. Taylor Anderson and Suzana Dragicevic. 2018. Geographic Network Automata for Representing Complex Evolving Spatial Systems. In GeoSim '18: Proceedings of the 1st ACM SIGSPATIAL International Workshop on GeoSpatial Simulation. Seattle, WA, 5--8.Google ScholarGoogle Scholar
  3. Alessia Antelmi, Gennaro Cordasco, Matteo D'Auria, Daniele De Vinco, Alberto Negro, and Carmine Spagnuolo. 2019. On Evaluating Rust as a Programming Language for the Future of Massive Agent-Based Simulations. In Methods and Applications for Modeling and Simulation of Complex Systems (Communications in Computer and Information Science), Gary Tan, Axel Lehmann, Yong Meng Teo, and Wentong Cai (Eds.). Springer, Singapore, 15--28. Google ScholarGoogle ScholarCross RefCross Ref
  4. Robert Axelrod. 1997. The Complexity of Cooperation: Agent-Based Models of Competition and Collaboration. Princeton University Press. Google ScholarGoogle ScholarCross RefCross Ref
  5. C Michael Barton, Isaac Ullah, Gary Mayer, Sean Bergin, Hessam Sarjoughian, and Helena Mitasova. 2017. MedLanD Modeling Laboratory (Version 1.1.0). CoMSES Computational Model Library. https://www.comses.net/codebases/4609/releases/1.1.0/Google ScholarGoogle Scholar
  6. Itzhak Benenson and Paul M. Torrens. 2004. Geosimulation: Automata-Based Modelling of Urban Phenomena. John Wiley & Sons, London, UK.Google ScholarGoogle Scholar
  7. Jon Louis Bentley. 1975. Multidimensional Binary Search Trees Used for Associative Searching. Commun. ACM 18, 9 (Sept. 1975), 509--517. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Andrei Borshchev. 2014. Multi-Method Modelling: AnyLogic. In Discrete-Event Simulation and System Dynamics for Management Decision Making. John Wiley & Sons, Ltd, 248--279. Google ScholarGoogle ScholarCross RefCross Ref
  9. Paul Box. 2002. Spatial Units as Agents: Making the Landscape an Equal Player in Agent-Based Simulations. In Integrating Geographic Information Systems and Agent-Based Modeling Techniques for Understanding Social and Ecological Processes, H Randy Gimblett (Ed.). Oxford University Press, 0. Google ScholarGoogle ScholarCross RefCross Ref
  10. Paul W. Box. 2001. Kenge GIS - CA class template for Swarm. Natural Resources and Environmental Issues 8 (2001), 6. https://digitalcommons.usu.edu/nrei/vol8/iss1/6Google ScholarGoogle Scholar
  11. Daniel G. Brown, Rick Riolo, Derek T. Robinson, Michael North, and William Rand. 2005. Spatial Process and Data Models: Toward Integration of Agent-Based Models and GIS. Journal of Geographical Systems 7, 1 (May 2005), 25--47. Google ScholarGoogle ScholarCross RefCross Ref
  12. H. Butler, M. Daly, A. Doyle, Sean Gillies, T. Schaub, and Stefan Hagen. 2016. The GeoJSON Format. Technical Report RFC 7946. Internet Engineering Task Force. Google ScholarGoogle Scholar
  13. Howard Butler, Sean Gillies, et al. 2019--. Rtree: Spatial Indexing for Python. https://github.com/Toblerity/rtreeGoogle ScholarGoogle Scholar
  14. Stephen Cass. 2022. Top Programming Languages 2022: Python's Still No. 1, but Employers Love to See SQL Skills. IEEE Spectrum (2022). https://spectrum.ieee.org/top-programming-languages-2022Google ScholarGoogle Scholar
  15. Moongi Choi and Alexander Hohl. 2021. Investigating Spatiotemporal Indoor Contact Patterns Using ABM and STKDE. In GeoSim '21: Proceedings of the 4th ACM SIGSPATIAL International Workshop on GeoSpatial Simulation. Beijing, China, 1--8.Google ScholarGoogle Scholar
  16. Mark Coletti. 2012. The GeoMason Cookbook. (2012). https://cs.gmu.edu/~eclab/projects/mason/extensions/geomason/geomason.pdfGoogle ScholarGoogle Scholar
  17. Nick Collier. 2003. RePast: An Extensible Framework for Agent Simulation. http://www2.econ.iastate.edu/tesfatsi/RePastTutorial.Collier.pdfGoogle ScholarGoogle Scholar
  18. Nicholson Collier and Michael North. 2013. Parallel Agent-Based Simulation With Repast for High Performance Computing. SIMULATION 89, 10 (Oct. 2013), 1215--1235. Google ScholarGoogle ScholarCross RefCross Ref
  19. Nicholson Collier and Michael J North. 2004. Repast for Python Scripting. In Proceedings of the Agent 2004 Conference on Social Dynamics: Interaction, Reflexivity and Emergence. 231--237.Google ScholarGoogle Scholar
  20. Nicholson T. Collier, Jonathan Ozik, and Eric R. Tatara. 2020. Experiences in Developing a Distributed Agent-Based Modeling Toolkit with Python. In 2020 IEEE/ACM 9th Workshop on Python for High-Performance and Scientific Computing (PyHPC). 1--12. Google ScholarGoogle ScholarCross RefCross Ref
  21. CoMSES. 2007--2022. CoMSES Catalog. Retrieved May 14, 2022 from https://catalog.comses.net/visualization/Google ScholarGoogle Scholar
  22. Andrew Crooks. 2017. Cellular Automata. In International Encyclopedia of Geography. John Wiley & Sons, Ltd, 1--9. Google ScholarGoogle ScholarCross RefCross Ref
  23. Andrew Crooks and Christian Castle. 2012. The Integration of Agent-Based Modelling and Geographical Information for Geospatial Simulation. In Agent-based Models of Geographical Systems, Alison Heppenstall, Andrew Crooks, Linda M. See, and Michael Batty (Eds.). Springer, New York, NY, 219--252.Google ScholarGoogle Scholar
  24. Andrew Crooks, Christian Castle, and Michael Batty. 2008. Key Challenges in Agent-Based Modelling for Geo-Spatial Simulation. Computers, Environment and Urban Systems 32, 6 (Nov. 2008), 417--430. Google ScholarGoogle ScholarCross RefCross Ref
  25. Andrew Crooks, Nick. Malleson, Ed. Manley, and Alison Heppenstall. 2019. Agent-Based Modelling and Geographical Information Systems: A Practical Primer. Sage, London, UK.Google ScholarGoogle Scholar
  26. Andrew Crooks, Nicolas Malleson, Ed Manley, and Alison Heppenstall. 2019. Fundamentals of Geographical Information Systems. In Agent-Based Modelling and Geographical Information Systems: A Practical Primer, Richard Harris, Robert Rojek, John Nightingale, Katherine Haw, and Richard Leigh (Eds.). SAGE, Chapter 5, 95--124.Google ScholarGoogle Scholar
  27. George Datseris, Ali R. Vahdati, and Timothy C. DuBois. 2022. Agents.jl: A Performant and Feature-Full Agent-Based Modeling Software of Minimal Code Complexity. SIMULATION (Jan. 2022), 00375497211068820. Google ScholarGoogle ScholarCross RefCross Ref
  28. Owen Densmore. 2012. AgentScript. https://github.com/backspaces/agentscriptGoogle ScholarGoogle Scholar
  29. Environmental Systems Research Institute, Inc. 1998. ESRI Shapefile Technical Description. Technical Report. Environmental Systems Research Institute, Inc, Redlands, CA. https://www.esri.com/library/whitepapers/pdfs/shapefile.pdfGoogle ScholarGoogle Scholar
  30. Martin Fleischmann. 2019. momepy: Urban Morphology Measuring Toolkit. Journal of Open Source Software 4, 43 (2019), 1807. Google ScholarGoogle ScholarCross RefCross Ref
  31. Joël Foramitti. 2021. AgentPy: a Package for Agent-Based Modeling in Python. Journal of Open Source Software 6, 62 (June 2021), 3065. Google ScholarGoogle ScholarCross RefCross Ref
  32. Nigel Gilbert. 2020. Agent-Based Models. SAGE Publications, Inc. Google ScholarGoogle ScholarCross RefCross Ref
  33. Sean Gillies et al. 2007--. Shapely: Manipulation and Analysis of Geometric Objects. https://github.com/shapely/shapelyGoogle ScholarGoogle Scholar
  34. Sean Gillies, B Ward, AS Petersen, et al. 2013. Rasterio: Geospatial Raster I/O for Python Programmers. https://github.com/rasterio/rasterioGoogle ScholarGoogle Scholar
  35. Samuel Glismann. 2021. Ancillary Services Acquisition Model: Considering Market Interactions in Policy Design. Applied Energy 304 (Dec. 2021), 117697. Google ScholarGoogle ScholarCross RefCross Ref
  36. GRASS Development Team. 2022. Geographie Resources Analysis Support System (GRASS GIS) Software. Open Source Geospatial Foundation, USA. https://grass.osgeo.orgGoogle ScholarGoogle Scholar
  37. Aric Hagberg, Pieter Swart, and Daniel S Chult. 2008. Exploring Network Structure, Dynamics, and Function Using NetworkX. Technical Report LA-UR-08-05495; LA-UR-08-5495. Los Alamos National Lab. (LANL), Los Alamos, NM (United States). https://www.osti.gov/biblio/960616Google ScholarGoogle Scholar
  38. Alison Heppenstall, Andrew Crooks, Nick Malleson, Ed Manley, Jiaqi Ge, and Michael Batty. 2021. Future Developments in Geographical Agent-Based Models: Challenges and Opportunities. Geographical Analysis 53, 1 (2021), 76--91.Google ScholarGoogle ScholarCross RefCross Ref
  39. Alison Heppenstall, Nick Malleson, and Andrew Crooks. 2016. "Space, the Final Frontier": How Good Are Agent-Based Models at Simulating Individuals and Space in Cities? Systems 4, 1 (2016), 9.Google ScholarGoogle ScholarCross RefCross Ref
  40. Google Inc. 2008--. Protocol Buffers - Google's Data Interchange Format. https://developers.google.com/protocol-buffers/Google ScholarGoogle Scholar
  41. Kevin M. Johnston (Ed.). 2013. Agent Analyst: Agent-Based Modeling in ArcGIS. Esri Press, Redlands, CA.Google ScholarGoogle Scholar
  42. Kelsey Jordahl. 2014. GeoPandas: Python Tools for Geographic Data. https://github.com/geopandas/geopandasGoogle ScholarGoogle Scholar
  43. Jackie Kazil, David Masad, and Andrew Crooks. 2020. Utilizing Python for Agent-Based Modeling: The Mesa Framework. In Social, Cultural, and Behavioral Modeling, Robert Thomson, Halil Bisgin, Christopher Dancy, Ayaz Hyder, and Muhammad Hussain (Eds.). Springer International Publishing, Cham, 308--317. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. Jayanta Kshirsagar, Akshay Dewan, and Harshal Hayatnagarkar. 2020. EpiRust: Towards A Framework For Large-scale Agent-based Epidemiological Simulations Using Rust Language. Google ScholarGoogle ScholarCross RefCross Ref
  45. Gail Langran. 1992. Time in Geographic Information Systems. CRC Press. Google ScholarGoogle ScholarCross RefCross Ref
  46. Leaflet. 2022. Basemap Providers. Retrieved Aug 24, 2022 from https://leafletjs.com/plugins.html#basemap-providersGoogle ScholarGoogle Scholar
  47. Jose Miguel Leon-Blanco, P. L. Gonzalez-R, Jose L. Andrade-Pineda, D. Canca, and M. Calle. 2022. A Multi-Agent Approach to the Truck Multi-Drone Routing Problem. Expert Systems with Applications 195 (June 2022), 116604. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Sean Luke. 2011. Multiagent Simulation and the MASON Library. https://cs.gmu.edu/~eclab/projects/mason/manual.pdfGoogle ScholarGoogle Scholar
  49. Sean Luke, Claudio Cioffi-Revilla, Liviu Panait, Keith Sullivan, and Gabriel Balan. 2005. MASON: A Multiagent Simulation Environment. SIMULATION 81, 7 (July 2005), 517--527. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Sean Luke, Robert Simon, Andrew Crooks, Haoliang Wang, Ermo Wei, David Freelan, Carmine Spagnuolo, Vittorio Scarano, Gennaro Cordasco, and Claudio Cioffi-Revilla. 2018. The MASON Simulation Toolkit: Past, Present, and Future. In Proceedings of the 19th International Workshop on Multi-Agent-Based Simulation, Paul Davidsson and Harko Verhagen (Eds.). Stockholm, Sweden, 75--87.Google ScholarGoogle Scholar
  51. David J Maguire. 2005. Towards a GIS Platform for Spatial Analysis and Modelling. GIS, Spatial Analysis, and Modelling (2005), 19--39.Google ScholarGoogle Scholar
  52. Steven Manson, Li An, Keith C. Clarke, Alison Heppenstall, Jennifer Koch, Brittany Krzyzanowski, Fraser Morgan, David O'Sullivan, Bryan C. Runck, Eric Shook, and Leigh Tesfatsion. 2020. Methodological Issues of Spatial Agent-Based Models. Journal of Artificial Societies and Social Simulation 23, 1 (2020), 3. Google ScholarGoogle ScholarCross RefCross Ref
  53. David Masad and Jacqueline Kazil. 2015. Mesa: An Agent-Based Modeling Framework. In Proceedings of the 14th Python in Science Conference. Austin, TX, 51--58. Google ScholarGoogle ScholarCross RefCross Ref
  54. Mesa. 2022. Repositories that Depend on Mesa. Retrieved Aug 24, 2022 from https://github.com/projectmesa/mesa/network/dependentsGoogle ScholarGoogle Scholar
  55. Mesa. 2022. Sugarscape Constant Growback model. https://github.com/projectmesa/mesa/blob/main/examples/sugarscape_cg/Readme.mdGoogle ScholarGoogle Scholar
  56. Alexander Michels, Jeon-Young Kang, and Shaowen Wang. 2020. An Exploration of the Effect of Buyer Preference and Market Composition on the Rent Gradient Using the ALMA Framework. In GeoSim '20: Proceedings of the 3rd ACM SIGSPATIAL International Workshop on GeoSpatial Simulation. Seattle, WA, 48--51.Google ScholarGoogle Scholar
  57. Nelson Minar, Roger Burkhart, Chris Langton, and Manor Askenazi. 1996. The Swarm Simulation System: A Toolkit for Building Multi-Agent Simulations. Technical Report. Santa Fe Institute. http://sfi-edu.s3.amazonaws.com/sfi-edu/production/uploads/sfi-com/dev/uploads/filer/8a/2a/8a2ae001-9ad5-43e6-b7e3-4d951223e9e8/96-06-042.pdfGoogle ScholarGoogle Scholar
  58. Jose Marie Antonio Minoza, Vena Pearl Bongolan, and Joshua Frankie Rayo. 2021. COVID-19 Agent-Based Model with Multi-Objective Optimization for Vaccine Distribution. Technical Report arXiv:2101.11400. arXiv. Google ScholarGoogle Scholar
  59. Michael J. North, Nicholson T. Collier, Jonathan Ozik, Eric R. Tatara, Charles M. Macal, Mark Bragen, and Pam Sydelko. 2013. Complex Adaptive Systems Modeling with Repast Simphony. Complex Adaptive Systems Modeling 1, 1 (March 2013), 3. Google ScholarGoogle ScholarCross RefCross Ref
  60. Michael J North, Thomas R Howe, Nick T Collier, and Jerry R Vos. 2005. The Repast Simphony Development Environment. In Proceedings of the Agent 2005 Conference on Generative Social Processes, Models, and Mechanisms, Vol. 13. 15.Google ScholarGoogle Scholar
  61. Claudio Nägeli, Martin Jakob, Giacomo Catenazzi, and York Ostermeyer. 2020. Towards Agent-Based Building Stock Modeling: Bottom-up Modeling of Long-Term Stock Dynamics Affecting the Energy and Climate Impact of Building Stocks. Energy and Buildings 211 (March 2020), 109763. Google ScholarGoogle ScholarCross RefCross Ref
  62. Dawn C. Parker, Steven M. Manson, Marco A. Janssen, Matthew J. Hoffmann, and Peter Deadman. 2003. Multi-Agent Systems for the Simulation of Land-Use and Land-Cover Change: A Review. Annals of the Association of American Geographers 93, 2 (June 2003), 314--337. Google ScholarGoogle ScholarCross RefCross Ref
  63. Fabian Pedregosa, Gaël Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier Grisel, Mathieu Blondel, Peter Prettenhofer, Ron Weiss, Vincent Dubourg, Jake Vanderplas, Alexandre Passos, David Cournapeau, Matthieu Brucher, Matthieu Perrot, and Édouard Duchesnay. 2011. Scikit-Learn: Machine Learning in Python. J. Mach. Learn. Res. 12, null (Nov. 2011), 2825--2830.Google ScholarGoogle Scholar
  64. PySAL. 2022. PySAL: Python Spatial Analysis Library. Retrieved Aug 24, 2022 from https://pysal.org/Google ScholarGoogle Scholar
  65. QGIS Development Team. 2022. QGIS Geographic Information System. QGIS Association. https://www.qgis.orgGoogle ScholarGoogle Scholar
  66. Eric Russell and Uri Wilensky. 2008. Consuming Spatial Data in NetLogo Using the GIS Extension. In The Annual Meeting of the Swarm Development Group. Chicago, Il.Google ScholarGoogle Scholar
  67. Thomas C. Schelling. 1971. Dynamic Models of Segregation. The Journal of Mathematical Sociology 1, 2 (July 1971), 143--186. Google ScholarGoogle ScholarCross RefCross Ref
  68. Michael Seid, David Bridgeland, Alexandra Bridgeland, and David M. Hartley. 2021. A Collaborative Learning Health System Agent-Based Model: Computational and Face Validity. Learning Health Systems 5, 3 (July 2021), e10261. Google ScholarGoogle ScholarCross RefCross Ref
  69. Nikita Smirnov and Sven Tomforde. 2022. Navigation Support for an Autonomous Ferry Using Deep Reinforcement Learning in Simulated Maritime Environments. In 2022 IEEE Conference on Cognitive and Computational Aspects of Situation Management (CogSIMA). IEEE, 142--149. Google ScholarGoogle ScholarCross RefCross Ref
  70. Keith Sullivan, Mark Coletti, and Sean Luke. 2010. GeoMason: Geospatial Support for MASON. Technical Report. Department of Computer Science, George Mason University.Google ScholarGoogle Scholar
  71. Asia Air Survey and NextGIS. 2013--. Modules for Land Use Change Simulations. https://github.com/nextgis/molusceGoogle ScholarGoogle Scholar
  72. Patrick Taillandier, Benoit Gaudou, Arnaud Grignard, Quang-Nghi Huynh, Nicolas Marilleau, Philippe Caillou, Damien Philippon, and Alexis Drogoul. 2019. Building, Composing and Experimenting Complex Spatial Models With the GAMA Platform. GeoInformatica 23, 2 (April 2019), 299--322. Google ScholarGoogle ScholarDigital LibraryDigital Library
  73. GRASS Development Team. 2003--2022. r.agent - GRASS GIS Reference Manual. https://grass.osgeo.org/grass80/manuals/addons/r.agent.htmlGoogle ScholarGoogle Scholar
  74. Kelly Thorp and Kevin Bronson. 2013. A Model-Independent Open-Source Geospatial Tool for Managing Point-Based Environmental Model Simulations at Multiple Spatial Locations. Environmental Modelling & Software 50 (Dec. 2013), 25--36. Google ScholarGoogle ScholarDigital LibraryDigital Library
  75. Seth Tisue and Uri Wilensky. 2004. NetLogo: A Simple Environment for Modeling Complexity. In International Conference on Complex Systems, Vol. 21. 16--21.Google ScholarGoogle Scholar
  76. Paul M Torrens and Simin Gu. 2021. Real-time Experiential Geosimulation in Virtual Reality With Immersion-emission. In GeoSim '21: Proceedings of the 4th ACM SIGSPATIAL International Workshop on GeoSpatial Simulation. Beijing, China, 19--28.Google ScholarGoogle Scholar
  77. Jerry R Vos. 2005. Repast .NET : The Repast Framework Implemented in the .NET Framework. In Annual Conference of the North American Association for Computational Social and Organizational Science (NAACSOS).Google ScholarGoogle Scholar
  78. Gerd Wagner and Luis G. Nardin. 2018. Adding Agent Concepts to Object Event Modeling and Simulation. In 2018 Winter Simulation Conference (WSC). 893--904. Google ScholarGoogle ScholarCross RefCross Ref
  79. Haoliang Wang, Ermo Wei, Robert Simon, Sean Luke, Andrew Crooks, David Freelan, and Carmine Spagnuolo. 2018. Scalability in the MASON Multi-Agent Simulation System. In 2018 IEEE/ACM 22nd International Symposium on Distributed Simulation and Real Time Applications (DS-RT). 1--10. Google ScholarGoogle ScholarCross RefCross Ref
  80. Uri Wilensky. 1999. NetLogo. http://ccl.northwestern.edu/netlogo. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.Google ScholarGoogle Scholar
  81. Uri Wilensky. 2006. NetLogo Grand Canyon Model. http://ccl.northwestern.edu/netlogo/models/GrandCanyonGoogle ScholarGoogle Scholar
  82. Michael Wooldridge and Nicholas R. Jennings. 1995. Intelligent Agents: Theory and Practice. The Knowledge Engineering Review 10, 2 (1995), 115--152. Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Mesa-Geo: A GIS Extension for the Mesa Agent-Based Modeling Framework in Python

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          GeoSim '22: Proceedings of the 5th ACM SIGSPATIAL International Workshop on GeoSpatial Simulation
          November 2022
          30 pages
          ISBN:9781450395373
          DOI:10.1145/3557989

          Copyright © 2022 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 1 November 2022

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

          Acceptance Rates

          Overall Acceptance Rate16of24submissions,67%
        • Article Metrics

          • Downloads (Last 12 months)99
          • Downloads (Last 6 weeks)21

          Other Metrics

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader