Skip to contents

Some spatial interaction models are the result of an iterative calculation, see for instance blvim(). This calculation may have been interrupted before convergence. The present function returns TRUE if the calculation converged, FALSE if this was not the case and NA if the spatial interaction model is not the result of an interative calculation .

Usage

sim_converged(sim, ...)

Arguments

sim

a spatial interaction model object

...

additional parameters

Value

TRUE, FALSE or NA, as described above

See also

Examples

positions <- matrix(rnorm(10 * 2), ncol = 2)
distances <- as.matrix(dist(positions))
production <- rep(1, 10)
attractiveness <- c(2, rep(1, 9))
model <- static_blvim(distances, production, 1.5, 1, attractiveness)
sim_converged(model) ## must be NA
#> [1] NA