surplusSectors: Compute the surplus of sectors

View source: R/surplusSectors.R

surplusSectorsR Documentation

Compute the surplus of sectors

Description

This function computes the surplus of sectors for each area and time step. For sectors wind, solar, hydraulic storage and run of river, production costs are assumed to be equal to 0.

Usage

surplusSectors(
  x,
  sectors = c("thermal", "renewable"),
  timeStep = "annual",
  synthesis = FALSE,
  groupByDistrict = FALSE,
  clusterDesc = NULL,
  opts = NULL
)

Arguments

x

Object of class antaresData created with readAntares. It needs to contain hourly detailed results of a simulation. Moreover, it must contain area data and if thermal sectors are required, cluster data.

sectors

vector containing the name of the sectors for which surplus needs to be computed. Possible values are "thermal" for thermal sectors(nuclear, coal,..), "ren" for renewable energy and any column name that can be considered as a production (for instance production of virtual areas). It is assumed that the cost of these productions is equal to 0 as for renewable energies. If the parameter contains the value "thermal", then the parameter x has to contain cluster data.

timeStep

Desired time step for the result.

synthesis

If TRUE, average surpluses are returned. Else the function returns surpluses per Monte-Carlo scenario.

groupByDistrict

If TRUE, results are grouped by district.

clusterDesc

A table created with the function readClusterDesc. If is this parameter is set to NULL (the default), then the function attempts to read the needed data in the same study as x.

opts

opts

Value

A data.table of class "antaresData". It contains one column per sector containing the surplus of that sector for a given area and timeId.

Examples

## Not run: 

# Data required by the function:
showAliases("surplusSectors")

mydata <- readAntares(select = "surplusSectors")
surplusSectors(mydata)

# Note that if the parameter "sectors" is modified, the function can require
# more or less data. For instance, if one only wants surplus for thermal
# sectors:
mydata <- readAntares(areas = "all", clusters = "all", synthesis = FALSE,
                      select = "MRG. PRICE")
surplusSectors(mydata, sectors = "thermal")


## End(Not run)


antaresProcessing documentation built on June 25, 2024, 5:07 p.m.