OpenCL for Large-Scale Agent-Based Simulations

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10448)


NetLogo is a Java-based multi-agent programmable modeling environment. Our aim is to improve the execution speed of NetLogo models with large number of agents by means of heterogeneous computing. Firstly, we describe OpenCL as a suitable computing platform. Then we propose a new NetLogo-to-OpenCL extension (NL2OCL) which encapsulates functionality of OpenCL and enables NetLogo to undertake agents’ computations simultaneously on graphic processor units. The architecture of our extension is presented. An experimental flocking model with 40,000 agents is used for evaluation of NL2OCL functioning. When using NL2OCL the simulation runs more than 300-times faster than the original model which was created in NetLogo solely. It means that with NL2OLC, drawbacks in maximum size of the NetLogo model and the simulation speed are tackled. Our approach allows using standard PC configurations with suitable graphical cards for large agent-based simulations while preserving advantages of NetLogo. It is a good alternative for researchers who cannot afford high performance computational systems.


Agent-based simulation Heterogeneous computing OpenCL NetLogo 



The financial support of the Specific Research Project Autonomous Socio-Economics Systems of FIM UHK is gratefully acknowledged.


  1. 1.
    Kravari, K., Bassiliades, N.: A survey of agent platforms. J. Artif. Soc. Soc. Simul. 18(1), 11 (2015)CrossRefGoogle Scholar
  2. 2.
    OpenABM Homepage. Accessed 26 Apr 2017
  3. 3.
    NetLogo Homepage. Accessed 26 Apr 2017
  4. 4.
    Deissenberg, C.H., Hoog, V.D., Dawid, H.: EURACE: massively parallel agent-based model of the European economy. Accessed 26 Apr 2017
  5. 5.
    Railsback S., Ayllón, D., et al.: Improving execution speed of models implemented in NetLogo. J. Artif. Soc. Soc. Simul. 20(1) (2017)Google Scholar
  6. 6.
    OpenCL Homepage. Accessed 26 Apr 2017
  7. 7.
    Mittal, S., Vetter, J.: A survey of CPU-GPU heterogenous computing techniques. ACM Comput. Surv. 47, 69 (2015)CrossRefGoogle Scholar
  8. 8.
    Souza, A.M., Pereira, F.D., Ordonez, E.D.M.: Exploiting heterogenous systems: Keccak on OpenCL. In: The 2013 International Conference on Parallel and Distributed, Processing Techniques and Applications (PDPTA’13) (2013)Google Scholar
  9. 9.
    Bourd, A. (ed.): The OpenCL Specification, version 2.2. Accessed 26 Apr 2017
  10. 10.
    Gaster, B.R., et al.: Heterogenous Computing with OpenCL. Elsevier, Amsterdam (2012)Google Scholar
  11. 11.
    Wilensky, U.: NetLogo flocking model. Accessed 26 Apr 2017
  12. 12.
    Hermellin, E., Michel, F.: GPU environmental delegation of agent perceptions: application to Reynolds’s boids. In: Gaudou, B., Sichman, J.S. (eds.) MABS 2015. LNCS, vol. 9568, pp. 71–86. Springer, Cham (2016). doi: 10.1007/978-3-319-31447-1_5CrossRefGoogle Scholar
  13. 13.
    Fachada, N., Lopes, V.V., Martins, R.C., Rosa, A.C.: Parallelization strategies for spatial agent-based models. Int. J. Parallel Program. 45(3), 449–481 (2017)CrossRefGoogle Scholar
  14. 14.
    Lysenko, M., D’Souza, R.M.: A framework for megascale agent based model simulations on graphics processing units. J. Artif. Soc. Soc. Simul. 11(4), 10 (2008)Google Scholar
  15. 15.
    Berkel, S., et al.: Automatic discovery of algorithms for multi-agent systems. In: Proceedings of the 14th Annual Conference Companion on Genetic and Evolutionary Computation (GECCO 2012), Philadelphia, USA (2012)Google Scholar
  16. 16.
    Ernsting, S., Kuchen, M.: Data parallel algorithmic skeletons with accelerator support. Int. J. Parallel Program. 45(2), 283–299 (2016)CrossRefGoogle Scholar
  17. 17.
    Wrede, F., Ernsting, S.: Simultaneous CPU–GPU execution of data parallel algorithmic skeletons. Int. J. Parallel Program., 1–20 (2017)Google Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  1. 1.University of Hradec KrálovéHradec KrálovéCzech Republic

Personalised recommendations