Utility: Path disutility updater

View source: R/Utility.r

UtilityR Documentation

Path disutility updater

Description

This function updates the path disutility at time t+1 based on disutility and path costs at time t. The path costs are computed from pattern of link flows.

Usage

Utility(x, A = diag(length(x)), psi = 1, Alpha, Beta, pow = 4, ut = 0)

Arguments

x

Traffic flow on all links of network

A

Link-path incidence matrix

psi

Recency parameter, controlling weight assigned to most recent path costs when updating disutility. Defaults to 1.

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.

ut

Vector of path disutilities prior to update

Value

Vector of path disutilities

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
ut <- c(10,10,10,10)
Utility(x,A,psi=0.5,Alpha,Beta,pow,ut)

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