Skip to contents

Extract the common cost matrix from a collection of spatial interaction models

Usage

# S3 method for class 'sim_list'
costs(sim, ...)

Arguments

sim

a collection of spatial interaction models, an object of class sim_list

...

additional parameters

Value

the cost matrix

See also

Examples

distances <- french_cities_distances[1:10, 1:10] / 1000 ## convert to km
production <- rep(1, 10)
attractiveness <- log(french_cities$area[1:10])
all_flows <- grid_blvim(
  distances, production, c(1.25, 1.5),
  c(1, 2, 3, 4) / 500, attractiveness
)
## should be TRUE
identical(distances, costs(all_flows))
#> [1] TRUE