Creates a demand responsive transport representation of in an Area of Interest (AOI). The constructor takes a polygon (aoi), point population values (pop) and the number of virtual stations to plan as input. Then it retrieves the street network in the area of interest from OSM. Based on the OSM data a routing graph for walking and driving is created.
drt_drtm( model_name, aoi, pop, n_vir, m_seg = 100, calc_energy = e_walkDrive_pop )
model_name | character, name of the drtm. |
---|---|
aoi | sf, polygon of the Area of Interest (AOI). |
pop | sf, centroids of a hectaraster population dataset covering the full extent of the 'aoi' input (column name for population must be 'n'). |
n_vir | numeric, number of the virtual stations to place. |
m_seg | numeric, resolution of the road segmentation in meters. |
calc_energy | function, energy calculation function. |
A demand responsive transport model of class 'drtm'.
#> Reading layer `aoi' from data source `/home/runner/work/_temp/Library/drtplanr/example.gpkg' using driver `GPKG' #> Simple feature collection with 1 feature and 6 fields #> geometry type: POLYGON #> dimension: XY #> bbox: xmin: 7.4947 ymin: 47.0366 xmax: 7.5359 ymax: 47.0599 #> geographic CRS: WGS 84#> Reading layer `pop' from data source `/home/runner/work/_temp/Library/drtplanr/example.gpkg' using driver `GPKG' #> Simple feature collection with 150 features and 4 fields #> geometry type: POINT #> dimension: XY #> bbox: xmin: 7.496534 ymin: 47.04012 xmax: 7.524167 ymax: 47.0581 #> geographic CRS: WGS 84# Create model m <- drt_drtm( model_name = "Jegenstorf", aoi = aoi, pop = pop, n_vir = 10, m_seg = 100 )#>#>#>#>#>#>#>m#> Error in diff(m$e$value): object 'm' not found