configure_graph: Graph configuration

Description Usage Arguments Value Examples

View source: R/configure_graph.R

Description

Tranforms network data from source network and zones

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
configure_graph(
  network,
  zones,
  turn_penalty = F,
  left_side = F,
  addvalue_cols = F,
  weighted = F,
  performance_measures = F,
  use_cost_col = F
)

Arguments

network

sf object containing network data

zones

sf object containing zone data

turn_penalty

Adds turn penalty (see dodgr documentation on turn penalty from function 'R/weight-streetnet.R')

left_side

Does traffic travel on the left side of the road (TRUE) or the right side (FALSE)? - only has effect on turn angle calculations for edge times. (see dodgr documentation on turn penalty from function 'R/weight-streetnet.R')

addvalue_cols

Does network shapefile has columns 'addv_fw' and 'addv_bw' for added cost in links? (TRUE) or (FALSE)

weighted

Does network shapefile has columns 'wg_fw' and 'wg_bw' for a cost multiplication factor in links? (TRUE) or (FALSE)

performance_measures

Does network shapefile has columns 'alpha' and 'beta' for usage on BPR funcion? (TRUE) or (FALSE)

use_cost_col

Use time column as cost (opposite to speed and distance)? (TRUE) or (FALSE)

Value

graph object ready for usage on solve_ue() function

Examples

1
2
3
flist <- configure_graph(sioux_network,sioux_zones,use_cost_col=TRUE)
graph <- flist[[1]]
zones <- flist[[2]]

douglascm/trafficr documentation built on March 13, 2020, 11:44 a.m.