qertdiscounts.blogg.se

Netlogo code examples
Netlogo code examples







netlogo code examples
  1. Netlogo code examples how to#
  2. Netlogo code examples generator#

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.

netlogo code examples

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.

  • mapped output: similar syntax to collect outputs of the model (the string can be any NetLogo command).
  • If the variables have the same name, you can use the shorter syntax inputs += prototype.mapped
  • mapped input: the syntax inputs += prototype mapped "netlogo-variable" establishes a link between the workflow variable prototype (Val) and the corresponding netlogo variable name "netlogo-variable" (String).
  • netlogo code examples

  • seed random seed, optional, defaults to None.
  • reuseWorkspace should the same workspace be reused when executing on a given jvm (use to avoid MetaSpace errors with large NetLogo models loading several extensions when executed a large number of times on the same jvm), optional, defaults to false.
  • netlogo code examples

    embedWorkspace should the workspace be embedded for execution of the model (use if you have source files or extensions in the model directory), optional, defaults to false.launchingCommands NetLogo commands to be executed, mandatory.The arguments for a NetLogoTask are the following : It is written as netLogoOutputs in the definition of the task. Similarly, an output of the model is considered and collected by OpenMOLE at the end of each model execution. Therefore they appear as inputs of the NetLogoTask. The replication and density OpenMOLE variables are used as parameters of the NetLogo program. If you use the forever button go in the NetLogo GUI don't forget that you will need something like "while " in the command list, as openmole won't loop your go function by default. For this particular model, this function is called until no more turtles are active. setup calling the setup function of the nlogo file,.

    Netlogo code examples 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 (

    Netlogo code examples 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). the list of NetLogo commands to be run by OpenMOLE.OpenMOLE provides a NetLogo task which expects the following parameters: It is conceived to be accessible to non-programmers and thus enhances inter-disciplinarity in the construction of simulation models, but can also be used to program large scale complex models (despite its bad reputation, see this paper testing NetLogo speed performance and suggesting code improvements).Īs it runs on the JVM, it is naturally integrated into OpenMOLE. NetLogo is a widely used agent-based modeling platform and language developed by CCL at Northwestern University (see the official website).









    Netlogo code examples