runAppPosition | R Documentation |
Run a shiny application displaying, after running an Antares simulation, how the domains have been used by the optimizer to fix the exchanges in the CWE area. The user can in the application select a period of time on a calendar, choose to only display some typical days and hours, change the colors palette, filter unused domains... (all the parameters of the function plotNetPositionFB). It is possible to filter the output data beforehand to only display situations with loss of load (see examples).
runAppPosition( dta, fb_opts = antaresRead::simOptions(), country_list = c("fr", "be", "de", "nl", "at"), areaName = "cwe_at" )
dta |
|
fb_opts |
|
country_list |
|
areaName |
|
## Not run: ## Select a study and import the data # Change the study path for the path of a study you have on your computer study <- "../../Pour Julien/blop/MT_base_nucM2_2023" opts <- antaresRead::setSimulationPath(study, 18) dta <- antaresRead::readAntares(areas = c("fr", "be", "de", "nl", "at"), links = c("be - de","be - fr","be - nl","de - fr","de - nl", "at - de"), select = c("LOLD", "UNSP. ENRG", "DTG MRG", "UNSP. ENRG", "BALANCE", "FLOW LIN."), mcYears = 1, opts = opts) ## Run the application runAppPosition(dta, country_list = c("fr", "be", "de", "nl", "at")) ## Filter the data on situations with unsupplied energy # If you want to keep only timeId with LOLD!=0 you can't use : # dta$areas <- dta$areas[LOLD!=0] otherwise some areas # Otherwise some areas are forgotten: the data must be filtered to keep # all areas at specific timesteps. ## An exemple of authorized filter : idC <- c(antaresRead::getIdCols(dta$areas)) idC <- idC[idC!="area"] LOLD <- dta$areas[,lapply(.SD, sum), by = idC, .SDcols = "LOLD"] LOLD <- LOLD[LOLD!=0] LOLD[,LOLD := NULL] # Merge to filter data dta$areas <- merge(dta$areas, LOLD, by = idC) ## End filter runAppPosition(dta) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.