Description Usage Arguments Examples
This function defines for each studied day in an Antares study the most representative typical flow-based day, and finally
creates daily time series.
To establish this correlation, the inputs of the function must include a probability matrix (calculated for each set of
typical days with the package flowBasedClustering
) and the path to the Antares study to provide flow-based domains with. The probability matrix
will be used to compute a weighted draw among the possible typical days.
1 2 3 | createFBTS(opts, probabilityMatrix, multiplier, interSeasonBegin,
interSeasonEnd, firstDay, seed = 4052017, silent = FALSE,
outputPath = getwd())
|
opts |
|
probabilityMatrix |
|
multiplier |
|
interSeasonBegin |
|
interSeasonEnd |
|
firstDay |
|
seed |
|
silent |
|
outputPath |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | ## Not run:
library(antaresRead)
library(flowBasedClustering)
library(data.table)
# load climate daily time series
climate <- fread(system.file("dataset/climate_example.txt",package = "flowBasedClustering"))
# load clustering results (or build them with clusteringTypicalDays function())
clusterTD <- readRDS(system.file("dataset/cluster_example.RDS",package = "flowBasedClustering"))
levelsProba <- list(summerWd = list(FR_load = c(0.5), DE_wind = c(1/3, 2/3), DE_solar = .5),
summerWe = list(FR_load = c(0.5, 0.7), DE_wind = c(.5)),
interSeasonWd = list(FR_load = c(0.5, 0.6),
DE_wind = c(1/3, 2/3),
DE_solar = 0.3),
interSeasonWe = list(FR_load = c(0.5, 0.6),
DE_wind = c(1/3, 2/3),
DE_solar = 0.3))
matProb <- getProbability(climate, clusterTD,
levelsProba = levelsProba, extrapolationNA = TRUE)
# Set the probabilityMatrix names and coefficients
matProb <- setNamesProbabilityMatrix(matProb, c("FR_load", "DE_wind", "DE_solar"),
c("fr@load", "de@wind", "de@solar"))
multiplier <- data.frame(variable = c("fr@load", "de@wind", "de@solar"),
coef = c(1, 352250, 246403))
# Set the path to Antares study inputs
opts <- antaresRead::setSimulationPath("D:/Users/titorobe/Desktop/antaresStudy", 1)
# calendar
# first day identified based on the input data of the
# Antares study designated by opts
firstDay <- identifyFirstDay(opts)
interSeasonBegin <- as.Date(c("2017-09-03", "2018-02-02"))
interSeasonEnd <- as.Date(c("2020-10-04", "2018-05-02"))
# Generate flow-based time series
ts <- createFBTS(opts = opts, probabilityMatrix = matProb, multiplier = multiplier,
interSeasonBegin = interSeasonBegin,
interSeasonEnd = interSeasonEnd, firstDay = firstDay, outputPath = getwd())
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.