Learn R Programming

blvim (version 0.1.1)

origin_positions: Positions of origin locations in a spatial interaction model

Description

Functions to get or set the positions of the origin locations in a spatial interaction model.

Usage

origin_positions(sim)

origin_positions(sim) <- value

Value

for origin_positions

NULL or the coordinate matrix for the origin locations. for origin_positions<- the modified sim object

Arguments

sim

a spatial interaction model object

value

a matrix with as many rows as the number of origin locations and 2 or 3 columns, or NULL

Positions

Location positions are given by numeric matrices with 2 or 3 columns. The first two columns are assumed to be geographical coordinates while the 3rd column can be used for instance to store altitude. Coordinates are interpreted as is in graphical representations (see autoplot.sim()). They are not matched to the costs as those can be derived from complex movement models and other non purely geographic considerations.

See Also

location_positions(), destination_positions()

Examples

Run this code
positions <- as.matrix(french_cities[1:10, c("th_longitude", "th_latitude")])
distances <- french_cities_distances[1:10, 1:10] / 1000 ## convert to km
production <- rep(1, 10)
attractiveness <- rep(1, 10)
model <- static_blvim(distances, production, 1.5, 1 / 250, attractiveness)
origin_positions(model) <- positions
origin_positions(model)

Run the code above in your browser using DataLab