Returns the number of iterations used to produce of a collection of spatial interaction models
Source:R/sim_list.R
grid_sim_iterations.Rd
The function reports for each spatial interaction model of its sim_list
parameter the number of iterations used to produce it (see sim_iterations()
)
Details
Notice that sim_iterations()
is generic and can be applied directly to
sim_list
objects. The current function is provided to be explicit in R code
about what is a unique model and what is a collection of models (using
function names that start with "grid_"
)
Examples
positions <- matrix(rnorm(15 * 2), ncol = 2)
distances <- as.matrix(dist(positions))
production <- rep(1, 15)
attractiveness <- rep(1, 15)
all_flows <- grid_blvim(distances,
production,
c(1.1, 1.25, 1.5),
c(1, 2, 3),
attractiveness,
bipartite = FALSE,
epsilon = 0.1,
iter_max = 750,
)
grid_sim_iterations(all_flows)
#> [1] 751 751 300 751 751 600 751 751 751