Description Usage Arguments Value See Also Examples
Create parameter sets with "one-at-a-time" (OAT) approach
1 | nl_param_oat(n, ...)
|
n |
Number of parameter sets per parameter |
... |
Named list of parameter ranges (numeric vectors) Minimum and maximum values are used as a range and median as the default value. Parameters with only 1 value are treated as constants. |
A data frame with parameter value sets
See also nl_param_lhs
for latin cube and
nl_param_fast
for FAST parameter sampling.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | # create 5 values for every parameter:
nl_param_oat(n = 5, P1 = c(1, 4, 10), P2 = c(4, 11, 20))
# using constant parameters:
nl_param_oat(n = 5, P1 = c(1, 4, 10), P2 = c(4, 11, 20), P3 = 6)
# define NetLogo experiment with OAT design:
experiment <- nl_experiment(
model_file = "models/Sample Models/Biology/Flocking.nlogo",
setup_commands = c("setup", "repeat 100 [go]"),
iterations = 5,
param_values = nl_param_oat(
n = 25, # create 25 value sets per parameter
max_align_turn = c(0, 5, 20),
max_cohere_turn = c(0, 3, 20),
max_separate_turn = c(0, 1.5, 20),
vision = c(1, 3, 10),
minimum_separation = c(0, 3, 10),
.dummy = c(0,0.5,1),
world_size = 50,
population = 80
),
mapping = nl_default_mapping,
step_measures = measures(
converged = "1 -
(standard-deviation [dx] of turtles +
standard-deviation [dy] of turtles) / 2",
mean_crowding =
"mean [count flockmates + 1] of turtles"
),
eval_criteria = criteria(
c_converged = mean(step$converged),
c_mcrowding = mean(step$mean_crowding)
),
repetitions = 10, # repeat simulations 10 times
random_seed = 1:10
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.