addCongestionLink {antaresProcessing} | R Documentation |
Add the congestion frequency and the number of congested hours for a given link
Description
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.
Usage
addCongestionLink(x, timeStep = c("daily", "weekly", "monthly", "annual"))
Arguments
x |
Object of class |
timeStep |
|
Value
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) |
Examples
## 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)