Predefined Models
Predefined agent based models exist in the Models
submodule in the form of functions that return model, agent_step!, model_step!
when called.
They are accessed like:
using Agents
model, agent_step!, model_step! = Models.flocking(; kwargs...)
The Examples section of the docs outline how to use and interact with each model.
So far, the predefined models that exist in the Models
sub-module are:
Agents.Models.flocking
— Methodflocking(;
n_birds = 100,
speed = 1.0,
cohere_factor = 0.25,
separation = 4.0,
separate_factor = 0.25,
match_factor = 0.01,
visual_distance = 5.0,
dims = (100, 100),
)
Same as in Flock model.
Agents.Models.forest_fire
— Methodforest_fire(; f = 0.02, d = 0.8, p = 0.01, griddims = (100, 100), seed = 111)
Same as in Forest fire model.
Agents.Models.schelling
— Methodschelling(; numagents = 320, griddims = (20, 20), min_to_be_happy = 3)
Same as in Schelling's segregation model.
Agents.Models.social_distancing
— Methodsocial_distancing(;
infection_period = 30 * steps_per_day,
detection_time = 14 * steps_per_day,
reinfection_probability = 0.05,
isolated = 0.5, # in percentage
interaction_radius = 0.012,
dt = 1.0,
speed = 0.002,
death_rate = 0.044, # from website of WHO
N = 1000,
initial_infected = 5,
seed = 42,
βmin = 0.4,
βmax = 0.8,
)
Same as in Continuous space social distancing for COVID-19.