PathCost | R Documentation |
This function calculates the path costs as a function of link flows over network. BPR link cost functions are assumed.
PathCost(x, A = diag(length(x)), Alpha, Beta, pow = 4)
x |
Traffic flow on all links of network |
A |
link-path incidence matrix |
Alpha |
Vector of free flow travel time parameters for each link |
Beta |
Vector of capacity parameters for each link |
pow |
Polynomial order of cost function for each link. Defaults to 4. |
Vector of path costs
A <- matrix(c(0,1,0,0,1,0,0,0,0,1,1,0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,1),ncol=4,byrow=T)
Alpha <- rep(10,7)
Beta <- rep(2,7)
pow <- rep(4,7)
path_flow <- c(10,20,15,15)
x <- A%*%path_flow
PathCost(x,A,Alpha,Beta)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.