PathCost: Path costs based on BPR link cost function

View source: R/PathCost.r

PathCostR Documentation

Path costs based on BPR link cost function

Description

This function calculates the path costs as a function of link flows over network. BPR link cost functions are assumed.

Usage

PathCost(x, A = diag(length(x)), Alpha, Beta, pow = 4)

Arguments

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.

Value

Vector of path costs

Examples

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)

MartinLHazelton/transportation documentation built on Aug. 5, 2023, 10:28 a.m.