surplus: Compute economic surplus

View source: R/surplus.R

surplusR Documentation

Compute economic surplus

Description

This function computes the economic surplus for the consumers, the producers and the global surplus of an area.

Usage

surplus(
  x,
  timeStep = "annual",
  synthesis = FALSE,
  groupByDistrict = FALSE,
  hurdleCost = TRUE,
  opts = NULL
)

Arguments

x

an object of class "antaresDataList" created with the function readAntares. It has to contain some areas and all the links that are connected to these areas. Moreover it needs to have a hourly time step and detailed results.

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.

hurdleCost

If TRUE, HURDLE COST will be removed from congestionFees.

opts

opts

Value

A data.table with the following columns:

area

Name of the area.

timeId

timeId and other time columns.

consumerSurplus

The surplus of the consumers of some area.

formula = (unsuppliedCost[area] - 'MRG. PRICE') * LOAD

producerSurplus

The surplus of the producers of some area.

formula = 'MRG. PRICE' * production - 'OP. COST'

Production includes "NUCLEAR", "LIGNITE", "COAL", "GAS", "OIL", "MIX. FUEL", "MISC. DTG", "H. STOR", "H. ROR", "WIND", "SOLAR" and "MISC. NDG"

rowBalanceSurplus

Surplus of the ROW balance.

Formula: 'MRG. PRICE' * 'ROW BAL.'

storageSurplus

Surplus created by storage/flexibility areas.

formula = storage * x$areas$'MRG. PRICE'

congestionFees

The congestion fees of a given area. It equals to half the congestion fees of the links connected to that area.

formula = (congestionFees-hurdleCost) / 2

globalSurplus

Sum of the consumer surplus, the producer surplus and the congestion fees.

formula = consumerSurplus + producerSurplus + storageSurplus + congestionFees + rowBalanceSurplus

Examples

## Not run: 
showAliases("surplus")

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

surplus(mydata, synthesis = TRUE)
surplus(mydata, synthesis = TRUE, groupByDistrict = TRUE)

## End(Not run)


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