Utility | R Documentation |
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.
Utility(x, A = diag(length(x)), psi = 1, Alpha, Beta, pow = 4, ut = 0)
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 |
Vector of path disutilities
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.