View source: R/addCongestionLink.R
addCongestionLink | R Documentation |
This function computes 4 congestion variables of link (congestion frequency and congestion hours in direct and indirect direction) and adds them to an
antaresData
object. The input object must be at an hourly timestep.
addCongestionLink(x, timeStep = c("daily", "weekly", "monthly", "annual"))
x |
Object of class |
timeStep |
|
addCongestionLink
modifies its input by adding four columns:
congestionFrequencyDirect |
This is the congestion frequency on the direct direction of the link at the specified time resolution. congestionFrequencyDirect = round(sum((`CONG. PROB +` != 0)/.N), 2) |
congestionFrequencyIndirect |
This is the congestion frequency on the indirect direction of the link at the specified time resolution. congestionFrequencyIndirect = round(sum((`CONG. PROB -` != 0)/.N), 2) |
congestionHoursDirect |
This is the number of congestion hours on the direct direction of the link at the specified time resolution. congestionHoursDirect = sum(`CONG. PROB +` != 0) |
congestionHoursIndirect |
This is the number of congestion hours on the direct direction of the link at the specified time resolution. congestionHoursIndirect = sum(`CONG. PROB -` != 0) |
## Not run:
# Data required by the function
mydata <- readAntares(links = "all")
mydata <- addCongestionLink(mydata, timeStep = "daily")
names(mydata)
mydata <- addCongestionLink(mydata, timeStep = c('daily'))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.