addNetPosition: addNetPosition

Description Usage Arguments Examples

View source: R/addNetPosition.R

Description

This function calculates the Net Position (the balance) of areas within a bigger group of areas, based on the exchanged flows in the indicated perimeter. By default, the function calculates the Net Position within the CWE area and creates a new column called Balance_CWE.

Usage

1
2
addNetPosition(data, opts = antaresRead::simOptions(), inAreas = c("be",
  "de", "fr", "nl"), adq = FALSE, newName = "_CWE")

Arguments

data

antaresDataList read with readAntares, containing both areas and links tables.

opts

list of simulation parameters returned by the function setSimulationPath: this represents the directory of the Antares study. The default path is indicated by antaresRead::simOptions().

inAreas

character lists of areas belonging to the perimeter, whose exchanges are going to be taken into account in the balance calculation. All links connecting two areas in this list are taken into account, the links connected to only one area (or none) are ignored. By default, the list is c("be", "de", "fr", "nl").

adq

boolean calculates the net positions of the areas based on post-adequacy patch results. By default, the value is FALSE.

newName

character Added suffix to the calculated column's name. By default, the value is "_CWE".

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
opts <- antaresRead::setSimulationPath("D:/Users/titorobe/Desktop/antaresStudy", 2)
data <- readAntares(area = "all", links = "all", mcYears = 1)

##Add the net positions in the CWE area
data <- addNetPosition(data, opts, adq = FALSE)

##Add the net positions in an area containing CWE+AT
data <- addNetPosition(data, opts, adq = FALSE,
 inAreas = c("be", "de", "fr", "nl", "at"), newName = "_CWEAt")


## End(Not run)

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