Skip to main content

HLogo: A Haskell STM-Based Parallel Variant of NetLogo

  • Conference paper
  • First Online:
Simulation and Modeling Methodologies, Technologies and Applications (SIMULTECH 2016)

Abstract

Agent-based Modeling and Simulation (ABMS) has become a quite popular approach among researchers in the community, mainly due to its simplicity, expressiveness and wide applicability. However, in most cases, ABMS tools demonstrate reduced performance, especially when dealing with large experiments. This paper presents HLogo, a parallel variant of the NetLogo ABMS framework, that aims to increase the performance of simulations by utilizing Software Transactional Memory and multi-core CPUs, while maintaining the user friendliness of NetLogo. HLogo is implemented as a Domain Specific Language embedded in the functional language Haskell, which means that it also inherits Haskell’s features, such as strong static typing, a module system and a vast collection of programming libraries.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    The actual definition of \(\mathtt{Monad}\) offers a slightly different and richer set of operations [26].

  2. 2.

    The actual symbol in Haskell is \(\mathtt{{<}\!\!{-}}\) instead of \(\leftarrow \). We use the later just for improving the presentation.

References

  1. Haskell, an advanced, purely functional programming language. https://www.haskell.org/

  2. Grimm, V., et al.: A standard protocol for describing individual-based and agent-based models. Ecol. Modell. 198(1–2), 115–126 (2006)

    Article  Google Scholar 

  3. Berndsen, J.: The Hasim package. https://hackage.haskell.org/package/hasim

  4. Bezirgiannis, N., Prasetya, I.S.W.B., Sakellariou, I.: HLogo: a parallel Haskell variant of NetLogo. In: Proceedings of the 6th International Conference on Simulation and Modeling Methodologies, Technologies and Applications, SIMULTECH, pp. 119–128. SciTePress (2016)

    Google Scholar 

  5. Bjesse, P., Claessen, K., Sheeran, M., Singh, S.: Lava: hardware design in Haskell. In: Proceedings of the 3rd ACM SIGPLAN International Conference on Functional Programming. ACM (1998)

    Google Scholar 

  6. Castle, C.J.E., Crooks, A.T.: Principles and concepts of agent-based modelling for developing geospatial simulations, September 2006

    Google Scholar 

  7. Claessen, K., Pałka, M.H.: Splittable pseudorandom number generators using cryptographic hashing. In: ACM SIGPLAN Notices, vol. 48, pp. 47–58. ACM (2013)

    Google Scholar 

  8. Deissenberg, C., van der Hoog, S., Dawid, H.: EURACE: a massively parallel agent-based model of the European economy. Appl. Math. Comput. 204(2), 541–552 (2008)

    MATH  MathSciNet  Google Scholar 

  9. Discolo, A., Harris, T., Marlow, S., Peyton, Singh, S.: Lock-free data structures using STMs in Haskell, April 2006

    Google Scholar 

  10. D’Souza, R.M., Lysenko, M., Rahmani, K.: SugarScape on steroids: simulating over a million agents at interactive rates (2007)

    Google Scholar 

  11. Elliott, C.: Functional images. In: The Fun of Programming. Cornerstones of Computing. Palgrave, Basingstoke (2003)

    Google Scholar 

  12. Epstein, J., Black, A.P., Peyton-Jones, S.: Towards Haskell in the cloud. In: ACM SIGPLAN Notices, vol. 46, pp. 118–129. ACM (2011)

    Google Scholar 

  13. Epstein, J.M., Axtell, R.: Growing Artificial Societies: Social Science from the Bottom Up. Brookings Institution Press, Washington, D.C. (1996)

    Google Scholar 

  14. Gill, A.: Domain-specific languages and code synthesis using haskell. Queue 12(4), 30 (2014)

    Google Scholar 

  15. Grimm, V., Revilla, E., Berger, U., Jeltsch, F., Mooij, W.M., Railsback, S.F., Thulke, H.H., Weiner, J., Wiegand, T., DeAngelis, D.L.: Pattern-oriented modeling of agent-based complex systems: lessons from ecology. Science 310(5750), 987–991 (2005)

    Article  Google Scholar 

  16. Hybinette, M., Kraemer, E., Xiong, Y., Matthews, G., Ahmed, J.: SASSY: a design for a scalable agent-based simulation system using a distributed discrete event infrastructure, pp. 926–933 (2006)

    Google Scholar 

  17. Kiran, M., Richmond, P., Holcombe, M., Chin, L. S., Worth, D., Greenough, C.: FLAME: simulating large populations of agents on parallel hardware architectures. In: International Foundation for Autonomous Agents and Multiagent Systems, pp. 1633–1636 (2010)

    Google Scholar 

  18. Knight, T.: An architecture for mostly functional languages. In: LFP 1986, pp. 105–112. ACM, New York (1986)

    Google Scholar 

  19. Koehler, M., Tivnan, B., Upton, S.: Clustered computing with Netlogo and RepastJ: beyond chewing gum and duct tape (2005)

    Google Scholar 

  20. Kupke, F.K.: Robust distributed software transactions for Haskell. Ph.D. thesis, Christian-Albrechts Universität Kiel (2010)

    Google Scholar 

  21. Logan, B., Theodoropoulos, G.: The distributed simulation of multiagent systems. Proc. IEEE 89(2), 174–185 (2001)

    Article  Google Scholar 

  22. Massaioli, F., Castiglione, F., Bernaschi, M.: OpenMP parallelization of agent-based models. Parallel Comput. 31(10), 1066–1081 (2005)

    Article  Google Scholar 

  23. Milner, R.: A theory of type polymorphism in programming. J. Comput. Syst. Sci. 17(3), 348–375 (1978)

    Article  MATH  MathSciNet  Google Scholar 

  24. North, M.J., Collier, N.T., Ozik, J., Tatara, E.R., Macal, C.M., Bragen, M., Sydelko, P.: Complex adaptive systems modeling with repast simphony. Complex Adapt. Syst. Model. 1(1), 1–26 (2013)

    Article  Google Scholar 

  25. Perfumo, C., Sönmez, N., Stipic, S., Unsal, O., Cristal, A., Harris, T., Valero, M.: The limits of software transactional memory (STM): dissecting Haskell STM applications on a many-core environment. In: CF 2008, pp. 67–78. ACM (2008)

    Google Scholar 

  26. Peterson, J., Hager, G.: Monadic robotics. In: Proceedings of the 2nd Conference on Domain-Specific Languages, DSL 1999, pp. 95–108. ACM, New York (1999)

    Google Scholar 

  27. Peyton Jones, S.L., Wadler, P.: Imperative functional programming. In: Proceedings of the 20th Symposium on Principles of Programming Languages, POPL. ACM (1993)

    Google Scholar 

  28. Pogson, M., Smallwood, R., Qwarnstrom, E., Holcombe, M.: Formal agent-based modelling of intracellular chemical interactions. Biosystems 85(1), 37–45 (2006)

    Article  Google Scholar 

  29. Railsback, S.F., Lytinen, S.L., Jackson, S.K.: Agent-based simulation platforms: review and development recommendations. SIMULATION 82(9), 609–623 (2006)

    Article  Google Scholar 

  30. Riley, P.F., Riley, G.F.: Next generation modeling III - agents: spades—a distributed agent simulation environment with software-in-the-loop execution. In: WSC 2003, Winter Simulation Conference, pp. 817–825 (2003)

    Google Scholar 

  31. Sakellariou, I., Kefalas, P., Stamatopoulou, I.: Enhancing NetLogo to simulate BDI communicating agents. In: Artificial Intelligence: Theories, Models and Applications. LNCS, vol. 5138, pp. 263–275. Springer (2008)

    Google Scholar 

  32. Salamon, T.: Design of Agent-Based Models. Eva & Tomas Bruckner Publishing, Repin (2011)

    Google Scholar 

  33. Shavit, N., Touitou, D.: Software transactional memory. In: PODC 1995, pp. 204–213. ACM (1995)

    Google Scholar 

  34. Sheard, T., Jones, S.P.: Template meta-programming for Haskell. SIGPLAN Not. 37(12), 60–75 (2002)

    Article  Google Scholar 

  35. Sorokin, D.: Aivika. http://www.aivikasoft.com/en/products/aivika.html

  36. Tobias, R., Hofmann, C.: Evaluation of free java-libraries for social-scientific agent based simulation. J. Artif. Soc. Soc. Simul. 7(1), 6 (2004)

    Google Scholar 

  37. Van Deursen, A., Klint, P., Visser, J.: Domain-specific languages: an annotated bibliography. Sigplan Not. 35(6), 26–36 (2000)

    Article  Google Scholar 

  38. Wilensky, U.: NetLogo (1999)

    Google Scholar 

  39. Wilensky, U.: Statistical mechanics for secondary school: the GasLab multi-agent modeling toolkit. Int. J. Comput. Math. Learn. 8(1), 1–41 (2003)

    Article  Google Scholar 

  40. Wilkerson-Jerde, M., Wilensky, U.: Restructuring change, interpreting changes: the deltatick modeling and analysis toolkit (2010)

    Google Scholar 

Download references

Acknowledgements

This work was partially funded by the EU project FP7-610582 ENVISAGE: Engineering Virtualized Services (http://envisage-project.eu). All the benchmarks in this work were carried out on the Dutch national HPC e-infrastructure, kindly provided by the SURF Foundation (http://surf.nl).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Nikolaos Bezirgiannis .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer International Publishing AG

About this paper

Cite this paper

Bezirgiannis, N., Prasetya, I.S.W.B., Sakellariou, I. (2018). HLogo: A Haskell STM-Based Parallel Variant of NetLogo. In: Obaidat, M., Ören, T., Merkuryev, Y. (eds) Simulation and Modeling Methodologies, Technologies and Applications. SIMULTECH 2016. Advances in Intelligent Systems and Computing, vol 676. Springer, Cham. https://doi.org/10.1007/978-3-319-69832-8_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-69832-8_7

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-69831-1

  • Online ISBN: 978-3-319-69832-8

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics