addTypicalDayId: Add a flow-based typical day id column

View source: R/addColumnTypicalDay.R

addTypicalDayIdR Documentation

Add a flow-based typical day id column

Description

Add to an Antares output table a column indicating the id of the used flow-based typical day for each timestep. This information is read in the "user" directory file of the Antares study: it must be made sure that the data of the study is still consistent with the output.

Usage

addTypicalDayId(data, fb_opts = antaresRead::simOptions())

Arguments

data

antaresdata output data load by readAntares

fb_opts

list of simulation parameters returned by the function setSimulationPath or fb model localisation obtain with setFlowbasedPath. The default value is indicated by antaresRead::simOptions().

Examples


## Not run: 
# Change the study path for the path of a study you have on your computer
study <- "../../Pour Julien/blop/MT_base_nucM2_2023"
antaresRead::setSimulationPath(study, 17)
data <- antaresRead::readAntares(mcYears = 1:2)
data <- addTypicalDayId(data)


data <- antaresRead::readAntares(areas = "all", links = "all", clusters = "all" ,mcYears = 1:2)
data <- addTypicalDayId(data)

#' #### Example with the virtual area zz_flowbased
## If you gave virtualFBarea = TRUE in the function \link{computeFB},
## the areas and links are built with a virtual area on the center.

# Change the study path for the path of a study you have on your computer
study <- "../Etude Antares/BP19_costs18_FB18_2023Virtual/"

opts <- antaresRead::setSimulationPath(study, 5)

data <- antaresRead::readAntares(areas = c("fr", "be", "de", "nl", "at", "zz_flowbased"),
                                links = c("be - zz_flowbased", 
                                "fr - zz_flowbased", "nl - zz_flowbased",
                                "de - zz_flowbased", "at - zz_flowbased"), mcYears = 1:2,
                                select = c("LOLD", "UNSP. ENRG",
                                "DTG MRG", "UNSP. ENRG", "BALANCE", "FLOW LIN."),
                                opts = opts)           

data <- addTypicalDayId(data)

## End(Not run)


rte-antares-rpackage/fbAntares documentation built on June 1, 2022, 6:20 p.m.