Abstract
This chapter provides the reader with a practical introduction to agent-based modeling via the Repast Simphony Agent Based Modeling toolkit. Using examples of agent-based models from an earlier chapter, we look in detail at how to build models using the Groovy programming language, which is based on Java. We illustrate some of the ways in which a toolkit such as Repast considerably simplifies the life of the modeler by providing extensive support for agent creation, model visualization, charting of results, and multiple runs.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
At the time of writing, the current version is 2.3.
- 2.
An alternative primitive for creating a turtle is to hatch it, since real turtles lay eggs.
- 3.
Note that for the figure here we changed the color of the patches to white, which is not reflected in the code shown in Code 3.8.
- 4.
Time in Repast is measured as a double-precision floating-point number so the values in the arguments to @ScheduledMethod have to be written as 0d and 1d rather than 0 and 1.
- 5.
The folder is named from the project name with a .rs suffix added.
References
North, M., Collier, N., Ozik, J., Tatara, E., Altaweel, M., Macal, C., Bragen, M., Sydelko, P.: Complex adaptive systems modeling with Repast Simphony. Complex Adapt. Syst. Model. 1(1), 1–26 (2013). http://www.casmodeling.com/content/1/1/3
Argonne National Laboratory: The repast suite. http://repast.sourceforge.net/. Accessed 8 June 2015
Barnes, D.J., Kölling, M.: Objects First with Java—A Practical Introduction Using BlueJ, 5th edn. Pearson Education, Prentice Hall (2012)
Foundation, E.: Eclipse integrated development environment. http://www.eclipse.org/. Accessed 8 June 2015
Groovy: Groovy—an agile dynamic language for the Java platform. http://groovy.codehaus.org/. Accessed 8 June 2015
Resnick, M.: Turtles, Termites, and Traffic Jams: Explorations in Massively Parallel Microworlds. MIT Press, Cambridge (1994)
Foundation, L.: Logo foundation. http://el.media.mit.edu/logo-foundation. Accessed 8 June 2015
Resnick, M.: Star logo. http://education.mit.edu/starlogo/. Accessed 8 June 2015
Wilensky, U.: Netlogo. https://ccl.northwestern.edu/netlogo/ (1999)
Argonne National Laboratory: Relogo primitives. http://repast.sourceforge.net/docs/api/repast_simphony/ReLogoPrimitives.html. Accessed 8 June 2015
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2015 Springer-Verlag London
About this chapter
Cite this chapter
Barnes, D.J., Chu, D. (2015). ABMs Using Repast Simphony. In: Guide to Simulation and Modeling for Biosciences. Simulation Foundations, Methods and Applications. Springer, London. https://doi.org/10.1007/978-1-4471-6762-4_3
Download citation
DOI: https://doi.org/10.1007/978-1-4471-6762-4_3
Published:
Publisher Name: Springer, London
Print ISBN: 978-1-4471-6761-7
Online ISBN: 978-1-4471-6762-4
eBook Packages: Computer ScienceComputer Science (R0)