NetLogo is a agent-based simulation language and a modeling environment created and developed by Uri Wilensky.
The standard tool to model parameter sweeping with NetLogo is BehaviorSpace. This tutorial is for NetLogo's users who want to use KissCluster to distribute their BehaviorSpace simulation computations across a large group of computers.
The standard KissCluster-NetLogo integration approach consists of the following steps:
-
In your NetLogo model add a global variable
JOB_ID
in this way you will be able to map KissCluster jobs to NetLogos's execution steps. -
Use BehaviorSpace to define your model sweep.
- In vary variables field as the first variable add
["JOB_ID" 0]
. - Add other variables that you wish to sweep over in the vary variables field. However we recommed to use only a single value for each variable and use bash script for variable sweeping instead (see
sample_app_netlogo/
folder for an example). - Set the reporters depending on your modelling needs.
- Define model termination condition.
- In vary variables field as the first variable add
-
Save the model
-
Extract model setup xml from
*.nlogo
file (it is at the end of the file) -
Create a script that will update your
*.xml
file with regard tojob_id
(seesample_app_netlogo/
folder for an example) -
Use
netlogo-headless.sh
to run the NetLogo simulation with your*.xml
parametrization -
Prepare a cluster node with Java, NetLogo, xmlstartlet, jq and awscli
-
Submit job to the cluster.
Please node that many configurations are possible. In particular possible parameter space sweeping modes as well as simulation run iterations include: BehaviorSpace-managed or KissCluster-managed or mixed modes.