rDDSProcess | R Documentation |
This functions generartes sequences of traffic flow patterns drawn from one of a number of day-to-day stochastic process models.
rDDSProcess(
ODdemand,
ODpair,
A,
N.days = 100,
N.sim = 1,
x.start = NA,
Alpha,
Beta,
pow = 4,
RUM = "logit",
theta = 1,
psi = 0.05,
process = "Standard",
variable.demand = F,
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 |
N.days |
Number of days to simulate. Defaults to 100. |
N.sim |
Number of parallel simulation runs. Defaults to 1. |
x.start |
Initial route flow pattern. Defaults to NA, when the initial flow is set to SUE. |
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". |
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. |
psi |
Recency parameter, controlling weight assigned to most recent path costs when updating disutility. Defaults to 0.05. |
process |
Defaults to "Standard", when a time-homogeneous Markoc process is employed in which route choice decisions are based on a utility which is a convex combination of the previous disutility and route costs. Alternatives are "TIDDS1" and "TIDDS2" time-inhomogeneous processes. |
tol |
Tolerance for convergence assessment for SUE. USed if |
verbose |
Should progress of SUE algorithm be printed out? Defaults to FALSE. |
prob.model |
Route choice probability model. One of "ProductMN" (product multinomial, the default), "Poisson", and "Approximate" (a quick and dirty approximation to the others). |
The output is a list with components x and u, containing traffic path flows and disutilies respectively. Both x and u are 3-dimensional arrays. The first dimension indexes simulation run (if multiple parallel runs are required); the second indexes network path; and the third indexes day.
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
N.sim <- 1
N.days <- 100
rDDSProcess(ODdemand,ODpair,A,N.days=N.days,N.sim=N.sim,x.start=c(20,0),Alpha=Alpha,Beta=Beta,pow=pow,RUM="logit",theta=theta,process="TIDDS1",variable.demand=F)
rDDSProcess(ODdemand,ODpair,A,N.days=N.days,N.sim=N.sim,x.start=c(20,0),Alpha=Alpha,Beta=Beta,pow=pow,RUM="logit",theta=theta,process="TIDDS2",variable.demand=F)
rDDSProcess(ODdemand,ODpair,A,N.days=N.days,N.sim=N.sim,x.start=c(20,0),Alpha=Alpha,Beta=Beta,pow=pow,RUM="logit",theta=theta,process="Standard",variable.demand=F)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.