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

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.

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.

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(data, 
                                    storageFlexibility = c("psp in", "psp out"),
                                    production = "offshore")

## End(Not run)