surplusClusters: Compute the surplus of clusters

View source: R/surplusClusters.R

surplusClustersR Documentation

Compute the surplus of clusters

Description

This function computes the surplus of clusters of interest. The surplus of a cluster is equal to its production times the marginal cost of the area it belongs to minus variable, fixed and startup costs.

Usage

surplusClusters(
  x,
  timeStep = "annual",
  synthesis = FALSE,
  surplusLastUnit = FALSE,
  clusterDesc = NULL,
  opts = NULL
)

Arguments

x

An antaresData object created with readAntares. It must contain an element clusters and an element areas with at least the column MRG. PRICE.

timeStep

Desired time step for the result.

synthesis

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

surplusLastUnit

Should the surplus of the last unit of a cluster be computed ? If TRUE, then x must have been created with the option thermalAvailabilities=TRUE in order to contain the required column "available units"

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 where clusterDesc will be read if null based on data

Value

A data.table of class antaresDataTable with the following columns:

area

Area name.

cluster

Cluster name.

timeId

Time id and other time columns.

variableCost

Proportional costs of production of the cluster

Formula = marginal cost * production

fixedCost

Fixed costs of production of the cluster

Formula = NODU * fixed cost

startupCost

Start up costs of the cluster.

surplusPerUnit

Average surplus per unit of the cluster.

formula = ('MRG. PRICE' * production - opCost - startupCost) / unitcount

surplusLastUnit

Surplus of the last unit of the cluster.

formula = ('MRG. PRICE' * prodLastUnit - opCost / pmax(1, NODU) - startup.cost)

totalSurplus

Surplus of all units of the cluster.

formula = 'MRG. PRICE' * production - opCost - startupCost

economicGradient

Economic gradient of a cluster. It is equal to the surplus per unit divided by the capacity of a unit.

formula = surplusPerUnit / nominalcapacity

Examples

## Not run: 
# Data required by the function:
showAliases("surplusClusters")

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

# Computing the surplus of the last unit of a cluster requires the additional
# column "availableUnits". To add this column, one has to use parameter
# "thermalAvailabilities = TRUE" in readAntares.

mydata <- readAntares(select = c("surplusClusters", "thermalAvailabilities"))
surplusClusters(mydata, surplusLastUnit = TRUE)


## End(Not run)


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