Functions to get or set the names of the origin locations in a spatial interaction model.
Value
for origin_names
NULL
or a character vector with one name
per origin locations in the model. for origin_names<-
the modified
sim
object
Examples
positions <- matrix(rnorm(10 * 2), ncol = 2)
rownames(positions) <- LETTERS[1:10]
distances <- as.matrix(dist(positions))
production <- rep(1, 10)
attractiveness <- rep(1, 10)
## the row/column names of the cost matrix are used for the location
model <- static_blvim(distances, production, 1.5, 1, attractiveness)
origin_names(model)
#> [1] "A" "B" "C" "D" "E" "F" "G" "H" "I" "J"
origin_names(model) <- letters[11:20]
origin_names(model)
#> [1] "k" "l" "m" "n" "o" "p" "q" "r" "s" "t"