removeVirtualAreas {antaresRead}R Documentation

Remove virtual areas

Description

This function removes virtual areas from an antaresDataList object and corrects the data for the real areas. The antaresDataList object should contain area and link data to function correctly.

Usage

removeVirtualAreas(
  x,
  storageFlexibility = NULL,
  production = NULL,
  reassignCosts = FALSE,
  newCols = TRUE,
  rowBal = TRUE,
  prodVars = getAlias("rmVA_production"),
  costsVars = c("OV. COST", "OP. COST", "CO2 EMIS.", "NP COST"),
  costsOn = c("both", "storageFlexibility", "production")
)

Arguments

x

An object of class antaresDataList with at least components areas and links.

storageFlexibility

A vector containing the names of the virtual storage/flexibility areas. Can also be a named list. Names are columns to add and elements the virtual areas to group.

production

A vector containing the names of the virtual production areas.

reassignCosts

If TRUE, the production costs of the virtual areas are reallocated to the real areas they are connected to. If the virtual areas are connected to a virtual hub, their costs are first reallocated to the hub and then the costs of the hub are reallocated to the real areas.

newCols

If TRUE, new columns containing the production of the virtual areas are added. If FALSE their production is added to the production of the real areas they are connected to.

rowBal

If TRUE, then BALANCE will be corrected by ROW. BAL: BALANCE := BALANCE - "ROW. BAL"

prodVars

Virtual productions columns to add to real area. Default to getAlias("rmVA_production")

costsVars

If parameter reassignCosts is TRUE, affected columns. Default to OV. COST, OP. COST, CO2 EMIS. and NP COST

costsOn

If parameter reassignCosts is TRUE, then the costs of the virtual areas are reassigned to the real areas they are connected to. You can choose to reassigned production & storageFlexibility virtuals areas ("both", default), or only "production" or "storageFlexibility" virtuals areas

Details

Two types of virtual areas have been defined corresponding to different types of modeling in Antares and different types of post-treatment to do:

removeVirtualAreas performs different corrections:

The functions makes a few assumptions about the network. If they are violated it will not act correctly:

Value

An antaresDataList object in which virtual areas have been removed and data of the real has been corrected. See details for an explanation of the corrections.

Examples

## Not run: 

# Assume we have a network with two virtual areas acting as pump storage and
# an area representing offshore production
#
#  offshore
#     |
# real area - psp in
#           \
#             psp out
#

data <- readAntares(areas="all", links="all")

# Remove pump storage virtual areas

correctedData <- removeVirtualAreas(
    x = data, 
    storageFlexibility = c("psp in", "psp out"),
    production = "offshore"
)
                                    
correctedData_list <- removeVirtualAreas(
    x = data, 
    storageFlexibility = list(PSP = c("psp in", "psp out")),
    production = "offshore"
)
 
                                   
correctedData_details <- removeVirtualAreas(
    x = data, 
    storageFlexibility = list(PSP_IN = "psp in", PSP_OUT =  "psp out"),
    production = "offshore"
)
                                    

## End(Not run)


[Package antaresRead version 2.6.0 Index]