Description Usage Arguments Details Value Examples
Uses sensitivity
from fast package to calculate
a series of model outputs according to the FAST alogrithm
1 | nl_get_fast_sensitivity(result, criteria)
|
result |
A nlexperiment result object |
criteria |
Name of evaluation criteria |
Only works when parameter value sets are defined with
nl_param_fast
function.
Criteria must be defined in experiment (see nl_experiment
,
eval_criteria
argument).
Sensitivity is callculated for every simulation iteration (run_id).
A data frame with sensitivity from simulation results for every simulation repetition (run_id)
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 42 43 44 45 46 | ## Not run:
experiment <- nl_experiment(
model_file = "models/Sample Models/Biology/Flocking.nlogo",
setup_commands = c("setup", "repeat 100 [go]"),
iterations = 5,
param_values = nl_param_fast(
world_size = 50,
population = 80,
max_align_turn = c(1, 5, 20),
max_cohere_turn = c(1, 3, 20),
max_separate_turn = c(1, 1.5, 20),
vision = c(1, 3, 10),
minimum_separation = c(1, 3, 10)
),
mapping = c(
max_align_turn = "max-align-turn",
max_cohere_turn = "max-cohere-turn",
max_separate_turn = "max-separate-turn",
minimum_separation = "minimum-separation",
world_size = "world-size",
),
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( # aggregate over iterations
c_converged = mean(step$converged),
c_mcrowding = mean(step$mean_crowding)
),
repetitions = 10, # repeat simulations 10 times
random_seed = 1:10
)
#run experiment
result <- nl_run(experiment, parallel = TRUE)
#get sensitivity data
sensitivity_data <- nl_get_fast_sensitivity(result, "c_converged")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.