'Antares' Results Processing

Process results generated by 'Antares', a powerful software developed by RTE (Réseau de Transport d’Électricité) to simulate and study electric power systems (more information about 'Antares' here: < https://antares.rte-france.com>). This package provides functions to create new columns like net load, load factors, upward and downward margins or to compute aggregated statistics like economic surpluses of consumers, producers and sectors.

CRAN_Status_Badge Build status Build Status codecov

The antaresProcessing package provides functions that uses data created with package antaresRead to compute standard aggregate like customer surplus or sector surplus. This document demonstrates how to use the main functions of the package.


This package has been published on CRAN, so you can install it easily:


To install the last development version:

install_github("rte-antares-rpackage/antaresProcessing", ref ="develop")

To display the help of the package and see all the functions it provides, type:


Basic usage

The usage of the package is quite straightforward. First one has to read data from an antares study with readAntares and then pass it to a function of antaresProcessing. Each function requires different type of data (areas, links...) and different level of detail. Generally, functions that perform non-linear calculations require hourly data for each Monte-Carlo scenario but they have arguments to then aggregate the results at the desired level of detail. On the contrary, functions that do linear calculations accept every level of detail and their output has the same level of detail as their input.

The following table sums up the required data and the output of the different functions. For more details, one can look at the help file of each function. Especially, each help page contains an example that minimizes the amount of data read.

Function Description requires time step works on synthesis
surplus Consumer and producer surplus areas, links hourly no
surplusClusters Surplus of clusters clusters, areas hourly no
surplusSectors Surplus of sectors of production areas, clusters hourly no
addNetLoad Net load areas and/or districts all yes
netLoadRamp Ramp of net load areas and/or districts hourly no
margins Downward and upward margins of an area areas, clusters all yes
modulation modulation of cluster units or sectors areas or districts or clusters all yes

There is also a compare function that can be used to compare two tables with same shape. It is useful to compare the results of two simulations.

studyPath <- "path/to/study"
setSimulationPath(studyPath, 1)
data1 <- readAntares(areas = "all", links = "all", synthesis = FALSE)
surplus1 <- surplus(data1,  timeStep = "annual", synthesis = TRUE) 
setSimulationPath(studyPath, 2)
data2 <- readAntares(areas = "all", links = "all", synthesis = FALSE)
surplus2 <- surplus(data2,  timeStep = "annual", synthesis = TRUE)
compare(surplus1, surplus2)
## 'antaresDataTable' object with dimension 72 x 8
## Type: surplusComparison
## TimeStep: annual
## Synthesis: TRUE
##                area timeId time consumerSurplus producerSurplus storageSurplus ...
## 1:            01_pt Annual 2017       -57046.01       10371.915              0
## 2:            02_es Annual 2017      -956371.65      517675.155              0
## 3:            03_es Annual 2017      2435946.66    -1978004.005              0
## 4:            04_fr Annual 2017       -70700.07      110701.300              0
## ...

By default, compare computes the difference between two tables, but it can also compute a ratio or a variation rate.


Contributions to the library are welcome and can be submitted in the form of pull requests to this repository.


Antares is a powerful software developed by RTE to simulate and study electric power systems (more information about Antares here : https://antares.rte-france.com).

License Information:

Copyright 2015-2016 RTE (France)

This Source Code is subject to the terms of the GNU General Public License, version 2 or any higher version. If a copy of the GPL-v2 was not distributed with this file, You can obtain one at https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html.


Copyright © 2016 RTE Réseau de transport d’électricité

Changes in version 0.13 (2017-12-14)


  • Rename ThermalGeneration() to thermalGroupCapacities().

Changes in version 0.12 (2017-11-13)


  • New function "addProcessingH5()" add process results of antaresProcessing to an ANTARES .h5 files.
  • Function "surplus" has a new boolean parameter hurdleCost to take into account hurdles costs when calculating congestion fees.

Changes in version 0.11 (2017-07-13)


  • Function loadFactor() now also computes the available load factor.
  • synthesize() now handles logical columns.
  • New function getValues() returns the values of a variable in a table with one column per Monte-Carlo scenario.


  • Producer surplus was incorrectly computed using column "OV COST" instead of "OP COST".

Changes in version 0.10.2 (2017-05-24)


  • Function "synthesize()" was crashing when data contained non numeric columns.

Changes in version 0.10.1 (2017-04-20)


  • Fix a problem that made fail build on mac osx.

Changes in version 0.10 (2017-04-05)


  • Function margins() has been replaced by addUpwardMargin() and addDownwardMargin(). they are easier to use, add directly the new columns to the input data and are far more efficient.


  • The package now adds new aliases to use in the parameter 'select' of antaresRead::readAntares. Each function has its own alias, so it is now easier for the user to read all data required by a given function. Use 'showAliases()' to see the list of aliases.


  • Function synthesize() set incorrect values for attributes of antaresDataList objects.

Changes in version 0.9 (2017-01-25)


  • function addLoadFactorLink() now adds two columns: "loadFactor" and "congestion".


  • Minor bugfixes due to evolution of "antaresRead"

Changes in version 0.8 (2016-11-14)


  • Compatibility with version 0.14 of antaresRead.
  • The definition of downward margins was inexact and has been corrected.


  • New function addLoadFactorLink() to compute the load factor of links.

Changes in version 0.7 (2016-10-06)


  • add a file LICENSE and copyright to sources files

Changes in version 0.6 (2016-08-22)


  • New function addExportAndImport() adds import, export and link capacity to areas and districts.

Changes in version 0.5 (2016-08-01)


  • New function 'synthesize' that synthesizes different Monte-Carlo scenarios. It computes the average of every variable but can also compute custom statistics like minimum, maximum, median, quantiles, etc.

Changes in version 0.4 (2016-07-18)


  • Function 'surplusClusters' now returns fixed and variable costs of production.
  • Function "surplusSectors" now returns columns "sector", "surplus" and "cost" instead of one column per sector.
  • ROW balance is now included in the computation of the surplus of an area. A new column "rowBalanceSurplus is non available." *New function "loadFactor". It returns the load factor of a cluster and the time at Pmin and at Pmax.

Changes in version 0.3 (2016-07-04)


  • Function addRamps is replaced by netLoadRamp. It returns a table with the ramps of net load and balance and aggregates them at desired time step or among Monte-Carlo scenarios.


  • Function "modulation" can now return modulation of sectors per area and per district.
  • New function "margins" to compute upward and downward margins of an area.
  • surplusClusters now returns production costs and start-up costs.


  • Computation of ramps, modulations and costs of last unit was erronous because of bad sorting of data

Changes in version 0.2 (2016-06-20)


  • New function 'compare' to compares the surpluses of two simulations.
  • 'surplus' and 'surplusSectors' can now aggregate results by district.
  • 'surplus', 'surplusSectors' and 'surplusClusters' can now compute the average surplus off the Monte-Carlo scnearios.
  • New functions addNetLoad and addRamps that add new columns to an antaresData object.
  • 'surplusClusters' returns a new column "economicGradient".
  • 'surplusClusters' gains a new argument 'surplusLastUnit' to indicate if the function should compute the surplus of last unit or not.
  • Function 'surplus' now distinguishes the production of virtual nodes.


  • When computing the surplus of the last unit of a cluster, 'surplusCLusters' now uses the number of available units instead of the total number of units.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.14 by Jalal-Edine ZAWAM, 23 days ago


Report a bug at https://github.com/rte-antares-rpackage/antaresProcessing/issues

Browse source code at https://github.com/cran/antaresProcessing

Authors: Jalal-Edine ZAWAM [aut, cre], Francois Guillem [aut], Benoit Thieurmel [aut], Titouan Robert [aut], RTE [cph]

Documentation:   PDF Manual  

GPL (>= 2) | file LICENSE license

Imports data.table, methods, stats

Depends on antaresRead

Suggests rhdf5, parallel, testthat, knitr, rmarkdown, covr

See at CRAN