SUE | R Documentation |
This function calculates stochastic user equilibrium (SUE) using the method of successive weighted averages. Output is a list of SUE route flows x and corresponding path costs u.
SUE(
ODdemand,
ODpair,
A,
Alpha,
Beta,
pow = 4,
RUM = "logit",
x.ini = NULL,
theta = 1,
tune.d = 1,
tol = 1e-04,
verbose = F
)
ODdemand |
Vector of origin-destination (OD) travel demands |
ODpair |
Vector indicating the OD pair serviced by each route (ordered by columns of the path-link incidence matrix, A). |
A |
Path-link 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. |
RUM |
Choice of random utility model. Can be "logit" (the default) or "probit". |
x.ini |
Initialization route flows for SUE algorithm (optional). |
theta |
A dispersion parameter. For the logit model, a single value specifying the logit parameter. For the probit model, a vector of standard deviations for the individual link cost errors. Defaults to 1. |
tune.d |
Tuning parameter; tune.d=0 corresponds to the basic method of successive averages. Defaults to 1. |
tol |
Tolerance for convergence assessment (measured as route mean squared difference between current flow vector and the search direction). Defaults of 1e-4. |
verbose |
Should progress of algorithm be printed out? Defaults to FALSE. |
Output is a list of SUE route flows x, corresponding path costs u, and corresponding link cost k.
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(50,7)
pow <- rep(4,7)
ODpair <- c(1,1,2,2)
ODdemand <- c(50,50)
theta <- 0.7
SUE(ODdemand,ODpair,A=A,Alpha=Alpha,Beta=Beta,pow=pow,theta=theta,verbose=F)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.