nl_set_run_options: Set run options of a NetLogo experiment object

Description Usage Arguments Value Examples

Description

You can set basic run options when creating experiment object with nl_experiment. To change these or add additional options use nl_set_run_options

Usage

1
2
3
nl_set_run_options(experiment, random_seed = NULL, repetitions = 1,
  max_minutes = 10, setup_commands = "setup", go_command = "go",
  data_handler = NULL)

Arguments

experiment

NetLogo experiment object from nl_experiment() function

random_seed

Random seed

repetitions

Number of repetitions (when random seed is not defined)

max_minutes

If max.minutes > 0 the execution stops after the defined number of minutes (with an error and no return value) Default value is 10.

setup_commands

NetLogo command strings to execute to setup the model

go_command

NetLogo command string to execute the step in the model

data_handler

Function to handle observations. If handler is defined the observations will not be stored in result elements when running the experiment with 'nl_run' function.

Value

NetLogo experiment object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
experiment <- nl_experiment(
  model_file = "my_model.nlogo",
  while_condition = "any? turtles"
)

experiment <- nl_set_run_options(
  experiment,
  repetitions = 3,
  setup_commands = c("setup", "change_something")
)

bergant/nlexperiment documentation built on May 12, 2019, 3:05 p.m.