Description Usage Arguments Value
View source: R/simulate-agents.R
Initialize array for agent simulations
1 2 3 4 5 6 7 | initialize_agent_array(
init_vals,
max_T,
n_sims,
birth_dates = NULL,
birth_states = NULL
)
|
init_vals |
vector of length K corresponding to the initial values in each state. This will be over-ridden by birth_dates and birth_states if those are not NULL. |
max_T |
total number of discrete time steps |
n_sims |
number of simulations to run |
birth_dates |
vector of size N, the maximum number of agents where each entry is the 'birth' of the agent into the system |
birth_states |
which state an agent begins when born into the system |
n_sims x n_agents x (max_T + 1) array where entry ijt is the state of agent j in simulation i at time t-1. The states they can take are integers between -1 (not born yet) and K-1 where 0 to K-1 correspond to different states.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.