Modular functions for the disease simulator for initializing, calculating and collecting simulator results.
disease_results(
replicates,
time_steps,
seasons,
stages,
compartments,
coordinates,
initial_abundance,
results_selection = NULL,
results_breakdown = NULL
)List of result functions:
initialize_attributes = function())Constructs and returns an initialized nested list for the selected result attributes.
initialize_replicate = function(results)Initializes and returns nested result attributes at the start of each replicate.
calculate_at_season = function(r, tm, season,
segment_abundance, harvested, results)Appends and calculates (non-NULL) results and returns nested result attributes at the end of each season within time step (tm) within replicate (r).
calculate_at_timestep = function(r, tm, segment_abundance,
harvested, results)Appends and calculates (non-NULL) results and returns nested result attributes at the end of each time step (tm) within replicate (r).
finalize_attributes = function(results)Finalizes result calculations at the end of the simulation.
Number of replicate simulation runs.
Number of simulation time steps.
Number of seasons per time step.
Number of life cycle stages.
Number of disease compartments.
Data frame (or matrix) of X-Y population coordinates.
Matrix of initial abundances at each combination of stage and compartment (in rows) for each population (in columns).
List of results selection from: "abundance" (default), "ema", "extirpation", "extinction_location", "harvested", "occupancy"; "summarize" (default) or "replicate". "summarize" calculates mean, sd, min and max across replicates. "replicate" returns results separately for each replicate.
A string with one of these values: "segments" (default), "compartments", "stages" or "pooled." "segments" returns results for each segment (stage x compartment combination.) "compartments" returns results for each disease compartment. "stages" returns results for each life cycle stage. "pooled" returns results that are not broken down by stage or compartment.