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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
The actual definition of \(\mathtt{Monad}\) offers a slightly different and richer set of operations [26].
- 2.
The actual symbol in Haskell is \(\mathtt{{<}\!\!{-}}\) instead of \(\leftarrow \). We use the later just for improving the presentation.
References
Haskell, an advanced, purely functional programming language. https://www.haskell.org/
Grimm, V., et al.: A standard protocol for describing individual-based and agent-based models. Ecol. Modell. 198(1–2), 115–126 (2006)
Berndsen, J.: The Hasim package. https://hackage.haskell.org/package/hasim
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)
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)
Castle, C.J.E., Crooks, A.T.: Principles and concepts of agent-based modelling for developing geospatial simulations, September 2006
Claessen, K., Pałka, M.H.: Splittable pseudorandom number generators using cryptographic hashing. In: ACM SIGPLAN Notices, vol. 48, pp. 47–58. ACM (2013)
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)
Discolo, A., Harris, T., Marlow, S., Peyton, Singh, S.: Lock-free data structures using STMs in Haskell, April 2006
D’Souza, R.M., Lysenko, M., Rahmani, K.: SugarScape on steroids: simulating over a million agents at interactive rates (2007)
Elliott, C.: Functional images. In: The Fun of Programming. Cornerstones of Computing. Palgrave, Basingstoke (2003)
Epstein, J., Black, A.P., Peyton-Jones, S.: Towards Haskell in the cloud. In: ACM SIGPLAN Notices, vol. 46, pp. 118–129. ACM (2011)
Epstein, J.M., Axtell, R.: Growing Artificial Societies: Social Science from the Bottom Up. Brookings Institution Press, Washington, D.C. (1996)
Gill, A.: Domain-specific languages and code synthesis using haskell. Queue 12(4), 30 (2014)
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)
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)
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)
Knight, T.: An architecture for mostly functional languages. In: LFP 1986, pp. 105–112. ACM, New York (1986)
Koehler, M., Tivnan, B., Upton, S.: Clustered computing with Netlogo and RepastJ: beyond chewing gum and duct tape (2005)
Kupke, F.K.: Robust distributed software transactions for Haskell. Ph.D. thesis, Christian-Albrechts Universität Kiel (2010)
Logan, B., Theodoropoulos, G.: The distributed simulation of multiagent systems. Proc. IEEE 89(2), 174–185 (2001)
Massaioli, F., Castiglione, F., Bernaschi, M.: OpenMP parallelization of agent-based models. Parallel Comput. 31(10), 1066–1081 (2005)
Milner, R.: A theory of type polymorphism in programming. J. Comput. Syst. Sci. 17(3), 348–375 (1978)
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)
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)
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)
Peyton Jones, S.L., Wadler, P.: Imperative functional programming. In: Proceedings of the 20th Symposium on Principles of Programming Languages, POPL. ACM (1993)
Pogson, M., Smallwood, R., Qwarnstrom, E., Holcombe, M.: Formal agent-based modelling of intracellular chemical interactions. Biosystems 85(1), 37–45 (2006)
Railsback, S.F., Lytinen, S.L., Jackson, S.K.: Agent-based simulation platforms: review and development recommendations. SIMULATION 82(9), 609–623 (2006)
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)
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)
Salamon, T.: Design of Agent-Based Models. Eva & Tomas Bruckner Publishing, Repin (2011)
Shavit, N., Touitou, D.: Software transactional memory. In: PODC 1995, pp. 204–213. ACM (1995)
Sheard, T., Jones, S.P.: Template meta-programming for Haskell. SIGPLAN Not. 37(12), 60–75 (2002)
Sorokin, D.: Aivika. http://www.aivikasoft.com/en/products/aivika.html
Tobias, R., Hofmann, C.: Evaluation of free java-libraries for social-scientific agent based simulation. J. Artif. Soc. Soc. Simul. 7(1), 6 (2004)
Van Deursen, A., Klint, P., Visser, J.: Domain-specific languages: an annotated bibliography. Sigplan Not. 35(6), 26–36 (2000)
Wilensky, U.: NetLogo (1999)
Wilensky, U.: Statistical mechanics for secondary school: the GasLab multi-agent modeling toolkit. Int. J. Comput. Math. Learn. 8(1), 1–41 (2003)
Wilkerson-Jerde, M., Wilensky, U.: Restructuring change, interpreting changes: the deltatick modeling and analysis toolkit (2010)
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
Corresponding author
Editor information
Editors and Affiliations
Rights 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)