Skip to contents

General Setup

Agents

create_agent()
Create an agent
is_tidyabm_agent()
Check if a provided object is of type tidyabm_agent
set_characteristic()
Set an initial characteristic
add_variable()
Add a flexible variable
add_rule()
Add a rule (i.e., an action that is performed under certain conditions)
remove_rule()
Remove a certain rule

Environments

create_grid_environment()
Create an orthogonal grid environment
create_network_environment()
Create a network environment
is_tidyabm_env()
Check if a provided object is of type tidyabm_env
set_characteristic()
Set an initial characteristic
add_variable()
Add a flexible variable
add_rule()
Add a rule (i.e., an action that is performed under certain conditions)
remove_rule()
Remove a certain rule
add_agents()
Add agents to the environment
distribute_characteristic_across_agents()
Distribute a given characteristic across a range of agents

Simulation

Preparation

init()
Initialize the environment and prepare everything for take-off
reset()
Reset an already initiated environment

Running

tick()
Perform one single iteration
iterate()
Take off and iterate
is_ended()
Check if a given environment has ended
is_tickable()
Check if a given environment is ready to tick/iterate

Reporting

convert_agents_to_tibble()
Convert the list of agent tidyabm_agent objects to a tibble
visualize()
Visualize an environment's current state
odd()
Extract compact information for an ODD protocol

Particular Helper Utilities

Generally all Environments

is_tidyabm()
Check if a provided object is of type tidyabm
get_characteristic()
Get an environment's characteristic value
get_variable()
Get an environment's variable value
get_random_agent()
Get a random agent from all agents in the environment
remove_agent()
Remove an agent from an environment
stop_abm()
Claim a simulation to end

Grid Environments

grid_get_free_neighboring_spots()
Get a tibble with two columns (.x and .y) of neighboring free spots
grid_get_free_spots()
Get a tibble with two columns (.x and .y) of all free spots
grid_get_neighbors()
Get a tibble of direct neighbors
grid_move()
Move an agent to the proposed new x/y position (if it is empty)

Network Environments

is_directed()
Check if given tidyabm_env_network is directed
network_get_neighbors()
Get a tibble of direct neighbors
network_connect()
Add a link between source and target agents
network_spread()
Spread a characteristic between source and its links
convert_network_to_tidygraph()
Convert current environment to tidygraph object