![for loop netlogo for loop netlogo](https://i1.rgstatic.net/publication/267326417_Towards_NetLogo_and_JADE_Integration_an_industrial_agent-in-the-loop_approach/links/55279baa0cf229e6d6362dcb/largepreview.png)
This is not a problem because globals with unspecified values in the OpenMOLE NetLogoTask will take the default values defined in widgets.
![for loop netlogo for loop netlogo](http://ccl.northwestern.edu/netlogo/models/models/3D/Code%20Examples/Uniform%20Distribution%20on%20a%20Sphere%20Example%203D.png)
Models must be used in headless mode with OpenMOLE. In OpenMOLE however, the NetLogo program has to be parameterised without the GUI. In the NetLogo World, setting or getting a value on the model inputs is generally achieved by calling set or get on the widget object.
#FOR LOOP NETLOGO CODE#
Sometimes, you have to modify your code slightly to make it purely headless so that it can be run everywhere.Īs such, many variables of a model developed in NetLogo are set through widgets (a graphical component). Netlogo combines a GUI created by the user, in which they can define parameters and run functions, and the source code itself. You can get the NetLogo implementation of the model here. More elaborated methods, in the case of a calibration of a stochastic model with a genetic algorithm for example, will automatically deal with this compromise (see this page for more info on genetic algorithms and calibration). When designing your experiment, you will have to find a compromise between the precision on stochasticity and the number of parameter points explored. This stays a too small sample to draw up any robust conclusion on this simple model, but we take this value here for the sake of illustration. In this example case, we will perform 10 replications per step. Results for each replication will be stored it in a CSV file. Since the Fire model is stochastic, we are interested in doing replications for each instance of the density factor. To do this, let's build a design of experiment where the density factor ranges from 20% to 80% by steps of 10. We would like to study the impact of the density factor for a fixed population size. The former mapping syntax using netLogoInputs and netLogoOutputs is deprecated, but still works until further notice, for compatibility reasons.
#FOR LOOP NETLOGO GENERATOR#
random-seed initializing the random number generator of NetLogo using the seed provided by OpenMOLE,.In this example, the command list contains: NetLogo6Task(workDirectory / "ogo", cmds) set (
#FOR LOOP NETLOGO HOW TO#
Here is an example on how to write the NetLogo task for the model ogo: The task comes in two versions : NetLogo5Task and NetLogo6Task, be sure to select the right version of the task according to the version of NetLogo you are using (5 or 6).