View source: R/addNetPosition.R
| addNetPosition | R Documentation |
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.
addNetPosition(
data,
opts = antaresRead::simOptions(),
inAreas = c("be", "de", "fr", "nl", "at"),
newName = "_CWEAt"
)
data |
|
opts |
|
inAreas |
|
newName |
|
## 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"
opts <- antaresRead::setSimulationPath(study, 17)
data <- antaresRead::readAntares(area = c("fr", "be", "de", "nl"),
links = c("be - de","be - fr","be - nl", "de - fr","de - nl"),
mcYears = 1)
##Add the net positions in the CWE area
data <- addNetPosition(data, opts, inAreas = c("be", "de", "fr", "nl"),
newName = "_CWE")
##Add the net positions in an area containing CWE+AT
data <- antaresRead::readAntares(areas = c("fr", "be", "de", "nl", "at"),
links = c("be - de","be - fr","be - nl",
"de - fr","de - nl", "at - de"), mcYears = 1)
data <- addNetPosition(data, opts,
inAreas = c("be", "de", "fr", "nl", "at"), newName = "_CWEAt")
## Example with the virtual area
# 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)
dta <- 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)
dta <- addNetPosition(
dta, opts, inAreas = c("be", "de", "fr", "nl", "at", "zz_flowbased"),
newName = "_CWEAtVirtual")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.