runAppPosition: Run a shiny application to visualise the flow-based typical...

Description Usage Arguments Examples

View source: R/graph.R

Description

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, plot before/after adequacy patch positions, 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).

Usage

1
runAppPosition(dta, fb_opts = antaresRead::simOptions())

Arguments

dta

antaresDataList Antares output data, imported with readAntares. It can be filtered (see examples).

fb_opts

list of simulation parameters returned by the function setSimulationPath or flow-based model directory obtained with setFlowbasedPath. By default, the value will be indicated by antaresRead::simOptions()

Examples

 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
## Not run: 
## Select a study and import the data
opts <- antaresRead::setSimulationPath("D:/Users/titorobe/Desktop/antaresStudy", -1)
dta <- antaresRead::readAntares(areas = c("fr", "be", "de", "nl"),
         links = c("be - de","be - fr","be - nl","de - fr","de - nl"), 
         select = c("LOLD", "UNSP. ENRG", "DTG MRG", "UNSP. ENRG", "BALANCE", "FLOW LIN."), 
         mcYears = 1:10, opts = opts)

## Run the application
runAppPosition(dta)

## 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)

rte-antares-rpackage/antaresFlowbased documentation built on Oct. 19, 2020, 11:23 a.m.