surplusClusters {antaresProcessing}  R Documentation 
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.
surplusClusters( x, timeStep = "annual", synthesis = FALSE, surplusLastUnit = FALSE, clusterDesc = NULL, opts = NULL )
x 
An 
timeStep 
Desired time step for the result. 
synthesis 
If TRUE, average surpluses are returned. Else the function returns surpluses per MonteCarlo scenario. 
surplusLastUnit 
Should the surplus of the last unit of a cluster be computed ? If

clusterDesc 
A table created with the function 
opts 
opts where clusterDesc will be read if null based on data 
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 
## 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)