diff --git a/dev/.nojekyll b/dev/.nojekyll new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/dev/.nojekyll @@ -0,0 +1 @@ + diff --git a/dev/LICENSE-text.html b/dev/LICENSE-text.html new file mode 100644 index 00000000..f763d7a6 --- /dev/null +++ b/dev/LICENSE-text.html @@ -0,0 +1,81 @@ + +License • antaresRead + + +
+
+ + + +
+
+ + +
COPYRIGHT HOLDER: RTE Réseau de transport d’électricité
+
+ +
+ + + +
+ + + +
+ + + + + + + + diff --git a/dev/articles/antaresRead.html b/dev/articles/antaresRead.html new file mode 100644 index 00000000..2b4fe7e6 --- /dev/null +++ b/dev/articles/antaresRead.html @@ -0,0 +1,283 @@ + + + + + + + +The 'antaresRead' Package • antaresRead + + + + + + + + + + + + +
+
+ + + + +
+
+ + + + +

This document describes a typical use of the antaresRead +package.

+

This package has been designed to read the results of an Antares +simulation in an easy and convivial way. It can of course read any +output files of a simulation at any desired time step, read synthetic +results or detailed Monte Carlo scenarios but it can also add input time +series to the results and perform some basic treatments like removing +virtual areas.

+
+

Installation +

+

The antaresRead package depends on the packages +data.table, plyr and lubridate. +If you have not already got them you can install them with the following +command:

+
+install.packages(c("data.table", "plyr", "lubridate"))
+

Then you can install the antaresRead package either with +the Rstudio assistant in the “Packages” tab or with the following +command:

+
+install.packages("path_to_the_package/antaresRead_***.zip")
+
+
+

Before reading data +

+

First, when you start a new R session, you need to load the +package:

+ +

To display the list of all the functions of the package and access +their help pages, type in the R console:

+
+help(package = "antaresRead")
+

Then you can start using the package. The first function to use is +setSimulationPath.

+

This function needs to be called at least once during each R session. +It stores important informations that are used by most of the functions +of the package. While it has not been run, these functions will not +work.

+

Without any argument, setSimulationPath asks +interactively to choose a directory containing an antares study. If the +study contains multiple simulation results, it will also asks the user +to choose one of them. This function stores the path to the output and +reads some useful information about the simulation: type of output +available, list of areas, links and clusters in the simulation, +variables present in the output files, etc.

+

setSimulationPath can also be used in a non-interactive +way with one of these syntaxes:

+
+# Specify full path
+setSimulationPath("study_path/output/simulation_name")
+
+# Specify the name of the simulation
+setSimulationPath("study_path", simulation_name)
+
+# Select a simulation by order
+setSimulationPath("study_path", 1) # first simulation
+
+# Select a simulation by reverse order
+setSimulationPath("study_path", -1) # last simulation
+
+# It is possible to store in a variable the result of the function
+opts <- setSimulationPath("study_path", 1)
+

The function returns an object containing informations about the +selected simulation. You can store this object in a variable for later +use but this is not necessary because at any moment you can retrieve +these informations.

+
+
+

Reading time series +

+

Once setSimulationPath has been run, you can start +reading data. Function readAntares is there for that !

+

readAntares is the main function of the package. It is +used to read every possible time series and it performs a few treatments +on them to make your life easier. The result of the function will have +the simplest structure possible: either a simple table or a list of +tables if you asks data for differents elements (for instance links and +areas)

+

It has a huge number of parameters to control exactly what you get, +but all of them are optional. Without any argument the function will +still works and it will read the synthetic results for all the areas. +But you can import other kind of output. here are some examples:

+
+# Synthetic results for all links
+readAntares(links="all")
+
+#Synthetic results for all clusters
+readAntares(clusters="all")
+
+# Areas and links at the same time
+readAntares(areas="all", links="all")
+
+# Select only a few columns. 
+readAntares(select = c("OV. COST", "OP. COST", "LOAD"))
+

You can also choose what elements to import and what level of details +you want. For instance, the following command reads the first 10 +Monte-Carlo scenarii data at monthly time step for the areas named +“area1”, “area2” and “area3”.

+
+readAntares(areas=c("area1", "area2", "area3"), timeStep="monthly",
+            synthesis=FALSE, mcYears = 1:10)
+

Finally many arguments of readAntares can be used to add +input time series to the object returned by the function. For instance, +misc=TRUE will add columns containing miscelaneous +productions for the imported areas.

+
+
+

Manipulating data +

+

readAntares returns either a single table or a list of +tables depending on the query of the user. More precisely the tables are +data.table objects. It is then possible to use the powerful +syntax offered by the package data.table.

+

The general syntax is like:

+
+name_of_the_table[filter_rows, select_columns, group_by]
+

For instance, areas[area == "08_fr", .(timeId, LOAD)] +will return a table containing columns timeId and +LOAD for the area names “08_fr”. In the select statement, +it is also possible to calculate new columns. For instance, one can +compute the net load like this:

+
areas[, .(area, timeId, netLoad = LOAD - `ROW BAL.` - PSP - MISC. - NDG -
+                                    H. ROR - WIND - SOLAR)]
+

One can also compute aggregated statistics. For instance, the +following code will compute the total load of all areas per +timeId:

+
+areas[, .(totalLoad = sum(LOAD)), by = .(timeId)]
+

Of course, aggregation also works with filters. For instance to +compute the total load only for french areas (assuming their names +contain “fr”):

+
+areas[area %in% getAreas("fr"), .(totalLoad = sum(LOAD)), by = .(timeId)]
+

If you are not familiar with package data.table, you +should have a look at the documentation and especially at the vignettes +of the package:

+
+help(package="data.table")
+
+
+

Other useful functions +

+

readAntares can import almost everything but not +everything because some data is not time series. Other functions exist +to read this specific data: readBindingConstraints to read +binding constraints, readClusterDesc to read cluster +characteristics and readLayout to get the coordinates of +the areas in the user interface of Antares.

+

Some parameters in readAntares and other functions wait +for vectors of area names or link names. On large projects with lots of +areas. It may be painful to specify by hand a long list of areas or +links. Hopefully, the functions getAreasand +getLinks can be used to select or exclude areas using +regular expressions. For instance, let us assume that the name of all +areas located in France start with the characters”fr”, then the +following command returns the list of all french areas:

+
+getAreas("fr")
+

To exclude offshore production areas (assuming their name contains +the word “offshore”) one can use:

+
+getAreas("fr", exclude="offshore")
+

A few other functions are provided by the package. To see a list of +them, type in the console:

+
+help(package = "antaresRead")
+
+
+ + + +
+ + + + +
+ + + + + + + + diff --git a/dev/articles/index.html b/dev/articles/index.html new file mode 100644 index 00000000..b04a6711 --- /dev/null +++ b/dev/articles/index.html @@ -0,0 +1,79 @@ + +Articles • antaresRead + + +
+
+ + + +
+
+ + +
+

All vignettes

+

+ +
The 'antaresRead' Package
+
+
+
+
+ + +
+ + + + + + + + diff --git a/dev/authors.html b/dev/authors.html new file mode 100644 index 00000000..feb676f1 --- /dev/null +++ b/dev/authors.html @@ -0,0 +1,153 @@ + +Authors and Citation • antaresRead + + +
+
+ + + +
+
+
+ + + +
  • +

    Tatiana Vargas. Author, maintainer. +

    +
  • +
  • +

    Jalal-Edine ZAWAM. Author. +

    +
  • +
  • +

    Frederic Breant. Contributor. +

    +
  • +
  • +

    Francois Guillem. Author. +

    +
  • +
  • +

    Benoit Thieurmel. Author. +

    +
  • +
  • +

    Titouan Robert. Author. +

    +
  • +
  • +

    Victor Perrier. Contributor. +

    +
  • +
  • +

    Etienne Sanchez. Contributor. +

    +
  • +
  • +

    Assil Mansouri. Contributor. +

    +
  • +
  • +

    Clement Berthet. Contributor. +

    +
  • +
  • +

    Kamel Kemiha. Contributor. +

    +
  • +
  • +

    Abdallah Mahoudi. Contributor. +

    +
  • +
  • +

    Nicolas Boitard. Contributor. +

    +
  • +
  • +

    RTE. Copyright holder. +

    +
  • +
+
+
+

Citation

+ Source: DESCRIPTION +
+
+ + +

Vargas T, ZAWAM J, Guillem F, Thieurmel B, Robert T (2024). +antaresRead: Import, Manipulate and Explore the Results of an 'Antares' Simulation. +R package version 2.7.2.9000, https://rte-antares-rpackage.github.io/antaresRead/, https://github.com/rte-antares-rpackage/antaresRead. +

+
@Manual{,
+  title = {antaresRead: Import, Manipulate and Explore the Results of an 'Antares' Simulation},
+  author = {Tatiana Vargas and Jalal-Edine ZAWAM and Francois Guillem and Benoit Thieurmel and Titouan Robert},
+  year = {2024},
+  note = {R package version 2.7.2.9000, https://rte-antares-rpackage.github.io/antaresRead/},
+  url = {https://github.com/rte-antares-rpackage/antaresRead},
+}
+ +
+ +
+ + + +
+ + + + + + + + diff --git a/dev/bootstrap-toc.css b/dev/bootstrap-toc.css new file mode 100644 index 00000000..5a859415 --- /dev/null +++ b/dev/bootstrap-toc.css @@ -0,0 +1,60 @@ +/*! + * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) + * Copyright 2015 Aidan Feldman + * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ + +/* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ + +/* All levels of nav */ +nav[data-toggle='toc'] .nav > li > a { + display: block; + padding: 4px 20px; + font-size: 13px; + font-weight: 500; + color: #767676; +} +nav[data-toggle='toc'] .nav > li > a:hover, +nav[data-toggle='toc'] .nav > li > a:focus { + padding-left: 19px; + color: #563d7c; + text-decoration: none; + background-color: transparent; + border-left: 1px solid #563d7c; +} +nav[data-toggle='toc'] .nav > .active > a, +nav[data-toggle='toc'] .nav > .active:hover > a, +nav[data-toggle='toc'] .nav > .active:focus > a { + padding-left: 18px; + font-weight: bold; + color: #563d7c; + background-color: transparent; + border-left: 2px solid #563d7c; +} + +/* Nav: second level (shown on .active) */ +nav[data-toggle='toc'] .nav .nav { + display: none; /* Hide by default, but at >768px, show it */ + padding-bottom: 10px; +} +nav[data-toggle='toc'] .nav .nav > li > a { + padding-top: 1px; + padding-bottom: 1px; + padding-left: 30px; + font-size: 12px; + font-weight: normal; +} +nav[data-toggle='toc'] .nav .nav > li > a:hover, +nav[data-toggle='toc'] .nav .nav > li > a:focus { + padding-left: 29px; +} +nav[data-toggle='toc'] .nav .nav > .active > a, +nav[data-toggle='toc'] .nav .nav > .active:hover > a, +nav[data-toggle='toc'] .nav .nav > .active:focus > a { + padding-left: 28px; + font-weight: 500; +} + +/* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ +nav[data-toggle='toc'] .nav > .active > ul { + display: block; +} diff --git a/dev/bootstrap-toc.js b/dev/bootstrap-toc.js new file mode 100644 index 00000000..1cdd573b --- /dev/null +++ b/dev/bootstrap-toc.js @@ -0,0 +1,159 @@ +/*! + * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) + * Copyright 2015 Aidan Feldman + * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ +(function() { + 'use strict'; + + window.Toc = { + helpers: { + // return all matching elements in the set, or their descendants + findOrFilter: function($el, selector) { + // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/ + // http://stackoverflow.com/a/12731439/358804 + var $descendants = $el.find(selector); + return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])'); + }, + + generateUniqueIdBase: function(el) { + var text = $(el).text(); + var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-'); + return anchor || el.tagName.toLowerCase(); + }, + + generateUniqueId: function(el) { + var anchorBase = this.generateUniqueIdBase(el); + for (var i = 0; ; i++) { + var anchor = anchorBase; + if (i > 0) { + // add suffix + anchor += '-' + i; + } + // check if ID already exists + if (!document.getElementById(anchor)) { + return anchor; + } + } + }, + + generateAnchor: function(el) { + if (el.id) { + return el.id; + } else { + var anchor = this.generateUniqueId(el); + el.id = anchor; + return anchor; + } + }, + + createNavList: function() { + return $(''); + }, + + createChildNavList: function($parent) { + var $childList = this.createNavList(); + $parent.append($childList); + return $childList; + }, + + generateNavEl: function(anchor, text) { + var $a = $(''); + $a.attr('href', '#' + anchor); + $a.text(text); + var $li = $('
  • '); + $li.append($a); + return $li; + }, + + generateNavItem: function(headingEl) { + var anchor = this.generateAnchor(headingEl); + var $heading = $(headingEl); + var text = $heading.data('toc-text') || $heading.text(); + return this.generateNavEl(anchor, text); + }, + + // Find the first heading level (`

    `, then `

    `, etc.) that has more than one element. Defaults to 1 (for `

    `). + getTopLevel: function($scope) { + for (var i = 1; i <= 6; i++) { + var $headings = this.findOrFilter($scope, 'h' + i); + if ($headings.length > 1) { + return i; + } + } + + return 1; + }, + + // returns the elements for the top level, and the next below it + getHeadings: function($scope, topLevel) { + var topSelector = 'h' + topLevel; + + var secondaryLevel = topLevel + 1; + var secondarySelector = 'h' + secondaryLevel; + + return this.findOrFilter($scope, topSelector + ',' + secondarySelector); + }, + + getNavLevel: function(el) { + return parseInt(el.tagName.charAt(1), 10); + }, + + populateNav: function($topContext, topLevel, $headings) { + var $context = $topContext; + var $prevNav; + + var helpers = this; + $headings.each(function(i, el) { + var $newNav = helpers.generateNavItem(el); + var navLevel = helpers.getNavLevel(el); + + // determine the proper $context + if (navLevel === topLevel) { + // use top level + $context = $topContext; + } else if ($prevNav && $context === $topContext) { + // create a new level of the tree and switch to it + $context = helpers.createChildNavList($prevNav); + } // else use the current $context + + $context.append($newNav); + + $prevNav = $newNav; + }); + }, + + parseOps: function(arg) { + var opts; + if (arg.jquery) { + opts = { + $nav: arg + }; + } else { + opts = arg; + } + opts.$scope = opts.$scope || $(document.body); + return opts; + } + }, + + // accepts a jQuery object, or an options object + init: function(opts) { + opts = this.helpers.parseOps(opts); + + // ensure that the data attribute is in place for styling + opts.$nav.attr('data-toggle', 'toc'); + + var $topContext = this.helpers.createChildNavList(opts.$nav); + var topLevel = this.helpers.getTopLevel(opts.$scope); + var $headings = this.helpers.getHeadings(opts.$scope, topLevel); + this.helpers.populateNav($topContext, topLevel, $headings); + } + }; + + $(function() { + $('nav[data-toggle="toc"]').each(function(i, el) { + var $nav = $(el); + Toc.init($nav); + }); + }); +})(); diff --git a/dev/docsearch.css b/dev/docsearch.css new file mode 100644 index 00000000..e5f1fe1d --- /dev/null +++ b/dev/docsearch.css @@ -0,0 +1,148 @@ +/* Docsearch -------------------------------------------------------------- */ +/* + Source: https://github.com/algolia/docsearch/ + License: MIT +*/ + +.algolia-autocomplete { + display: block; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1 +} + +.algolia-autocomplete .ds-dropdown-menu { + width: 100%; + min-width: none; + max-width: none; + padding: .75rem 0; + background-color: #fff; + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, .1); + box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175); +} + +@media (min-width:768px) { + .algolia-autocomplete .ds-dropdown-menu { + width: 175% + } +} + +.algolia-autocomplete .ds-dropdown-menu::before { + display: none +} + +.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] { + padding: 0; + background-color: rgb(255,255,255); + border: 0; + max-height: 80vh; +} + +.algolia-autocomplete .ds-dropdown-menu .ds-suggestions { + margin-top: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion { + padding: 0; + overflow: visible +} + +.algolia-autocomplete .algolia-docsearch-suggestion--category-header { + padding: .125rem 1rem; + margin-top: 0; + font-size: 1.3em; + font-weight: 500; + color: #00008B; + border-bottom: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--wrapper { + float: none; + padding-top: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column { + float: none; + width: auto; + padding: 0; + text-align: left +} + +.algolia-autocomplete .algolia-docsearch-suggestion--content { + float: none; + width: auto; + padding: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--content::before { + display: none +} + +.algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header { + padding-top: .75rem; + margin-top: .75rem; + border-top: 1px solid rgba(0, 0, 0, .1) +} + +.algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column { + display: block; + padding: .1rem 1rem; + margin-bottom: 0.1; + font-size: 1.0em; + font-weight: 400 + /* display: none */ +} + +.algolia-autocomplete .algolia-docsearch-suggestion--title { + display: block; + padding: .25rem 1rem; + margin-bottom: 0; + font-size: 0.9em; + font-weight: 400 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--text { + padding: 0 1rem .5rem; + margin-top: -.25rem; + font-size: 0.8em; + font-weight: 400; + line-height: 1.25 +} + +.algolia-autocomplete .algolia-docsearch-footer { + width: 110px; + height: 20px; + z-index: 3; + margin-top: 10.66667px; + float: right; + font-size: 0; + line-height: 0; +} + +.algolia-autocomplete .algolia-docsearch-footer--logo { + background-image: url("data:image/svg+xml;utf8,"); + background-repeat: no-repeat; + background-position: 50%; + background-size: 100%; + overflow: hidden; + text-indent: -9000px; + width: 100%; + height: 100%; + display: block; + transform: translate(-8px); +} + +.algolia-autocomplete .algolia-docsearch-suggestion--highlight { + color: #FF8C00; + background: rgba(232, 189, 54, 0.1) +} + + +.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight { + box-shadow: inset 0 -2px 0 0 rgba(105, 105, 105, .5) +} + +.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content { + background-color: rgba(192, 192, 192, .15) +} diff --git a/dev/docsearch.js b/dev/docsearch.js new file mode 100644 index 00000000..b35504cd --- /dev/null +++ b/dev/docsearch.js @@ -0,0 +1,85 @@ +$(function() { + + // register a handler to move the focus to the search bar + // upon pressing shift + "/" (i.e. "?") + $(document).on('keydown', function(e) { + if (e.shiftKey && e.keyCode == 191) { + e.preventDefault(); + $("#search-input").focus(); + } + }); + + $(document).ready(function() { + // do keyword highlighting + /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ + var mark = function() { + + var referrer = document.URL ; + var paramKey = "q" ; + + if (referrer.indexOf("?") !== -1) { + var qs = referrer.substr(referrer.indexOf('?') + 1); + var qs_noanchor = qs.split('#')[0]; + var qsa = qs_noanchor.split('&'); + var keyword = ""; + + for (var i = 0; i < qsa.length; i++) { + var currentParam = qsa[i].split('='); + + if (currentParam.length !== 2) { + continue; + } + + if (currentParam[0] == paramKey) { + keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); + } + } + + if (keyword !== "") { + $(".contents").unmark({ + done: function() { + $(".contents").mark(keyword); + } + }); + } + } + }; + + mark(); + }); +}); + +/* Search term highlighting ------------------------------*/ + +function matchedWords(hit) { + var words = []; + + var hierarchy = hit._highlightResult.hierarchy; + // loop to fetch from lvl0, lvl1, etc. + for (var idx in hierarchy) { + words = words.concat(hierarchy[idx].matchedWords); + } + + var content = hit._highlightResult.content; + if (content) { + words = words.concat(content.matchedWords); + } + + // return unique words + var words_uniq = [...new Set(words)]; + return words_uniq; +} + +function updateHitURL(hit) { + + var words = matchedWords(hit); + var url = ""; + + if (hit.anchor) { + url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; + } else { + url = hit.url + '?q=' + escape(words.join(" ")); + } + + return url; +} diff --git a/dev/index.html b/dev/index.html new file mode 100644 index 00000000..f58ca01c --- /dev/null +++ b/dev/index.html @@ -0,0 +1,281 @@ + + + + + + + +Import, Manipulate and Explore the Results of an Antares Simulation • antaresRead + + + + + + + + + + + + + +
    +
    + + + + +
    +
    + +


    +
    + +
    +

    Read data from an Antares study with R package ‘antaresRead’

    +
    + + +
    +

    Installation +

    +

    You can install the package from CRAN:

    +
    +install.packages("antaresRead")
    +

    You can also install the last development version from Github:

    +
    +devtools::install_github("rte-antares-rpackage/antaresRead")
    +

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

    +
    +help(package="antaresRead")
    +

    To see a practical example of use of the package, look at the vignette :

    +
    +vignette("antares")
    +

    Finally, you can download a cheatsheet that summarize in a single page how to use the package: https://github.com/rte-antares-rpackage/antaresRead/raw/master/cheat_sheet/antares_cheat_sheet_en.pdf .

    +

    See website for more documentation: https://rte-antares-rpackage.github.io/antaresRead/

    +
    +
    +

    Initialisation +

    +

    Load the package

    + +

    Select an Antares simulation interactively.

    + +

    You can also select it programmatically:

    +
    +setsimulationPath("study_path", simulation)
    +

    The parameter simulation can be the name of a simulation, the name of the folder containing the simulation results, or the index of the simulation. 1 corresponds to the oldest simulation, -1 to the newest one, 0 to the inputs.

    +
    +
    +

    Read data from a simulation +

    +

    Most data from a simulation can be imported in the R session with function readAntares(). It has many parameters that control what data is imported. Here are a few examples:

    +
    +# Read synthetic results of all areas of a study with hourly time step.
    +areaData <- readAntares(areas = "all")
    +
    +# Same but with a daily time step:
    +areaData <- readAntares(areas = "all", timeStep = "daily")
    +
    +# Read all Monte Carlo scenarios for a given area.
    +myArea <- readAntares(areas = "my_area", mcYears = "all")
    +
    +# Same but add miscelaneous production time series to the result 
    +myArea <- readAntares(areas = "my_area", mcYears = "all", misc = TRUE)
    +
    +# Read only columns "LOAD" and "MRG. PRICE"
    +areaData <- readAntares(areas = "all", select = c("LOAD", "MRG. PRICE"))
    +

    Functions getAreas and getLinks are helpful to create a selection of areas or links of interest. Here are a few examples:

    +
    +# select areas containing "fr"
    +myareas <- getAreas("fr")
    +
    +# Same but remove areas containing "hvdc"
    +myareas <- getAreas("fr", exclude = "hvdc")
    +
    +# Get the links that connect two of the previous areas
    +mylinks <- getLinks(myareas, internalOnly = FALSE)
    +
    +# Get the results for these areas and links
    +mydata <- readAntares(areas = myareas, links = mylinks)
    +
    +
    +

    Work with the imported data +

    +

    When only one type of elements is imported (only areas or only links, etc.) readAntares() read antares returns a data.table with some extra attributes. A data.table is a table with some enhanced capacities offered by package data.table. In particular it provides a special syntax to manipulate its content:

    +
    +name_of_the_table[filter_rows, select_columns, group_by]
    +

    Here are some examples:

    +
    +# Select lines based on some criteria
    +mydata[area == "fr" & month == "JUL"]
    +
    +# Select columns, and compute new ones
    +mydata[, .(area, month, load2 = LOAD^2)]
    +
    +# Aggregate data by some variables
    +mydata[, .(total = sum(LOAD)), by = .(month)]
    +
    +# All three operations can be done with a single line of code
    +mydata[area == "fr", .(total = sum(LOAD)), by = .(month)]
    +
    +help(package = "data.table")
    +

    If you are not familiar with package data.table, you should have a look at the documentation and especially at the vignettes of the package:

    +
    +help(package="data.table")
    +vignette("datatable-intro")
    +
    +
    +

    Contributing: +

    +

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

    +

    The folder test_case contains a test Antares study used to run automatic tests. If you modifies it, you need to run the following command to include the modifications in the tests:

    +
    +saveWd<-getwd()
    +setwd('inst/testdata/')
    +tar(
    +  tarfile = "antares-test-study.tar.gz", 
    +  files = "test_case", 
    +  compression = "gzip"
    +)
    +
    +setwd(saveWd)
    +
    +
    +

    ANTARES : +

    +

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

    +

    ANTARES is now an open-source project (since 2018), you can download the sources here if you want to use this package.

    +
    +
    +

    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.

    +
    +
    + +
    + + +
    + + +
    + +
    +

    +

    Site built with pkgdown 2.1.0.

    +
    + +
    +
    + + + + + + + + diff --git a/dev/link.svg b/dev/link.svg new file mode 100644 index 00000000..88ad8276 --- /dev/null +++ b/dev/link.svg @@ -0,0 +1,12 @@ + + + + + + diff --git a/dev/news/index.html b/dev/news/index.html new file mode 100644 index 00000000..21abe950 --- /dev/null +++ b/dev/news/index.html @@ -0,0 +1,574 @@ + +Changelog • antaresRead + + +
    +
    + + + +
    +
    + + +
    + +

    NEW FEATURES:

    +
    • New function readAntaresSTClusters() +
    • +
    • +fread_antares() shiny compatible with a conditional processing of the error messages
    • +

    BREAKING CHANGES :

    +

    BUGFIXES :

    +
    +
    + +

    NEW FEATURES:

    +
    • +readInputThermal() : +
      • new parameter areas to get desired clusters from selected areas.
      • +
      • new parameter thermalAvailabilities to import time series.
      • +
    • +
    • +readInputRES() new parameter areas to get desired clusters from selected areas.
    • +
    • +setSimulationPath() return a new parameter binding (for studies >= v8.7.0). It contains a table with group dimensions of time series for binding constraints.
    • +
    • +readAntares() new parameter clustersST to read (output simulation) short-term clusters
    • +

    BREAKING CHANGES :

    +

    BUGFIXES :

    +
    +
    + +
    +

    Breaking changes (Antares v8.7.0) :

    +
    • +readBindingConstraints() read now Scenarized RHS for binding constraints (cf. Antares v8.7 changelog) +
      • function returns a new list structure
      • +
    • +
    • Private function fread_antares() no longer returns warnings
    • +
    • +api_put()/api_delete() return a server error message
    • +

    BUGFIXES :

    +

    DATA :

    +
    • A test study in tar.gz format is available in version v8.7.0
    • +
    • An empty test study in version v8.7.0 for marginal cases
    • +

    Dependencies :

    +
    • New package lifecycle to manage functions status/package status
    • +
    +
    +
    + +

    BUGFIXES : * readIniFile() : avoid utils::type.convert on specific cases (ex : 789e or 123i) * api_get() add encoding argument to pass to httr::content()

    +
    +
    + +

    BUGFIXES :

    +
    • +setSimulationPathAPI() : +
      • returns an API exception if the requested study ID is incorrect
      • +
      • +simulation the simulation parameter works with negative values within the limit of the number of simulations
      • +
    • +
    • correction in readClusterDesc() calls to add “opts”
    • +
    • +readAntares() : +
      • returns the right column names for details-timeStep.txt and details-res-timeStep.txt
      • +
    • +
    • Correction in .formatlist(), read N-level list instead of 2.
    • +

    BREAKING CHANGES :

    +
    +
    + +

    NEW FEATURES (Antares v8.6, cf. Antares v8.6 changelog) :

    +
    • +readClusterSTDesc() read “short-term storage” clusters parameters (input files of an antares study)
    • +

    BREAKING CHANGES (Antares v8.6) :

    +
    • +readInputTS() is now compatible to read time series with : +
      • “short-term storage”
      • +
      • “mingen” (pmin hydro value)
      • +
    • +
    • +setSimulationPath() has new parameter areasWithSTClusters (name of area with “st-storage” cluster)
    • +

    BUGFIXES :

    +
    • +setSimulationPathAPI generate new global parameter sleep to add timer to API request
    • +
    • Correction of .importOutput() to use readAntares() with parallel == TRUE in shiny application
    • +
    • +setSimulationPathAPI() delete a redundant API request
    • +
    • +readClusterDesc() minor fix in API mode + fix if no cluster exists => return specific error message
    • +
    • +readIniAPI() read well file generaldata for sections “playlist” and “variables selection”
    • +

    DATA :

    +
    • A test study in tar.gz format is available in version v8.6.0 +
    • +
    +
    + +

    BUGFIXES:

    +

    DEV:

    +
    • Added new test study v8.5.
    • +
    • Package no longer tested on study v6.
    • +
    +
    + +

    NEW FEATURES:

    +
    • Full support of studies up to v8.5
    • +
    • Function readAntares() has new argument for binding constraints output (v8.4+) (#173)
    • +
    • New functions readDigestFile(), mergeDigests() and writeDigest() to manipulate digest file.
    • +
    • Mc-all aggregation : +
      • added computation of record years
      • +
      • merges original digest.txt with the one created
      • +
      • loads original thermal.txt +
      • +
    • +

    BUGFIXES:

    +
    • Major corrections to mc-all and mc-ind aggregation (LOLP, H. LEV)
    • +
    • Fixed existing write digest.txt part in mc-all aggregation
    • +
    • Fixed copy of original links in mc-all aggregation
    • +
    +
    + +

    NEW FEATURES:

    +
    • New function getGeographicTrimming() returns filtering options for selected areas (links optional).
    • +
    • New function readInputRes() for reading renewable clusters input data
    • +
    • Existing function getLinks() now has a new argument withTransmission. if TRUE, return additional column with type of transmission capacities.
    • +
    • Existing function readInputThermal() : added new argument for thermalData
    • +
    +
    + +

    NEW FEATURES:

    +

    Added new functions readInputThermal() and readAntaresClusters() : Both functions take a vector of clusters instead of areas * readInputThermal() : read thermal TS (availabilities) and modulation in Input mode * readAntaresClusters() : read output data for clusters only with thematic trimming

    +
    +
    + +

    NEW FEATURES:

    +

    Major upgrade to aggregateResult() and parAggregateMCall() : * Faster & memory efficient * Support for Antares studies up to v8.3 (v8.4 experimental) * Dynamic timestep detection * Creation of grid folder * Recycling of original mc-all data

    +
    +
    + +

    NEW FEATURES:

    +

    added “profit by cluster” when reading cluster data.

    +

    BUGFIXES:

    +

    Fix for 404 error when some output is missing in API mode(#188).

    +
    +
    + +

    BUGFIXES:

    +
    • readAntares : fix memory problems for linkCapacity = TRUE (>v8.2)
    • +
    • Support for url with special characters (#181)
    • +
    • Fix for setSimulationPathAPI not working with EnR aggregated (<v8.1) (#180)
    • +
    +
    + +
    +
    + +

    FEATURES:

    +
    • NTC by monte carlo years, antares 8.2 update +
      • Update readInputTS when linkCapacity argument is used
      • +
      • New link inputs
      • +
    • +
    +
    + +

    BUGFIXES:

    +
    • #168 : clean memory parAggregateMCall
    • +
    +
    + +

    BUGFIXES:

    +
    • removeVirtualAreas : setting custom prodVars same as new storageVars
    • +
    • API : fix study checking + httr options
    • +
    +
    + +

    FEATURES:

    +
    • Add ENR Cluster support (V8.1)
    • +
    • removeVirtualAreas : Can pass storageFlexibility named list
    • +
    • removeVirtualAreas : add prodVars, costsVars and costsOn arguments
    • +
    • fix linCapacity aggregation
    • +

    BUGFIXES:

    +
    • aggregateResult parallel export (#161)
    • +
    +
    + +

    FEATURES:

    +
    • Fixed bugs in readAntares when file is missing
    • +
    +
    + +

    FEATURES:

    +
    +
    + +

    FEATURES:

    +
    +
    + +

    FEATURES:

    +
    • Compatibility with Antares v7
    • +
    +
    + +

    BUGFIXES:

    +
    • Error with next data.table release
    • +
    +
    + +

    BUGFIXES:

    +
    • Duplicated vignette title
    • +
    +
    + +

    BUGFIXES:

    +
    • “.getStartDate()” : was not working correctly with a first-month not equal to “July” (#121)
    • +
    • “.getStartDate()” : was not working correctly when a user wants to change options with an opts (#122)
    • +
    +
    + +

    BREAKING CHANGES:

    +
    • “removeVirtualAres()” : as a new logical parameter rowBal, if is TRUE (default) then BALANCE will be corrected by ROW. BAL (#antaresProcessing33)
    • +

    NEW FEATURES:

    +
    • “removeVirtualAres()” : now correct BALANCE, COST and production of disticts.(#119)
    • +

    BUGFIXES:

    +
    • “readLayout()” : prevent bug reading multiple studies
    • +
    • “readAntares()” : prevent bug dealing with integer64
    • +
    • “writeAntaresH5()” was not working anymore due to a new version of rhdf5 (h5close() does not work anymore). (#110)
    • +
    +
    + +

    BUGFIXES:

    +
    • getLinks() was sending an error when there are no links in the study.
    • +
    +
    + +

    BUGFIXES:

    +
    • readInputTS() was sending bad values for hydroStorage. (#58)
    • +
    • changeTimeStep() will print a warning if the user want to aggregate data. (#54)
    • +
    • readAntares() will print warnings when a user want to aggregate mustRun data (#54)
    • +
    +
    + +

    NEW FEATURES:

    +
    • readInputTS() has a new parameter “thermalOutages” that permits to read thermal outages characteristics
    • +
    • Call removeVirtualAreas several times in writeAntaresH5()
    • +

    BUGFIXES:

    +
    • Correction of some bugs in removeVirtualAreas when there is several virtual nodes of production and storageFlexibility
    • +
    • Correction of some bugs due to the new lubridate version
    • +
    +
    + +

    BUGFIXES:

    +
    • Some tests failed in some platforms on CRAN.
    • +
    +
    + +

    BUGFIXES:

    +
    • readLayout() was not taking a list of simOptions.
    • +
    +
    + +

    NEW FEATURES:

    +
    • New function “writeAntaresH5()” convert ANTARES outputs to h5 files.
    • +
    • The path parameter of “setSimulationPath()” can be a h5 file.
    • +
    • New function “isH5Opts()” test if the value returned by setSimulationPath() is referring to an h5 file.
    • +
    • New function “readOptimCriteria()” read the value of the criteria optimized by ANTARES.
    • +
    • New function “setRam()” specify RAM limit (in Go) of the value returned by readAntares, initially it is 10Go.
    • +
    • New vignette “antaresH5” is available.
    • +

    BUGFIXES:

    +
    • removeVirtualAreas() was not moving clusters from virtual production area to the real area.
    • +
    • antaresRead() sometimes returned a antaresDataList with element “thermalModulation”. (#51)
    • +
    +
    + +

    BUGFIXES:

    +
    • setSimulation() was crashing with antares v6.0 because of the folder “maps”. (#49)
    • +
    +
    + +

    BUGFIXES:

    +
    • readInputTS was crashing when trying to import cluster data and some clusters were disabled.
    • +
    +
    + +

    BUGFIXES:

    +
    • Fixed an issue that caused compilation to crash on mac OS X
    • +
    +
    + +

    NEW FEATURES:

    +
    • The ‘select’ parameter of readAntares() has been improved. It now accepts new keywords “areas”, “links”, “clusters”, “districts” to indicate which type of data to read,“mcYears” to import detailed results, “misc”, “mustRun”, etc. to import the corresponding input data.
    • +
    • A new function setAlias() has been added. It permits to packages developers to define new aliases to use in the ‘select’ parameter of readAntares() in order to help their users to import the required data.
    • +
    • readBindingConstraints() has been improved and returns an object of class ‘bindingConstraints’ which is a named list where each element has the same structure.
    • +
    • A summary method has been added for objects of class ‘bindingConstraints’. It is useful to quickly look at the binding contraints defined in a study.
    • +
    • readAntares(mustRun = TRUE) now adds a new column “thermalPmin”. It is similar to mustRunTotal, except it also takes into account the minimum stable power of the cluster units.
    • +

    BUGFIXES:

    +
    • Columns ‘pumpingCapacity’ and ‘storageCapacity’ created by removeVirtualAreas() were reversed.
    • +
    • setSimulationPath() was sometimes setting a start data that was not consistent with parameters “1st january” and “leap year”.
    • +
    • setSimulationPath() was not working if synthetic results and the first Monte-Carlo scenario were not saved in a given Antares simulation.
    • +
    • readAntares(clusters = “all”) was not working in some situations.
    • +
    +
    + +

    BUGFIXES:

    +
    • In some specific situations, date columns could be filled with NA values. (#26)
    • +
    • Many small problems that were detected by R CMD CHECK.
    • +
    +
    + +

    BREAKING CHANGES:

    +
    • Parameter “synthesis” has been removed from readAntares. The new behavior is now to import synthetic results when “mcYears” is NULL and to import detailed results when “mcYears” is set.
    • +

    NEW FEATURES:

    +
    • New function “getIdCols()” returns the Id columns of an antaresDataTable object.
    • +
    • New method “subset()” for antaresDataList objects permits to quickly extract the data for a given area or a given Monte-Carlo scenario.
    • +

    BUGFIXES:

    +
    • In “input” mode, getLinks() could return links that did not exist anymore.
    • +
    • removeVirtualAreas was requiring some data that was not necesary. It should be OK now.
    • +
    • setSimulationPath() was crashing when one wanted to read the input data of a study before having run any simulation.
    • +
    • Variable “timeId” is now always numeric. Before it was numeric except for annual data where it could be character or factor.
    • +
    +
    + +

    NEW FEATURES:

    +
    • readAntares() has been significantly improved. Depending on the query, the time needed to import data is decreased by 20% up to 95%. In particular, importing data for clusters is now 20 times faster than before. Moreover, the progress bar is now more precise.
    • +
    • removeVirtualAreas() has a new parameter “newCols” that permits to choose whether to create new columns containing the production of the virtual areas or to update the existing ones.
    • +
    • removeVirtualAreas() now also removes virtual links from the data. Before it was removing virtual areas but keeping the virtual links.
    • +
    • If the transmission capacity of the links is present in the data, removeVirtualAreas() now creates two new columns containing the capacity of pumping and storage of areas. These columns are used to compute upward and downward margins.
    • +
    • New functions as.antaresDataTable and as.antaresDataList have been added to convert compatible objects to these classes.
    • +
    +
    + +

    BREAKING CHANGES:

    +
    • add a file LICENSE and copyright to sources files
    • +
    +
    + +

    BREAKING CHANGES:

    +
    • The object returned by ‘setSimulationPath’ and ‘simOptions’ has been modified. In particular, paths have been renamed to make their utility clearer. Moreover a new element named ‘linksDef’ contains a table with the specification of each link of the study.
    • +

    NEW FEATURES:

    +
    • getLinks() can now return a table with the specification of the links, thanks to two new parameters “namesOnly” and “withDirection”
    • +
    • It is now possible to import several times the same Monte-Carlo scenario. This can be useful for performance test or to use bootstrap methods.
    • +

    BUGFIXES:

    +
    • readClusterDesc was not working in input mode.
    • +
    • Sometimes setSimulationPath changed working directory.
    • +
    • Solved some performance issues in readAntares() and removeVirtualAreas().
    • +
    +
    + +

    BREAKING CHANGES:

    +
    • The parameters of ‘getLinks’ have been modified because they were unclear. Now user has to to explicitly specify areas to include and/or exclude.
    • +

    BUGFIXES:

    +
    • setSimulationPath was crashing if parameter ‘horizon’ was not set in Antares.
    • +
    • changeTimeStep sometimes generated NA values because of integer overflow.
    • +
    +
    + +

    BREAKING CHANGES: * Variable mustRunModuction has been renamed minGenModulation for consistency with Antares * Similarly in the object returned by setSimulationPath and simOptions, “setList” has been renamed “districtList”

    +

    NEW FEATURES: * Now, when one filters, add, remove or update columns of an object of class ‘antaresDataTable’, the result is still of class ‘antaresDataTable’.

    +
    +
    + +

    BUGFIXES:

    +
    • readAntares was incorrectly setting attributes of its ouput. This resulted in errors when using functions of the antaresProcessing package.
    • +
    +
    + +

    BREAKING CHANGES:

    +
    • The columns returned by readAntares when ‘hydroStorageMaxPower = TRUE’ have been renamed.
    • +

    NEW FEATURES:

    +
    • readAntares has a new parameter “thermalModulation” to import modulation time series.
    • +
    • New aliases have been added. One can inspect them with “showAliases()”.
    • +
    +
    + +

    NEW FEATURES:

    +
    • setSimulationPath nows reads costs of unsupplied et spilled energy.
    • +
    • ReadLayout computes coordinates for districts and link between them.
    • +
    • getAreas has a new parameter “district” to get areas in a set of districts.
    • +
    • getLinks has new parameter “areas” to get links connected to a set of areas.
    • +

    BUGFIXES:

    +
    • Small bug fixes that avoid useless warning messages/
    • +
    +
    + +

    BREAKING CHANGES:

    +
    • The package has been renamed “antaresRead”.
    • +

    NEW FEATURES:

    +
    • changeTimeStep accepts two new functions : min and max.
    • +
    • readAntares now computes the number of available units.
    • +

    BUGFIXES:

    +
    • setSimulationPath was crashing if parameter “horizon” was not set in Antares.
    • +
    • setSimulationPath throws a warning when two simulations have same name and it uses the most recent one.
    • +
    • In presence of hubs and production nodes, removeVirtualAreas treated production nodes two times.
    • +
    • Column “month” was sometimes numeric and other times character.
    • +
    • setSimulationPath was not recognising option “apply-filter = add-all” when retrieving district definition.
    • +
    +
    + +

    NEW FEATURES:

    +
    • readAntares and readInputTS always add time columns (time, day, month, hour). changeTimeStep now keeps them if they are present.
    • +

    BUGFIXES:

    +
    • readAntares may not work when some MC years were not exported by Antares.
    • +
    • The construction of the weeks was wrong when a year did not start on january.
    • +
    • The import of inputs was wrong when the study was not conducted on a whole year but on a smaller period.
    • +
    • In removeVirtualNodes, option “reassignCosts” was not working correctly.
    • +
    +
    + +

    BREAKING CHANGES:

    +
    • To be consistent with Antares, ‘node’ has been replaced by ‘area’ everywhere in the package.
    • +
    • Column ‘MWh’ is now named ‘production’ when reading clusters output.
    • +

    NEW FEATURES:

    +
    • new function ‘readInputTS’ to read input time series (without output time series)
    • +
    • ‘setSimulationPath’ now accepts two new values for the argument “simulation”: 0 and “input”. These values indicate that the user is not interested by the results of any simulation and only wants to read input data.
    • +
    • changeTimeStep now accepts for parameter ‘fun’ a vector of function names that indicate how to aggregate/disagregate each column.
    • +
    • getAreas has a new argument “withClustersOnly” to select areas containing clusters
    • +
    • readAntares can now also add input time series to districts like it does for areas
    • +

    BUGFIXES:

    +
    • ‘copyToClipboard’ was copying the word “txt” instead of copying data
    • +
    • ‘removeVirtualNodes’ was not creating some columns for production virtual nodes.
    • +
    • The option ‘mustRun’ in readAntares was not functionning correctly
    • +
    +
    + +

    BREAKING CHANGES:

    +
    • The parameters and the output of “readAntares” have been modified. The output has now only three components: nodes, links and clusters. If the user asks other information like hydro storage or links capacities, they are added to the corresponding component. The corresponding parameters now expect TRUE/ FALSE instead of a vector of node or link names.
    • +
    • “getLinks” has now same parameters and behavior than “getNodes”
    • +
    • Parameter “trace” has been removed in “setSimulationPath”.
    • +

    NEW FEATURES:

    +
    • “readAntares” has a new argument “mustRun”
    • +
    • “removeVirtualNodes” has been finalised
    • +
    • New function “simOptions” to get either global simulation options or simulation options used by “readAntares” to create a given object
    • +
    • New alias “nosum” to remove “min”, “max”, and “std” columns when “synthesis=TRUE” in “readAntares”
    • +
    • “setSimulationPath” has a new argument “simulation” to choose a simulation by name or by order inside an antares project
    • +
    • New function “getDistricts”
    • +
    • New function “copyToClipboard”
    • +
    • Added package vignette
    • +
    +
    + +

    NEW FEATURES:

    +
    • “readAntares” can now read hydro storage, hydro storage maximum power, reserve and links capacity
    • +
    • New function “readAntaresNodes”: read all the desired data for a set of nodes
    • +
    • New function “readBindingConstraints”
    • +
    • New function “changeTimeStep”: change the timestep of an “antaresOutput” object or any table containing a variable timeId
    • +
    • New function “getNodes”: select and filter nodes of an antares study
    • +
    • “extractDataList” has been improved for better compatibility with PPSE scripts
    • +
    • Improved documentation
    • +
    • New function removeVirtualNodes (still experimental)
    • +
    • Added this NEWS file :)
    • +
    +
    + +

    BREAKING CHANGES:

    +
    • “readOutput” has been renamed “readAntares”
    • +

    NEW FEATURES:

    +
    • “readAntares” can now read thermal availabilities
    • +
    • “setSimulationPath” now reads simulation parameters
    • +
    • “setSimulationPath” now accepts path to a study and eventually asks the user to choose an output
    • +
    • Nodes and sets are now separated in “readAntares” and “setSimulationPath”
    • +
    • aliases for groups of variables in parameter “select” of “readAntares”
    • +
    +
    + + + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/pkgdown.css b/dev/pkgdown.css new file mode 100644 index 00000000..80ea5b83 --- /dev/null +++ b/dev/pkgdown.css @@ -0,0 +1,384 @@ +/* Sticky footer */ + +/** + * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ + * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css + * + * .Site -> body > .container + * .Site-content -> body > .container .row + * .footer -> footer + * + * Key idea seems to be to ensure that .container and __all its parents__ + * have height set to 100% + * + */ + +html, body { + height: 100%; +} + +body { + position: relative; +} + +body > .container { + display: flex; + height: 100%; + flex-direction: column; +} + +body > .container .row { + flex: 1 0 auto; +} + +footer { + margin-top: 45px; + padding: 35px 0 36px; + border-top: 1px solid #e5e5e5; + color: #666; + display: flex; + flex-shrink: 0; +} +footer p { + margin-bottom: 0; +} +footer div { + flex: 1; +} +footer .pkgdown { + text-align: right; +} +footer p { + margin-bottom: 0; +} + +img.icon { + float: right; +} + +/* Ensure in-page images don't run outside their container */ +.contents img { + max-width: 100%; + height: auto; +} + +/* Fix bug in bootstrap (only seen in firefox) */ +summary { + display: list-item; +} + +/* Typographic tweaking ---------------------------------*/ + +.contents .page-header { + margin-top: calc(-60px + 1em); +} + +dd { + margin-left: 3em; +} + +/* Section anchors ---------------------------------*/ + +a.anchor { + display: none; + margin-left: 5px; + width: 20px; + height: 20px; + + background-image: url(./link.svg); + background-repeat: no-repeat; + background-size: 20px 20px; + background-position: center center; +} + +h1:hover .anchor, +h2:hover .anchor, +h3:hover .anchor, +h4:hover .anchor, +h5:hover .anchor, +h6:hover .anchor { + display: inline-block; +} + +/* Fixes for fixed navbar --------------------------*/ + +.contents h1, .contents h2, .contents h3, .contents h4 { + padding-top: 60px; + margin-top: -40px; +} + +/* Navbar submenu --------------------------*/ + +.dropdown-submenu { + position: relative; +} + +.dropdown-submenu>.dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + border-radius: 0 6px 6px 6px; +} + +.dropdown-submenu:hover>.dropdown-menu { + display: block; +} + +.dropdown-submenu>a:after { + display: block; + content: " "; + float: right; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 5px 0 5px 5px; + border-left-color: #cccccc; + margin-top: 5px; + margin-right: -10px; +} + +.dropdown-submenu:hover>a:after { + border-left-color: #ffffff; +} + +.dropdown-submenu.pull-left { + float: none; +} + +.dropdown-submenu.pull-left>.dropdown-menu { + left: -100%; + margin-left: 10px; + border-radius: 6px 0 6px 6px; +} + +/* Sidebar --------------------------*/ + +#pkgdown-sidebar { + margin-top: 30px; + position: -webkit-sticky; + position: sticky; + top: 70px; +} + +#pkgdown-sidebar h2 { + font-size: 1.5em; + margin-top: 1em; +} + +#pkgdown-sidebar h2:first-child { + margin-top: 0; +} + +#pkgdown-sidebar .list-unstyled li { + margin-bottom: 0.5em; +} + +/* bootstrap-toc tweaks ------------------------------------------------------*/ + +/* All levels of nav */ + +nav[data-toggle='toc'] .nav > li > a { + padding: 4px 20px 4px 6px; + font-size: 1.5rem; + font-weight: 400; + color: inherit; +} + +nav[data-toggle='toc'] .nav > li > a:hover, +nav[data-toggle='toc'] .nav > li > a:focus { + padding-left: 5px; + color: inherit; + border-left: 1px solid #878787; +} + +nav[data-toggle='toc'] .nav > .active > a, +nav[data-toggle='toc'] .nav > .active:hover > a, +nav[data-toggle='toc'] .nav > .active:focus > a { + padding-left: 5px; + font-size: 1.5rem; + font-weight: 400; + color: inherit; + border-left: 2px solid #878787; +} + +/* Nav: second level (shown on .active) */ + +nav[data-toggle='toc'] .nav .nav { + display: none; /* Hide by default, but at >768px, show it */ + padding-bottom: 10px; +} + +nav[data-toggle='toc'] .nav .nav > li > a { + padding-left: 16px; + font-size: 1.35rem; +} + +nav[data-toggle='toc'] .nav .nav > li > a:hover, +nav[data-toggle='toc'] .nav .nav > li > a:focus { + padding-left: 15px; +} + +nav[data-toggle='toc'] .nav .nav > .active > a, +nav[data-toggle='toc'] .nav .nav > .active:hover > a, +nav[data-toggle='toc'] .nav .nav > .active:focus > a { + padding-left: 15px; + font-weight: 500; + font-size: 1.35rem; +} + +/* orcid ------------------------------------------------------------------- */ + +.orcid { + font-size: 16px; + color: #A6CE39; + /* margins are required by official ORCID trademark and display guidelines */ + margin-left:4px; + margin-right:4px; + vertical-align: middle; +} + +/* Reference index & topics ----------------------------------------------- */ + +.ref-index th {font-weight: normal;} + +.ref-index td {vertical-align: top; min-width: 100px} +.ref-index .icon {width: 40px;} +.ref-index .alias {width: 40%;} +.ref-index-icons .alias {width: calc(40% - 40px);} +.ref-index .title {width: 60%;} + +.ref-arguments th {text-align: right; padding-right: 10px;} +.ref-arguments th, .ref-arguments td {vertical-align: top; min-width: 100px} +.ref-arguments .name {width: 20%;} +.ref-arguments .desc {width: 80%;} + +/* Nice scrolling for wide elements --------------------------------------- */ + +table { + display: block; + overflow: auto; +} + +/* Syntax highlighting ---------------------------------------------------- */ + +pre, code, pre code { + background-color: #f8f8f8; + color: #333; +} +pre, pre code { + white-space: pre-wrap; + word-break: break-all; + overflow-wrap: break-word; +} + +pre { + border: 1px solid #eee; +} + +pre .img, pre .r-plt { + margin: 5px 0; +} + +pre .img img, pre .r-plt img { + background-color: #fff; +} + +code a, pre a { + color: #375f84; +} + +a.sourceLine:hover { + text-decoration: none; +} + +.fl {color: #1514b5;} +.fu {color: #000000;} /* function */ +.ch,.st {color: #036a07;} /* string */ +.kw {color: #264D66;} /* keyword */ +.co {color: #888888;} /* comment */ + +.error {font-weight: bolder;} +.warning {font-weight: bolder;} + +/* Clipboard --------------------------*/ + +.hasCopyButton { + position: relative; +} + +.btn-copy-ex { + position: absolute; + right: 0; + top: 0; + visibility: hidden; +} + +.hasCopyButton:hover button.btn-copy-ex { + visibility: visible; +} + +/* headroom.js ------------------------ */ + +.headroom { + will-change: transform; + transition: transform 200ms linear; +} +.headroom--pinned { + transform: translateY(0%); +} +.headroom--unpinned { + transform: translateY(-100%); +} + +/* mark.js ----------------------------*/ + +mark { + background-color: rgba(255, 255, 51, 0.5); + border-bottom: 2px solid rgba(255, 153, 51, 0.3); + padding: 1px; +} + +/* vertical spacing after htmlwidgets */ +.html-widget { + margin-bottom: 10px; +} + +/* fontawesome ------------------------ */ + +.fab { + font-family: "Font Awesome 5 Brands" !important; +} + +/* don't display links in code chunks when printing */ +/* source: https://stackoverflow.com/a/10781533 */ +@media print { + code a:link:after, code a:visited:after { + content: ""; + } +} + +/* Section anchors --------------------------------- + Added in pandoc 2.11: https://github.com/jgm/pandoc-templates/commit/9904bf71 +*/ + +div.csl-bib-body { } +div.csl-entry { + clear: both; +} +.hanging-indent div.csl-entry { + margin-left:2em; + text-indent:-2em; +} +div.csl-left-margin { + min-width:2em; + float:left; +} +div.csl-right-inline { + margin-left:2em; + padding-left:1em; +} +div.csl-indent { + margin-left: 2em; +} diff --git a/dev/pkgdown.js b/dev/pkgdown.js new file mode 100644 index 00000000..6f0eee40 --- /dev/null +++ b/dev/pkgdown.js @@ -0,0 +1,108 @@ +/* http://gregfranko.com/blog/jquery-best-practices/ */ +(function($) { + $(function() { + + $('.navbar-fixed-top').headroom(); + + $('body').css('padding-top', $('.navbar').height() + 10); + $(window).resize(function(){ + $('body').css('padding-top', $('.navbar').height() + 10); + }); + + $('[data-toggle="tooltip"]').tooltip(); + + var cur_path = paths(location.pathname); + var links = $("#navbar ul li a"); + var max_length = -1; + var pos = -1; + for (var i = 0; i < links.length; i++) { + if (links[i].getAttribute("href") === "#") + continue; + // Ignore external links + if (links[i].host !== location.host) + continue; + + var nav_path = paths(links[i].pathname); + + var length = prefix_length(nav_path, cur_path); + if (length > max_length) { + max_length = length; + pos = i; + } + } + + // Add class to parent
  • , and enclosing
  • if in dropdown + if (pos >= 0) { + var menu_anchor = $(links[pos]); + menu_anchor.parent().addClass("active"); + menu_anchor.closest("li.dropdown").addClass("active"); + } + }); + + function paths(pathname) { + var pieces = pathname.split("/"); + pieces.shift(); // always starts with / + + var end = pieces[pieces.length - 1]; + if (end === "index.html" || end === "") + pieces.pop(); + return(pieces); + } + + // Returns -1 if not found + function prefix_length(needle, haystack) { + if (needle.length > haystack.length) + return(-1); + + // Special case for length-0 haystack, since for loop won't run + if (haystack.length === 0) { + return(needle.length === 0 ? 0 : -1); + } + + for (var i = 0; i < haystack.length; i++) { + if (needle[i] != haystack[i]) + return(i); + } + + return(haystack.length); + } + + /* Clipboard --------------------------*/ + + function changeTooltipMessage(element, msg) { + var tooltipOriginalTitle=element.getAttribute('data-original-title'); + element.setAttribute('data-original-title', msg); + $(element).tooltip('show'); + element.setAttribute('data-original-title', tooltipOriginalTitle); + } + + if(ClipboardJS.isSupported()) { + $(document).ready(function() { + var copyButton = ""; + + $("div.sourceCode").addClass("hasCopyButton"); + + // Insert copy buttons: + $(copyButton).prependTo(".hasCopyButton"); + + // Initialize tooltips: + $('.btn-copy-ex').tooltip({container: 'body'}); + + // Initialize clipboard: + var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { + text: function(trigger) { + return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); + } + }); + + clipboardBtnCopies.on('success', function(e) { + changeTooltipMessage(e.trigger, 'Copied!'); + e.clearSelection(); + }); + + clipboardBtnCopies.on('error', function() { + changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); + }); + }); + } +})(window.jQuery || window.$) diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml new file mode 100644 index 00000000..c10007fa --- /dev/null +++ b/dev/pkgdown.yml @@ -0,0 +1,6 @@ +pandoc: 3.1.11 +pkgdown: 2.1.0 +pkgdown_sha: ~ +articles: + antaresRead: antaresRead.html +last_built: 2024-09-02T15:20Z diff --git a/dev/reference/API-methods.html b/dev/reference/API-methods.html new file mode 100644 index 00000000..02a4a5a0 --- /dev/null +++ b/dev/reference/API-methods.html @@ -0,0 +1,151 @@ + +API methods — API-methods • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    API methods

    +
    + +
    +
    api_get(
    +  opts,
    +  endpoint,
    +  ...,
    +  default_endpoint = "v1/studies",
    +  parse_result = NULL,
    +  encoding = NULL
    +)
    +
    +api_post(opts, endpoint, ..., default_endpoint = "v1/studies")
    +
    +api_put(opts, endpoint, ..., default_endpoint = "v1/studies")
    +
    +api_delete(opts, endpoint, ..., default_endpoint = "v1/studies")
    +
    + +
    +

    Arguments

    + + +
    opts
    +

    Antares simulation options or a list with an host = slot.

    + + +
    endpoint
    +

    API endpoint to interrogate, it will be added after default_endpoint. +Can be a full URL (by wrapping ìn I()), in that case default_endpoint is ignored.

    + + +
    ...
    +

    Additional arguments passed to API method.

    + + +
    default_endpoint
    +

    Default endpoint to use.

    + + +
    parse_result
    +

    character options for parameter as of function httr::content()

    + + +
    encoding
    +

    argument to pass as argument to the function httr::content()

    + +
    +
    +

    Value

    +

    Response from the API.

    +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +
    +# List studies with local API
    +# default result content in R object (auto parsed)
    +api_get(opts = list(host = "http://0.0.0.0:8080"),
    +        endpoint = NULL, 
    +        parse_result = NULL)
    +
    +# you can force parse options as text and encoding to UTF-8
    +api_get(opts = list(host = "http://0.0.0.0:8080"),
    +        endpoint = NULL, 
    +        parse_result = "text",
    +        encoding = "UTF-8")
    +
    +} # }
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/Rplot001.png b/dev/reference/Rplot001.png new file mode 100644 index 00000000..17a35806 Binary files /dev/null and b/dev/reference/Rplot001.png differ diff --git a/dev/reference/aggregatate_mc_all.html b/dev/reference/aggregatate_mc_all.html new file mode 100644 index 00000000..4d768357 --- /dev/null +++ b/dev/reference/aggregatate_mc_all.html @@ -0,0 +1,161 @@ + +Creation of Mc_all new (only antares > V6) — parAggregateMCall • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    Creation of Mc_all new (only antares > V6)

    +
    + +
    +
    parAggregateMCall(
    +  opts,
    +  nbcl = 8,
    +  verbose = 2,
    +  timestep = c("annual", "daily", "hourly", "monthly", "weekly"),
    +  writeOutput = TRUE,
    +  mcWeights = NULL,
    +  mcYears = NULL,
    +  filtering = FALSE,
    +  selected = NULL,
    +  legacy = FALSE
    +)
    +
    +aggregateResult(
    +  opts,
    +  verbose = 2,
    +  timestep = c("annual", "daily", "hourly", "monthly", "weekly"),
    +  writeOutput = TRUE,
    +  mcWeights = NULL,
    +  mcYears = NULL,
    +  filtering = FALSE,
    +  selected = NULL,
    +  legacy = FALSE
    +)
    +
    + +
    +

    Arguments

    + + +
    opts
    +

    list of simulation parameters returned by the function setSimulationPath

    + + +
    nbcl
    +

    numeric Number of parralel process

    + + +
    verbose
    +

    numeric show log in console. Defaut to 1

    • 0 : No log

    • +
    • 1 : Short log

    • +
    • 2 : Long log

    • +
    + + +
    timestep
    +

    character antares timestep

    + + +
    writeOutput
    +

    boolean write result or not.

    + + +
    mcWeights
    +

    numeric vector of weigth for mcYears.

    + + +
    mcYears
    +

    numeric mcYears to load.

    + + +
    filtering
    +

    boolean filtering control

    + + +
    selected
    +

    list named list (pass to antaresRead) : list(areas = 'a', links = 'a - e')

    + + +
    legacy
    +

    boolean run old version of the function

    + +
    +
    +

    Value

    +

    Object list of data.tables, each element representing one type +of element (areas, links, clusters)

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/antaresRead-package.html b/dev/reference/antaresRead-package.html new file mode 100644 index 00000000..0e10beb0 --- /dev/null +++ b/dev/reference/antaresRead-package.html @@ -0,0 +1,107 @@ + +antaresRead: Import, Manipulate and Explore the Results of an 'Antares' Simulation — antaresRead-package • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    Import, manipulate and explore results generated by 'Antares', a powerful open source software developed by RTE (Réseau de Transport d’Électricité) to simulate and study electric power systems (more information about 'Antares' here : https://antares-simulator.org/).

    +
    + + + +
    +

    Author

    +

    Maintainer: Tatiana Vargas tatiana.vargas@rte-france.com

    +

    Authors:

    • Jalal-Edine ZAWAM

    • +
    • Francois Guillem

    • +
    • Benoit Thieurmel

    • +
    • Titouan Robert

    • +

    Other contributors:

    • Frederic Breant [contributor]

    • +
    • Victor Perrier [contributor]

    • +
    • Etienne Sanchez [contributor]

    • +
    • Assil Mansouri [contributor]

    • +
    • Clement Berthet [contributor]

    • +
    • Kamel Kemiha [contributor]

    • +
    • Abdallah Mahoudi [contributor]

    • +
    • Nicolas Boitard [contributor]

    • +
    • RTE [copyright holder]

    • +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/as.antaresDataList.html b/dev/reference/as.antaresDataList.html new file mode 100644 index 00000000..08cebe9b --- /dev/null +++ b/dev/reference/as.antaresDataList.html @@ -0,0 +1,145 @@ + +Convert objects to antaresDataTable — as.antaresDataList • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    This function converts a list of tables or table into an +antaresDataList object.

    +

    An antaresDataList is a list of tables of classantaresDataTable. +It also has attributes that store the time step, the type of data and the +simulation options.

    +
    + +
    +
    as.antaresDataList(x, ...)
    +
    +# S3 method for class 'antaresDataTable'
    +as.antaresDataList(x, name = NULL, ...)
    +
    +# S3 method for class 'data.frame'
    +as.antaresDataList(
    +  x,
    +  synthesis,
    +  timeStep,
    +  type,
    +  opts = simOptions(),
    +  name = type,
    +  ...
    +)
    +
    + +
    +

    Arguments

    + + +
    x
    +

    Data.frame or data.table to convert to a an antaresDataTable.

    + + +
    ...
    +

    Arguments to be passed to methods.

    + + +
    name
    +

    name of the table in the final object. If NULL, the type of the data +is used.

    + + +
    synthesis
    +

    Does the table contain synthetic results ?

    + + +
    timeStep
    +

    Time step of the data. One of "hourly", "daily", "weekly", "monthly" or "annual".

    + + +
    type
    +

    type of data: for instance "areas", "links", "clusters", etc.

    + + +
    opts
    +

    Simulation options.

    + +
    +
    +

    Value

    +

    antaresDataList object.

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/as.antaresDataTable.html b/dev/reference/as.antaresDataTable.html new file mode 100644 index 00000000..2cd8dbe6 --- /dev/null +++ b/dev/reference/as.antaresDataTable.html @@ -0,0 +1,129 @@ + +Convert objects to antaresDataTable — as.antaresDataTable • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    This function converts a data.frame or a data.table into an +antaresDataTable object.

    +

    An antaresDataTable is simply a data.table with additional +attributes recording the time step, the type of data and the simulation +options.

    +
    + +
    +
    as.antaresDataTable(x, ...)
    +
    +# S3 method for class 'data.frame'
    +as.antaresDataTable(x, synthesis, timeStep, type, opts = simOptions(), ...)
    +
    + +
    +

    Arguments

    + + +
    x
    +

    object to convert to a an antaresDataList.

    + + +
    ...
    +

    Arguments to be passed to methods.

    + + +
    synthesis
    +

    Does the table contain synthetic results ?

    + + +
    timeStep
    +

    Time step of the data. One of "hourly", "daily", "weekly", "monthly" or "annual".

    + + +
    type
    +

    type of data: for instance "areas", "links", "clusters", etc.

    + + +
    opts
    +

    Simulation options.

    + +
    +
    +

    Value

    +

    antaresDataTable object.

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/changeTimeStep.html b/dev/reference/changeTimeStep.html new file mode 100644 index 00000000..908b4384 --- /dev/null +++ b/dev/reference/changeTimeStep.html @@ -0,0 +1,145 @@ + +Change the timestep of an output — changeTimeStep • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    This function changes the timestep of a table or an antaresData object +and performs the required aggregation or desaggregation. We can specify +(des)aggregate functions by columns, see the param fun.

    +
    + +
    +
    changeTimeStep(x, newTimeStep, oldTimeStep, fun = "sum", opts = simOptions())
    +
    + +
    +

    Arguments

    + + +
    x
    +

    data.table with a column "timeId" or an object of class "antaresDataList"

    + + +
    newTimeStep
    +

    Desired time step.The possible values are hourly, daily, weekly, +monthly and annual.

    + + +
    oldTimeStep
    +

    Current time step of the data. This argument is optional for an object of +class antaresData because the time step of the data is stored inside +the object

    + + +
    fun
    +

    Character vector with one element per column to (des)aggregate indicating +the function to use ("sum", "mean", "min" or "max") for this column. It can +be a single element, in that case the same function is applied to every +columns.

    + + +
    opts
    +

    list of simulation parameters returned by the function +setSimulationPath

    + +
    +
    +

    Value

    +

    Either a data.table or an object of class "antaresDataList" depending on the +class of x

    +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +setSimulationPath()
    +
    +areasH <- readAntares(select = "LOAD", synthesis = FALSE, mcYears = 1)
    +areasD <- readAntares(select = "LOAD", synthesis = FALSE, mcYears = 1, timeStep ="daily")
    +
    +areasDAgg <- changeTimeStep(areasH, "daily", "hourly")
    +
    +all.equal(areasDAgg$LOAD, areasD$LOAD)
    +
    +# Use different aggregation functions
    +mydata <- readAntares(select = c("LOAD", "MRG. PRICE"), timeStep = "monthly")
    +changeTimeStep(mydata, "annual", fun = c("sum", "mean"))
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/copyToClipboard.html b/dev/reference/copyToClipboard.html new file mode 100644 index 00000000..034b6c3b --- /dev/null +++ b/dev/reference/copyToClipboard.html @@ -0,0 +1,133 @@ + +Copy data to the clipboard — copyToClipboard • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    copyToClipboard is a utility function that copies data to the +clipboard. The data can then be copied in another program like excel.

    +
    + +
    +
    copyToClipboard(x, ...)
    +
    +# S3 method for class 'antaresDataList'
    +copyToClipboard(x, what, ...)
    +
    + +
    +

    Arguments

    + + +
    x
    +

    an object used to select a method.

    + + +
    ...
    +

    arguments passed to write.table

    + + +
    what
    +

    character or numeric indicating which element to copy to clipboard (areas, +links, clusters or districts)

    + +
    +
    +

    Value

    +

    The function does not return anything. It is only used to interact with the +clipboard

    +
    +
    +

    Note

    +

    The function is useful only for small data objects: for a table, +only the 50000 rows are copied to clipboard. If the table to copy +is longer, either use filters to reduce the number of rows or write the +table in text file with write.table

    +
    + +
    +

    Examples

    +
     # This only works on Windows systems
    +if (FALSE) { # \dontrun{
    +x <- data.frame(a = sample(10), b = sample(10))
    +
    +copyToClipboard(x)
    +
    +# Try to open excel and use CTRL + V to copy the data in a spreadsheet.
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/dot-writeIni.html b/dev/reference/dot-writeIni.html new file mode 100644 index 00000000..82be56d4 --- /dev/null +++ b/dev/reference/dot-writeIni.html @@ -0,0 +1,114 @@ + +Write ini file from list obtain by antaresRead::readIniFile and modify by user — .writeIni • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    Write ini file from list obtain by antaresRead::readIniFile and modify by user

    +
    + +
    +
    .writeIni(listData, pathIni, overwrite = FALSE)
    +
    + +
    +

    Arguments

    + + +
    listData
    +

    list, modified list obtained by antaresRead::readIniFile.

    + + +
    pathIni
    +

    Character, Path to ini file.

    + + +
    overwrite
    +

    logical, should file be overwritten if already exist?

    + +
    + +
    +

    Examples

    +
    
    +if (FALSE) { # \dontrun{
    +pathIni <- "D:/exemple_test/settings/generaldata.ini"
    +generalSetting <- antaresRead::readIniFile(pathIni)
    +generalSetting$output$synthesis <- FALSE
    +writeIni(generalSetting, pathIni)
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/extractDataList.html b/dev/reference/extractDataList.html new file mode 100644 index 00000000..72393ff1 --- /dev/null +++ b/dev/reference/extractDataList.html @@ -0,0 +1,115 @@ + +Format data PPSE-style — extractDataList • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    This function converts an "readAntares" object in the data structure used +by PPSE : instead of having one table for areas, one for links and one for +clusters, the function creates a list with one element per area. Each element +is a data.table containing the data about the area and one column per cluster +of the area containing the production of this cluster.

    +
    + +
    +
    extractDataList(x, areas = NULL)
    +
    + +
    +

    Arguments

    + + +
    x
    +

    object of class "antaresData" or "antaresTable" created by the function +readAntares

    + + +
    areas
    +

    character vector containing the name of areas to keep in the +final object. If NULL, all areas are kept in the final object.

    + +
    +
    +

    Value

    +

    a list of data.tables with one element per area. The list also +contains an element named "areaList" containing the name of areas in the +object and a table called "infos" that contains for each area the number +of variables of different type (values, details, link).

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/figures/antares_simulator.png b/dev/reference/figures/antares_simulator.png new file mode 100644 index 00000000..0115f089 Binary files /dev/null and b/dev/reference/figures/antares_simulator.png differ diff --git a/dev/reference/figures/badge_api_no.svg b/dev/reference/figures/badge_api_no.svg new file mode 100644 index 00000000..35501024 --- /dev/null +++ b/dev/reference/figures/badge_api_no.svg @@ -0,0 +1,20 @@ + + Antares API: NO + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/reference/figures/badge_api_ok.svg b/dev/reference/figures/badge_api_ok.svg new file mode 100644 index 00000000..a210e856 --- /dev/null +++ b/dev/reference/figures/badge_api_ok.svg @@ -0,0 +1,20 @@ + + Antares API: OK + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/reference/figures/h5_comparison.PNG b/dev/reference/figures/h5_comparison.PNG new file mode 100644 index 00000000..34b2bf03 Binary files /dev/null and b/dev/reference/figures/h5_comparison.PNG differ diff --git a/dev/reference/figures/lifecycle-archived.svg b/dev/reference/figures/lifecycle-archived.svg new file mode 100644 index 00000000..48f72a6f --- /dev/null +++ b/dev/reference/figures/lifecycle-archived.svg @@ -0,0 +1 @@ + lifecyclelifecyclearchivedarchived \ No newline at end of file diff --git a/dev/reference/figures/lifecycle-defunct.svg b/dev/reference/figures/lifecycle-defunct.svg new file mode 100644 index 00000000..01452e5f --- /dev/null +++ b/dev/reference/figures/lifecycle-defunct.svg @@ -0,0 +1 @@ +lifecyclelifecycledefunctdefunct \ No newline at end of file diff --git a/dev/reference/figures/lifecycle-deprecated.svg b/dev/reference/figures/lifecycle-deprecated.svg new file mode 100644 index 00000000..4baaee01 --- /dev/null +++ b/dev/reference/figures/lifecycle-deprecated.svg @@ -0,0 +1 @@ +lifecyclelifecycledeprecateddeprecated \ No newline at end of file diff --git a/dev/reference/figures/lifecycle-experimental.svg b/dev/reference/figures/lifecycle-experimental.svg new file mode 100644 index 00000000..d1d060e9 --- /dev/null +++ b/dev/reference/figures/lifecycle-experimental.svg @@ -0,0 +1 @@ +lifecyclelifecycleexperimentalexperimental \ No newline at end of file diff --git a/dev/reference/figures/lifecycle-maturing.svg b/dev/reference/figures/lifecycle-maturing.svg new file mode 100644 index 00000000..df713101 --- /dev/null +++ b/dev/reference/figures/lifecycle-maturing.svg @@ -0,0 +1 @@ +lifecyclelifecyclematuringmaturing \ No newline at end of file diff --git a/dev/reference/figures/lifecycle-questioning.svg b/dev/reference/figures/lifecycle-questioning.svg new file mode 100644 index 00000000..08ee0c90 --- /dev/null +++ b/dev/reference/figures/lifecycle-questioning.svg @@ -0,0 +1 @@ +lifecyclelifecyclequestioningquestioning \ No newline at end of file diff --git a/dev/reference/figures/lifecycle-stable.svg b/dev/reference/figures/lifecycle-stable.svg new file mode 100644 index 00000000..e015dc81 --- /dev/null +++ b/dev/reference/figures/lifecycle-stable.svg @@ -0,0 +1 @@ +lifecyclelifecyclestablestable \ No newline at end of file diff --git a/dev/reference/figures/lifecycle-superseded.svg b/dev/reference/figures/lifecycle-superseded.svg new file mode 100644 index 00000000..75f24f55 --- /dev/null +++ b/dev/reference/figures/lifecycle-superseded.svg @@ -0,0 +1 @@ + lifecyclelifecyclesupersededsuperseded \ No newline at end of file diff --git a/dev/reference/getAreas.html b/dev/reference/getAreas.html new file mode 100644 index 00000000..62a2ff8b --- /dev/null +++ b/dev/reference/getAreas.html @@ -0,0 +1,161 @@ + +Select and exclude areas — getAreas • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    getAreas and getDistricts are utility functions that builds +list of areas or districts by using regular expressions to select and/or +exclude areas/districts

    +
    + +
    +
    getAreas(
    +  select = NULL,
    +  exclude = NULL,
    +  withClustersOnly = FALSE,
    +  regexpSelect = TRUE,
    +  regexpExclude = TRUE,
    +  opts = simOptions(),
    +  ignore.case = TRUE,
    +  districts = NULL
    +)
    +
    +getDistricts(
    +  select = NULL,
    +  exclude = NULL,
    +  regexpSelect = TRUE,
    +  regexpExclude = TRUE,
    +  opts = simOptions(),
    +  ignore.case = TRUE
    +)
    +
    + +
    +

    Arguments

    + + +
    select
    +

    Character vector. If regexpSelect is TRUE, this vector is +interpreted as a list of regular expressions. Else it is interpreted as a +list of area names. If NULL, all areas are selected

    + + +
    exclude
    +

    Character vector. If regexpExclude is TRUE, this vector is +interpreted as a list of regular expressions and each area validating one +of them is excluded. Else it is interpreted as list of area names to +exclude. If NULL, not any area is excluded.

    + + +
    withClustersOnly
    +

    Should the function return only nodes containing clusters ?

    + + +
    regexpSelect
    +

    Is select a list of regular expressions ?

    + + +
    regexpExclude
    +

    Is exclude a list of regular expressions ?

    + + +
    opts
    +

    list of simulation parameters returned by the function +setSimulationPath

    + + +
    ignore.case
    +

    Should the case be ignored when evaluating the regular +expressions ?

    + + +
    districts
    +

    Names of districts. If this argument is not null, only areas belonging +to the specified districts are returned.

    + +
    +
    +

    Value

    +

    A character vector containing the name of the areas/districts satisfying the +rules defined by the parameters.

    +
    +
    +

    See also

    + +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/getGeographicTrimming.html b/dev/reference/getGeographicTrimming.html new file mode 100644 index 00000000..5eec04ee --- /dev/null +++ b/dev/reference/getGeographicTrimming.html @@ -0,0 +1,106 @@ + +Read geographic trimming (filtering) options — getGeographicTrimming • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    Read geographic trimming (filtering) options

    +
    + +
    +
    getGeographicTrimming(areas = NULL, links = TRUE, opts = simOptions())
    +
    + +
    +

    Arguments

    + + +
    areas
    +

    Character. vector of areas

    + + + +

    Logical. if TRUE, return filtering options for all links starting from selected areas

    + + +
    opts
    +

    List. simulation options

    + +
    +
    +

    Value

    +

    list of filtering options for areas and links

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/getIdCols.html b/dev/reference/getIdCols.html new file mode 100644 index 00000000..bc5945ee --- /dev/null +++ b/dev/reference/getIdCols.html @@ -0,0 +1,98 @@ + +get Id columns — getIdCols • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    getIdCols return the id columns of an AntaresDataTable

    +
    + +
    +
    getIdCols(x = NULL)
    +
    + +
    +

    Arguments

    + + +
    x
    +

    an AntaresDataTable.

    + +
    +
    +

    Value

    +

    A character vector containing the name of the id columns of an antaresDataTable

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/getLinks.html b/dev/reference/getLinks.html new file mode 100644 index 00000000..0d00cdf2 --- /dev/null +++ b/dev/reference/getLinks.html @@ -0,0 +1,197 @@ + +Retrieve links connected to a set of areas — getLinks • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    This function finds the names of the links connected to a set of areas.

    +
    + +
    +
    getLinks(
    +  areas = NULL,
    +  exclude = NULL,
    +  opts = simOptions(),
    +  internalOnly = FALSE,
    +  namesOnly = TRUE,
    +  withDirection = FALSE,
    +  withTransmission = FALSE
    +)
    +
    + +
    +

    Arguments

    + + +
    areas
    +

    Vector containing area names. It represents the set of areas we are interested +in. If NULL, all areas of the study are used.

    + + +
    exclude
    +

    Vector containing area names. If not NULL, all links connected to +one of these areas are omitted.

    + + +
    opts
    +

    list of simulation parameters returned by the function +setSimulationPath

    + + +
    internalOnly
    +

    If TRUE, only links that connect two areas from parameter areas are returned. +If not, the function also returns all the links that connect an area from the list with +an area outside the list.

    + + +
    namesOnly
    +

    If TRUE, the function returns a vector with link names, else it +returns a table containing the name, the origin and the destination of each +selected link.

    + + +
    withDirection
    +

    Used only if namesOnly = FALSE. If FALSE, then the function +returns a table with one line per link, containing the link name, the +origin and the destination of the link. If TRUE, then it returns a +table with columns area, link, to and direction +which is equal is equal to +1 if the link connects area to to and -1 if it connects +to to area. +The column area contains only areas that are compatible with parameters +areas and exclude. Note that the same link can appear twice +in the table with different directions.

    + + +
    withTransmission
    +

    Used only if namesOnly = FALSE. If TRUE, a column is added to indicate +type of transmission capacities for links.

    + +
    +
    +

    Value

    +

    If namesOnly = TRUE the function returns a vector containing link names

    +

    If namesOnly = FALSE and withDirection = FALSE, it returns a +data.table with exactly one line per link and with three columns:

    +
    link
    +

    Link name

    + +
    from
    +

    First area connected to the link

    + +
    to
    +

    Second area connected to the link

    + + +

    If namesOnly = FALSE and withDirection = TRUE, it returns a +data.table with one or two lines per link and with four columns:

    +
    area
    +

    Area name

    + +
    link
    +

    Link name

    + +
    to
    +

    Area connected to area by link

    + +
    direction
    +

    1 if the link connects area to to else -1

    + +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +
    +# Get all links of a study
    +getLinks()
    +
    +# Get all links with their origins and destinations
    +getLinks(namesOnly = FALSE)
    +
    +# Get all links connected to French areas (assuming their names contain "fr")
    +getLinks(getAreas("fr"))
    +
    +# Same but with only links connecting two French areas
    +getLinks(getAreas("fr"), internalOnly = TRUE)
    +
    +# Exclude links connecting real areas with pumped storage virtual areas
    +# (assuming their names contain "psp")
    +getLinks(getAreas("fr"), exclude = getAreas("psp"))
    +
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/hvdcModification.html b/dev/reference/hvdcModification.html new file mode 100644 index 00000000..02739252 --- /dev/null +++ b/dev/reference/hvdcModification.html @@ -0,0 +1,119 @@ + +hvdc straitement — hvdcModification • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    usage for hvdc

    +
    + +
    +
    hvdcModification(data, removeHvdcAreas = TRUE, reafectLinks = FALSE)
    +
    + +
    +

    Arguments

    + + +
    data
    +

    antaresDataList data to apply straitement

    + + +
    removeHvdcAreas
    +

    boolean remove HVDC areas.

    + + + +

    boolean .

    + +
    +
    +

    Value

    +

    Object of class "antaresDataList" is returned. +It is a list of data.tables, each element representing one type of element (areas, links, clusters)

    +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +
    +data <- readAntares(areas = 'all', links = 'all')
    +data <- setHvdcAreas(data, "psp in")
    +data <- hvdcModification(data)
    +
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/index.html b/dev/reference/index.html new file mode 100644 index 00000000..c06fa5e2 --- /dev/null +++ b/dev/reference/index.html @@ -0,0 +1,232 @@ + +Package index • antaresRead + + +
    +
    + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    All functions

    +

    +
    +

    api_get() api_post() api_put() api_delete()

    +

    API methods

    +

    parAggregateMCall() aggregateResult()

    +

    Creation of Mc_all new (only antares > V6)

    +

    as.antaresDataList()

    +

    Convert objects to antaresDataTable

    +

    as.antaresDataTable()

    +

    Convert objects to antaresDataTable

    +

    changeTimeStep()

    +

    Change the timestep of an output

    +

    copyToClipboard()

    +

    Copy data to the clipboard

    +

    extractDataList()

    +

    Format data PPSE-style

    +

    getAreas() getDistricts()

    +

    Select and exclude areas

    +

    getGeographicTrimming()

    +

    Read geographic trimming (filtering) options

    +

    getIdCols()

    +

    get Id columns

    +

    getLinks()

    +

    Retrieve links connected to a set of areas

    +

    hvdcModification()

    +

    hvdc straitement

    +

    mergeDigests()

    +

    Merge two digests

    +

    ponderateMcAggregation()

    +

    Mcyear aggregation weigthed by wd

    +

    readIni() readIniFile() readIniAPI()

    +

    Read configuration options from file or API

    +

    readAntares()

    +

    Read the data of an Antares simulation

    +

    readAntaresAreas()

    +

    Read output for a list of areas

    +

    readAntaresClusters()

    +

    Read output for a list of clusters

    +

    readAntaresSTClusters()

    +

    Read output for a list of short-term storage clusters

    +

    readBindingConstraints()

    +

    Read binding constraints

    +

    readClusterDesc() readClusterResDesc() readClusterSTDesc()

    +

    Import clusters description

    +

    readDigestFile()

    +

    Read digest file

    +

    readInputRES()

    +

    Read Input RES time series

    +

    readInputTS()

    +

    Read Input time series

    +

    readInputThermal()

    +

    Read Input thermal time series

    +

    readLayout()

    +

    Read areas layout

    +

    readOptimCriteria()

    +

    Read Optimization Criteria

    +

    removeVirtualAreas()

    +

    Remove virtual areas

    +

    showAliases() setAlias() getAlias()

    +

    show aliases for variables

    +

    setHvdcAreas()

    +

    Set hvdc areas

    +

    setRam()

    +

    Specify RAM limit

    +

    setSimulationPath() setSimulationPathAPI()

    +

    Set Path to an Antares simulation

    +

    setTimeoutAPI()

    +

    Change API Timeout

    +

    simOptions()

    +

    Extract simulation options

    +

    subset(<antaresDataList>)

    +

    Subset an antaresDataList

    +

    summary(<bindingConstraints>)

    +

    Display equation of binding constraint

    +

    viewAntares()

    +

    View the content of an antares output

    +

    writeDigest()

    +

    Write digest file

    + + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/mergeDigests.html b/dev/reference/mergeDigests.html new file mode 100644 index 00000000..d37ae0e2 --- /dev/null +++ b/dev/reference/mergeDigests.html @@ -0,0 +1,107 @@ + +Merge two digests — mergeDigests • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    Merge two digests

    +
    + +
    +
    mergeDigests(digest_new, digest_ori)
    +
    + +
    +

    Arguments

    + + +
    digest_new
    +

    new digest with missing lines

    + + +
    digest_ori
    +

    original digest with all lines

    + +
    +
    +

    Value

    +

    updated digest +list of 5 tables (begin, areas, middle, links lin., links quad.)

    +
    +
    +

    See also

    + +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/ponderateMcAggregation.html b/dev/reference/ponderateMcAggregation.html new file mode 100644 index 00000000..59b6ec35 --- /dev/null +++ b/dev/reference/ponderateMcAggregation.html @@ -0,0 +1,117 @@ + +Mcyear aggregation weigthed by wd — ponderateMcAggregation • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    Mcyear aggregation weigthed by wd

    +
    + +
    +
    ponderateMcAggregation(x, fun = weighted.mean, ...)
    +
    + +
    +

    Arguments

    + + +
    x
    +

    antaresData data import with antaresRead

    + + +
    fun
    +

    function function to use

    + + +
    ...
    +

    args others args pass to fun

    + +
    +
    +

    Value

    +

    Object of class "antaresDataTable".

    +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +  data <- readAntares(areas = 'all', mcYears = 'all')
    +  ponderateMcAggregation(data, fun = weighted.mean, w = c(.1, .9))
    +
    +  
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/read-ini.html b/dev/reference/read-ini.html new file mode 100644 index 00000000..e0b6a11d --- /dev/null +++ b/dev/reference/read-ini.html @@ -0,0 +1,157 @@ + +Read configuration options from file or API — read-ini • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    Read configuration options from file or API

    +
    + +
    +
    readIni(pathIni, opts = antaresRead::simOptions(), default_ext = ".ini")
    +
    +readIniFile(file, stringsAsFactors = FALSE)
    +
    +readIniAPI(study_id, path, host, token = NULL)
    +
    + +
    +

    Arguments

    + + +
    pathIni
    +

    Path to config/ini file to read.

    + + +
    opts
    +

    List of simulation parameters returned by the function +setSimulationPath()

    + + +
    default_ext
    +

    Default extension used for config files.

    + + +
    file
    +

    File path.

    + + +
    stringsAsFactors
    +

    logical: should character vectors be converted to factors?

    + + +
    study_id
    +

    Study's identifier.

    + + +
    path
    +

    Path of configuration object to read.

    + + +
    host
    +

    Host of AntaREST server API.

    + + +
    token
    +

    API personnal access token.

    + +
    +
    +

    Value

    +

    A list with an element for each section of the .ini file.

    +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +library(antaresRead)
    +library(antaresEditObject)
    +
    +# With physical study:
    +setSimulationPath("../tests-studies/Study_V8.2/", simulation = "input")
    +readIni("settings/generaldata")
    +
    +# With API
    +setSimulationPathAPI(
    +  host = "http://localhost:8080",
    +  study_id = "73427ae1-be83-44e0-b04f-d5127e53424c",
    +  token = NULL,
    +  simulation = "input"
    +)
    +readIni("settings/generaldata")
    +
    +} # }
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/readAntares.html b/dev/reference/readAntares.html new file mode 100644 index 00000000..511b60d9 --- /dev/null +++ b/dev/reference/readAntares.html @@ -0,0 +1,367 @@ + +Read the data of an Antares simulation — readAntares • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    Antares API OK

    +

    readAntares is a swiss-army-knife function used to read almost every +possible time series of an antares Project at any desired time resolution +(hourly, daily, weekly, monthly or annual).

    +

    It was first designed to read +output time series, but it can also read input time series. The input time +series are processed by the function to fit the query of the user (timeStep, +synthetic results or Monte-Carlo simulation, etc.). The few data that are not +read by readAntares can generally by read with other functions of the +package starting with "read" (readClusterDesc, +readLayout, readBindingConstraints)

    +
    + +
    +
    readAntares(
    +  areas = NULL,
    +  links = NULL,
    +  clusters = NULL,
    +  districts = NULL,
    +  clustersRes = NULL,
    +  clustersST = NULL,
    +  bindingConstraints = FALSE,
    +  misc = FALSE,
    +  thermalAvailabilities = FALSE,
    +  hydroStorage = FALSE,
    +  hydroStorageMaxPower = FALSE,
    +  reserve = FALSE,
    +  linkCapacity = FALSE,
    +  mustRun = FALSE,
    +  thermalModulation = FALSE,
    +  select = NULL,
    +  mcYears = NULL,
    +  timeStep = c("hourly", "daily", "weekly", "monthly", "annual"),
    +  mcWeights = NULL,
    +  opts = simOptions(),
    +  parallel = FALSE,
    +  simplify = TRUE,
    +  showProgress = TRUE
    +)
    +
    + +
    +

    Arguments

    + + +
    areas
    +

    Vector containing the names of the areas to import. If +NULL no area is imported. The special value "all" tells the +function to import all areas. By default, the value is "all" when no other argument is enter and "NULL" when other arguments are enter.

    + + + +

    Vector containing the name of links to import. If NULL no +area is imported. The special value "all" tells the function to +import all areas. Use function getLinks to import all links +connected to some areas.

    + + +
    clusters
    +

    Vector containing the name of the areas for which you want to +import results at thermal cluster level. If NULL no cluster is imported. The +special value "all" tells the function to import thermal clusters from all +areas.

    + + +
    districts
    +

    Vector containing the names of the districts to import. If NULL, +no district is imported. The special value "all" tells the function to import all +districts.

    + + +
    clustersRes
    +

    Vector containing the name of the areas for which you want to +import results at renewable cluster level. If NULL no cluster is imported. The +special value "all" tells the function to import renewable clusters from all +areas.

    + + +
    clustersST
    +

    Vector containing the name of the areas for which you want to +import results at short-term cluster level. If NULL no cluster is imported. The +special value "all" tells the function to import short-term clusters from all +areas.

    + + +
    bindingConstraints
    +

    Should binding constraints be imported (v8.4+)?

    + + +
    misc
    +

    Vector containing the name of the areas for which you want to +import misc.

    + + +
    thermalAvailabilities
    +

    Should thermal availabilities of clusters be imported ? If TRUE, the column +"thermalAvailability" is added to the result and a new column "availableUnits" +containing the number of available units in a cluster is created.If synthesis is set to TRUE then +"availableUnits" contain the mean of avaible units on all MC Years.

    + + +
    hydroStorage
    +

    Should hydro storage be imported ?

    + + +
    hydroStorageMaxPower
    +

    Should hydro storage maximum power be imported ?

    + + +
    reserve
    +

    Should reserve be imported ?

    + + +
    linkCapacity
    +

    Should link capacities be imported ?

    + + +
    mustRun
    +

    Should must run productions be added to the result? If TRUE, +then four columns are added: mustRun contains the production of +clusters that are in complete must run mode; mustRunPartial +contains the partial must run production of clusters; mustRunTotal +is the sum of the two previous columns. Finally thermalPmin is +similar to mustRunTotal except it also takes into account the production +induced by the minimum stable power of the units of a cluster. More +precisely, for a given cluster and a given time step, it is equal to +min(NODU x min-stable-power, mustRunTotal).

    + + +
    thermalModulation
    +

    Should thermal modulation time series be imported ? If TRUE, the +columns "marginalCostModulation", "marketBidModulation", "capacityModulation" +and "minGenModulation" are added to the cluster data.

    + + +
    select
    +

    Character vector containing the name of the columns to import. If this +argument is NULL, all variables are imported. Special names +"allAreas" and "allLinks" indicate to the function to import +all variables for areas or for links. Since version 1.0, values "misc", +"thermalAvailabilities", "hydroStorage", "hydroStorageMaxPower", "reserve", +"linkCapacity", "mustRun", "thermalModulation" are also accepted and can +replace the corresponding arguments. The list of available variables can be +seen with the command simOptions()$variables. Id variables like +area, link or timeId are automatically imported. +Note that select is not taken into account when importing cluster +data.

    + + +
    mcYears
    +

    Index of the Monte-Carlo years to import. If NULL, synthetic results +are read, else the specified Monte-Carlo simulations are imported. The +special value all tells the function to import all Monte-Carlo +simulations.

    + + +
    timeStep
    +

    Resolution of the data to import: hourly (default), daily, +weekly, monthly or annual.

    + + +
    mcWeights
    +

    Vector of weights to apply to the specified mcYears. If not NULL, the vector must +be the same length as the vector provided in the mcYear parameter. The function +readAntares will then return the weighted synthetic results for the specified years, +with the specified weights.

    + + +
    opts
    +

    list of simulation parameters returned by the function +setSimulationPath

    + + +
    parallel
    +

    Should the importation be parallelized ? (See details)

    + + +
    simplify
    +

    If TRUE and only one type of output is imported then a +data.table is returned. If FALSE, the result will always be a list of class +"antaresData".

    + + +
    showProgress
    +

    If TRUE the function displays information about the progress of the +importation.

    + +
    +
    +

    Value

    +

    If simplify = TRUE and only one type of output is imported +then the result is a data.table.

    +

    Else an object of class "antaresDataList" is returned. It is a list of +data.tables, each element representing one type of element (areas, links, +clusters)

    +
    +
    +

    Details

    +

    If parameters areas, links, clusters and districts +are all NULL, readAntares will read output for all areas. +By default the function reads synthetic results if they are available.

    +

    readAntares is able to read input time series, but when they are not +stored in output, these time series may have changed since a simulation has +been run. In such a case the function will remind you this danger with a +warning.

    +

    When individual Monte-Carlo simulations are read, the function may crash +because of insufficient memory. In such a case, it is necessary to reduce +size of the output. Different strategies are available depending on your +objective:

    +
    • Use a larger time step (parameter timeStep)

    • +
    • Filter the elements to import (parameters areas,links, +clusters and districts)

    • +
    • Select only a few columns (parameter select)

    • +
    • read only a subset of Monte-Carlo simulations (parameter +mcYears). For instance one can import a random sample of +100 simulations with mcYears = sample(simOptions()$mcYears, 100)

    • +
    +
    +

    Parallelization

    + + + +

    If you import several elements of the same type (areas, links, clusters), you +can use parallelized importation to improve performance. Setting the +parameter parallel = TRUE is not enough to parallelize the +importation, you also have to install the package +foreach +and a package that provides a parallel backend (for instance the package +doParallel).

    +

    Before running the function with argument parallel=TRUE, you need to +register your parallel backend. For instance, if you use package "doParallel" +you need to use the function registerDoParallel once per +session.

    +
    + + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +# Import areas and links separately
    +
    +areas <- readAntares() # equivalent to readAntares(areas="all")
    +links <- readAntares(links="all")
    +
    +# Import areas and links at same time
    +
    +output <- readAntares(areas = "all", links = "all")
    +
    +# Add input time series to the object returned by the function
    +areas <- readAntares(areas = "all", misc = TRUE, reserve = TRUE)
    +
    +# Get all output for one area
    +
    +myArea <- sample(simOptions()$areaList, 1)
    +myArea
    +
    +myAreaOutput <- readAntares(area = myArea,
    +                            links = getLinks(myArea, regexpSelect=FALSE),
    +                            clusters = myArea)
    +
    +# Or equivalently:
    +myAreaOutput <- readAntaresAreas(myArea)
    +
    +# Use parameter "select" to read only some columns.
    +
    +areas <- readAntares(select = c("LOAD", "OV. COST"))
    +
    +# Aliases can be used to select frequent groups of columns. use showAliases()
    +# to view a list of available aliases
    +
    +areas <- readAntares(select="economy")
    +
    +} # }
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/readAntaresAreas.html b/dev/reference/readAntaresAreas.html new file mode 100644 index 00000000..4e3c0b2e --- /dev/null +++ b/dev/reference/readAntaresAreas.html @@ -0,0 +1,154 @@ + +Read output for a list of areas — readAntaresAreas • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    This a function is a wrapper for "antaresData" that reads all data for a +list of areas.

    +
    + +
    +
    readAntaresAreas(
    +  areas,
    +  links = TRUE,
    +  clusters = TRUE,
    +  clustersRes = TRUE,
    +  internalOnly = FALSE,
    +  opts = simOptions(),
    +  ...
    +)
    +
    + +
    +

    Arguments

    + + +
    areas
    +

    Vector containing area names. It represents the set of areas we are interested +in. If NULL, all areas of the study are used.

    + + + +

    should links connected to the areas be imported ?

    + + +
    clusters
    +

    should the thermal clusters of the areas be imported ?

    + + +
    clustersRes
    +

    should the renewable clusters of the areas be imported ?

    + + +
    internalOnly
    +

    If TRUE, only links that connect two areas from parameter areas are returned. +If not, the function also returns all the links that connect an area from the list with +an area outside the list.

    + + +
    opts
    +

    list of simulation parameters returned by the function +setSimulationPath

    + + +
    ...
    +

    Other arguments passed to the function readAntares

    + +
    +
    +

    Value

    +

    If simplify = TRUE and only one type of output is imported +then the result is a data.table.

    +

    Else an object of class "antaresData" is returned. It is a list of +data.tables, each element representing one type of element (areas, links, +clusters)

    +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +myarea <- simOptions()$areaList[1]
    +data <- readAntaresAreas(myarea)
    +
    +# Equivalent but more concise than:
    +data2 <- readAntares(myarea, links = getLinks(myarea), clusters = myarea)
    +
    +all.equal(data, data2)
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/readAntaresClusters.html b/dev/reference/readAntaresClusters.html new file mode 100644 index 00000000..2a664445 --- /dev/null +++ b/dev/reference/readAntaresClusters.html @@ -0,0 +1,128 @@ + +Read output for a list of clusters — readAntaresClusters • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    Read output for a list of clusters

    +
    + +
    +
    readAntaresClusters(
    +  clusters,
    +  selected = c("production", "NP Cost", "NODU", "profit"),
    +  timeStep = c("hourly", "daily", "weekly", "monthly", "annual"),
    +  opts = simOptions(),
    +  parallel = FALSE,
    +  showProgress = TRUE
    +)
    +
    + +
    +

    Arguments

    + + +
    clusters
    +

    vector of thermal clusters to be imported

    + + +
    selected
    +

    vector of thematic trimming

    + + +
    timeStep
    +

    Resolution of the data to import: hourly (default), daily, +weekly, monthly or annual.

    + + +
    opts
    +

    list of simulation parameters returned by the function +setSimulationPath

    + + +
    parallel
    +

    Should the importation be parallelized ? (See details)

    + + +
    showProgress
    +

    If TRUE the function displays information about the progress of the +importation.

    + +
    +
    +

    Value

    +

    data.table of results for thermal clusters

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/readAntaresSTClusters.html b/dev/reference/readAntaresSTClusters.html new file mode 100644 index 00000000..36f1652a --- /dev/null +++ b/dev/reference/readAntaresSTClusters.html @@ -0,0 +1,128 @@ + +Read output for a list of short-term storage clusters — readAntaresSTClusters • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    Read output for a list of short-term storage clusters

    +
    + +
    +
    readAntaresSTClusters(
    +  clustersST,
    +  selected = c("P.injection", "levels", "P.withdrawal"),
    +  timeStep = c("hourly", "daily", "weekly", "monthly", "annual"),
    +  opts = simOptions(),
    +  parallel = FALSE,
    +  showProgress = TRUE
    +)
    +
    + +
    +

    Arguments

    + + +
    clustersST
    +

    vector of short-term storage clusters to be imported

    + + +
    selected
    +

    vector of thematic trimming

    + + +
    timeStep
    +

    Resolution of the data to import: hourly (default), daily, +weekly, monthly or annual.

    + + +
    opts
    +

    list of simulation parameters returned by the function +setSimulationPath

    + + +
    parallel
    +

    Should the importation be parallelized ? (See details)

    + + +
    showProgress
    +

    If TRUE the function displays information about the progress of the +importation.

    + +
    +
    +

    Value

    +

    data.table of results for short-term storage clusters

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/readBindingConstraints.html b/dev/reference/readBindingConstraints.html new file mode 100644 index 00000000..802b1796 --- /dev/null +++ b/dev/reference/readBindingConstraints.html @@ -0,0 +1,152 @@ + +Read binding constraints — readBindingConstraints • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    Antares API OK[Experimental]

    +

    This function reads the binding constraints of an Antares project.

    +

    Be aware that binding constraints are read in the input files of a study. So +they may have changed since a simulation has been run.

    +
    + +
    +
    readBindingConstraints(opts = simOptions())
    +
    + +
    +

    Arguments

    + + +
    opts
    +

    list of simulation parameters returned by the function +setSimulationPath

    + +
    +
    +

    Value

    +

    An object of class bindingConstraints. This object is also a named +list with 3 sections per read constraint.

    +
    +
    +

    Note

    +

    For an study Antares version >=8.7.0. Now contains data.frame with +one line per time step and \(p\) colums according to "scenarized RHS".

    +

    For "both" case, you will find in section values two data.frame :

    • One data.frame for less

    • +
    • One data.frame for greater

    • +

    For an study Antares version <8.7.0.

    +

    Section values contains one line +per time step and three columns "less", "greater" and "equal"

    +
    +
    +

    Warning

    + + +

    Since release 2.7.0 the structure of the returned object has evolved for +all versions of study Antares:

    • .ini parameters are in section properties

    • +
    • Coeffcients links or thermal are in section coefs

    • +
    • Values are already in section values

    • +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +setSimulationPath()
    +
    +constraints <- readBindingConstraints()
    +
    +# read properties
    +constraints$properties
    +
    +# read coefs
    +constraints$coefs
    +
    +# read values
    +constraints$values
    +  # both case ( study Antares >=8.7.0)
    +constraints$values$less
    +constraints$values$greater
    +
    +# display equation (only for study Antares <8.7.0)
    +summary(constraints)
    +
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/readClusterDesc.html b/dev/reference/readClusterDesc.html new file mode 100644 index 00000000..d722659d --- /dev/null +++ b/dev/reference/readClusterDesc.html @@ -0,0 +1,162 @@ + +Import clusters description — readClusterDesc • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    This function reads in the input files of an antares study the +characteristics of each cluster.

    +

    Be aware that clusters descriptions are read +in the input files so they may have changed since a simulation has been run.

    +
    + +
    +
    readClusterDesc(opts = simOptions())
    +
    +readClusterResDesc(opts = simOptions())
    +
    +readClusterSTDesc(opts = simOptions())
    +
    + +
    +

    Arguments

    + + +
    opts
    +

    list of simulation parameters returned by the function +setSimulationPath

    + +
    +
    +

    Value

    +

    A data.table with one line per cluster. The columns of the data.table may +change between different projects, but there will always be the following +columns:

    +
    area
    +

    Name of the area containing the cluster

    + +
    cluster
    +

    Name of the cluster

    + +
    group
    +

    Type of cluster (gaz, nuclear, etc.)

    + +
    unitcount
    +

    number of production units

    + +
    nominalcapacity
    +

    production capacity of each unit

    + + +

    The other present columns depends on the version of antares and the options +that have been set: if an option is unset for all clusters, it will not +appear in the table.

    +

    By default, the function reads the cluster description of the default antares +study. You can use the argument opts to specify another study.

    +

    readClusterDesc : read thermal clusters

    +

    readClusterResDesc : read renewable clusters (Antares >= V8.1)

    +

    readClusterSTDesc : read st-storage clusters (Antares >= V8.6)

    +

    If you have no clusters properties, Null data.table (0 rows and 0 cols) is returned.

    +
    + +
    +

    Examples

    +
    
    +if (FALSE) { # \dontrun{
    +
    +# thermal
    +readClusterDesc()
    +
    +# renewable
    +readClusterResDesc()
    +
    +# st-storage
    +readClusterSTDesc()
    +
    +# By default, the function reads cluster descriptions for the default study,
    +# but it is possible to specify another study with parameter "opts"
    +sim1 <- setSimulationPath()
    +
    +#[... code that modifies the default antares study]
    +
    +readClusterDesc(sim1)
    +
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/readDigestFile.html b/dev/reference/readDigestFile.html new file mode 100644 index 00000000..c1d0229d --- /dev/null +++ b/dev/reference/readDigestFile.html @@ -0,0 +1,103 @@ + +Read digest file — readDigestFile • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    Read digest file

    +
    + +
    +
    readDigestFile(opts, endpoint = "mc-all/grid/digest.txt")
    +
    + +
    +

    Arguments

    + + +
    opts
    +

    simulation options

    + + +
    endpoint
    +

    Suffix of path for digest file +Default is : "mc-all/grid/digest.txt" added to opts$simDataPath

    + +
    +
    +

    Value

    +

    list of 5 tables (begin, areas, middle, links lin., links quad.)

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/readInputRES.html b/dev/reference/readInputRES.html new file mode 100644 index 00000000..6037c764 --- /dev/null +++ b/dev/reference/readInputRES.html @@ -0,0 +1,144 @@ + +Read Input RES time series — readInputRES • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    readInputRes is a function that reads renewable time series from an antares +project. But contrary to readAntares, it only reads time series +stored in the input folder, so it can work in "input" mode.

    +
    + +
    +
    readInputRES(
    +  areas = "all",
    +  clusters,
    +  opts = simOptions(),
    +  timeStep = c("hourly", "daily", "weekly", "monthly", "annual"),
    +  simplify = TRUE,
    +  parallel = FALSE,
    +  showProgress = TRUE
    +)
    +
    + +
    +

    Arguments

    + + +
    areas
    +

    vector of RES areas names for which renewable time series must be read.

    + + +
    clusters
    +

    vector of RES clusters names for which renewable time series must be read.

    + + +
    opts
    +

    list of simulation parameters returned by the function +setSimulationPath

    + + +
    timeStep
    +

    Resolution of the data to import: hourly (default), daily, +weekly, monthly or annual.

    + + +
    simplify
    +

    If TRUE and only one type of output is imported then a +data.table is returned. If FALSE, the result will always be a list of class +"antaresData".

    + + +
    parallel
    +

    Should the importation be parallelized ? (See details)

    + + +
    showProgress
    +

    If TRUE the function displays information about the progress of the +importation.

    + +
    +
    +

    Value

    +

    data.table with class "antaresDataTable".

    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/readInputTS.html b/dev/reference/readInputTS.html new file mode 100644 index 00000000..fc889a1a --- /dev/null +++ b/dev/reference/readInputTS.html @@ -0,0 +1,237 @@ + +Read Input time series — readInputTS • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    Antares API OK

    +

    readInputTS is a function that reads time series from an antares +project. But contrary to readAntares, it only reads time series +stored in the input folder, so it can work in "input" mode.

    +
    + +
    +
    readInputTS(
    +  load = NULL,
    +  thermalAvailabilities = NULL,
    +  ror = NULL,
    +  mingen = NULL,
    +  hydroStorage = NULL,
    +  hydroStorageMaxPower = NULL,
    +  wind = NULL,
    +  solar = NULL,
    +  misc = NULL,
    +  reserve = NULL,
    +  linkCapacity = NULL,
    +  resProduction = NULL,
    +  st_storage = NULL,
    +  opts = simOptions(),
    +  timeStep = c("hourly", "daily", "weekly", "monthly", "annual"),
    +  simplify = TRUE,
    +  parallel = FALSE,
    +  showProgress = TRUE
    +)
    +
    + +
    +

    Arguments

    + + +
    load
    +

    vector of areas names for which load time series must be read.

    + + +
    thermalAvailabilities
    +

    vector of areas names for which thermal availabilities of clusters must be read.

    + + +
    ror
    +

    vector of areas names for which run of river time series must be read.

    + + +
    mingen
    +

    vector of areas names for which Hydro Pmin time series must be read. +(only for Antares version >= 860)

    + + +
    hydroStorage
    +

    vector of areas names for which hydrolic storage time series must be read.

    + + +
    hydroStorageMaxPower
    +

    vector of areas names for which hydrolic storage maximum power time series must be read.

    + + +
    wind
    +

    vector of areas names for which wind time series must be read

    + + +
    solar
    +

    vector of areas names for which solar time series must be read

    + + +
    misc
    +

    vector of areas names for which misc time series must be read

    + + +
    reserve
    +

    vector of areas names for which reserve time series must be read

    + + +
    linkCapacity
    +

    vector of links names for which links characteristics time series must be read

    + + +
    resProduction
    +

    vector of areas names for which renewables clusters production time series must be read.

    + + +
    st_storage
    +

    vector of areas names for which st-storage clusters production time series must be read.

    + + +
    opts
    +

    list of simulation parameters returned by the function +setSimulationPath

    + + +
    timeStep
    +

    Resolution of the data to import: hourly (default), daily, +weekly, monthly or annual.

    + + +
    simplify
    +

    If TRUE and only one type of output is imported then a +data.table is returned. If FALSE, the result will always be a list of class +"antaresData".

    + + +
    parallel
    +

    Should the importation be parallelized ? (See details)

    + + +
    showProgress
    +

    If TRUE the function displays information about the progress of the +importation.

    + +
    +
    +

    Value

    +

    If simplify = TRUE and only one type of input is imported +then the result is a data.table with class "antaresDataTable".

    +

    Else an object of class "antaresDataList" is returned. It is a list of +data.tables, each element representing one type of element (load, wind, +solar, etc.).

    +
    +
    +

    Note

    +

    All parameters expecting a vector of areas or links names also accept the +special value "all". It indicates the function to read the desired time +series for all areas or links.

    +
    + + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +# Set an antares study in "input" mode. This is useful when one want to
    +# inspect input time series before running a simulation.
    +# Note that readAntares do not function in input mode, but readInputTS
    +# works with any mode.
    +
    +setSimulationPath("path_to_the_study", "input")
    +
    +# Read load time series
    +readInputTS(load = "all")
    +
    +# Read hydrolic storage and maximum power in the same call:
    +readInputTS(hydroStorage = "all", hydroStorageMaxPower = "all")
    +
    +# Use a different time step
    +myArea <- readInputTS(load= "myArea", timeStep = "monthly")
    +
    +# Quick plot to visualize the variability of the series
    +matplot(myArea[, - (1:2), with = FALSE], type = "l")
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/readInputThermal.html b/dev/reference/readInputThermal.html new file mode 100644 index 00000000..9a469df0 --- /dev/null +++ b/dev/reference/readInputThermal.html @@ -0,0 +1,166 @@ + +Read Input thermal time series — readInputThermal • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    readInputThermal is a function that reads thermal time series from an antares +project. But contrary to readAntares, it only reads time series +stored in the input folder, so it can work in "input" mode.

    +
    + +
    +
    readInputThermal(
    +  areas = "all",
    +  clusters,
    +  thermalAvailabilities = TRUE,
    +  thermalModulation = FALSE,
    +  thermalData = FALSE,
    +  opts = simOptions(),
    +  timeStep = c("hourly", "daily", "weekly", "monthly", "annual"),
    +  simplify = TRUE,
    +  parallel = FALSE,
    +  showProgress = TRUE
    +)
    +
    + +
    +

    Arguments

    + + +
    areas
    +

    vector of areas names for which thermal time series must be read.

    + + +
    clusters
    +

    vector of clusters names for which thermal time series must be read.

    + + +
    thermalAvailabilities
    +

    if TRUE, return thermalAvailabilities data

    + + +
    thermalModulation
    +

    if TRUE, return thermalModulation data

    + + +
    thermalData
    +

    if TRUE, return thermalData from prepro

    + + +
    opts
    +

    list of simulation parameters returned by the function +setSimulationPath

    + + +
    timeStep
    +

    Resolution of the data to import: hourly (default), daily, +weekly, monthly or annual.

    + + +
    simplify
    +

    If TRUE and only one type of output is imported then a +data.table is returned. If FALSE, the result will always be a list of class +"antaresData".

    + + +
    parallel
    +

    Should the importation be parallelized ? (See details)

    + + +
    showProgress
    +

    If TRUE the function displays information about the progress of the +importation.

    + +
    +
    +

    Value

    +

    If thermalModulation or thermalData is TRUE, an object of class "antaresDataList" is returned. It is a list of +data.tables for selected input

    +

    Else the result is a data.table with class "antaresDataTable".

    +
    +
    +

    Note

    +

    the clusters parameter can also accept the special value "all". +It indicates the function to read the desired time series for all clusters.

    +
    + + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/readLayout.html b/dev/reference/readLayout.html new file mode 100644 index 00000000..98108d35 --- /dev/null +++ b/dev/reference/readLayout.html @@ -0,0 +1,144 @@ + +Read areas layout — readLayout • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    This function reads in the input files of an antares study the current areas +layout, ie. the position of the areas It may be useful for plotting the +network.

    +

    Be aware that the layout is read in the input files so they may have +changed since a simulation has been run.

    +
    + +
    +
    readLayout(opts = simOptions(), xyCompare = c("union", "intersect"))
    +
    + +
    +

    Arguments

    + + +
    opts
    +

    list of simulation parameters returned by the function +setSimulationPath

    + + +
    xyCompare
    +

    Use when passing multiple opts, can be "union" or "intersect".

    + +
    +
    +

    Value

    +

    A list with three elements:

    +
    areas:
    +

    A data.frame containing the name, the color and the coordinate +of each area

    + +
    district:
    +

    A data.frame containing the name, the color and the coordinate +of each district

    + +
    links:
    +

    A data.frame containing the name, the coordinates of the origin +and the destination of each link

    + + +

    By default, readLayout reads the layout for the current default +antares study. It is possible to specify another study with the parameter +opts. And we can pass multiple studies using a list of opts.

    +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +readLayout()
    +
    +# By default, the function reads layout for the default study,
    +# but it is possible to specify another study with parameter "opts"
    +sim1 <- setSimulationPath()
    +
    +#[... code that modifies the default antares study]
    +
    +readLayout(sim1)
    +
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/readOptimCriteria.html b/dev/reference/readOptimCriteria.html new file mode 100644 index 00000000..0253d387 --- /dev/null +++ b/dev/reference/readOptimCriteria.html @@ -0,0 +1,116 @@ + +Read Optimization Criteria — readOptimCriteria • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    This function can be used to read the value of the criteria optimized by ANTARES. +Notice that these values are only available in "Xpansion" mode or when option +"Export mps" is turned on.

    +
    + +
    +
    readOptimCriteria(opts = simOptions())
    +
    + +
    +

    Arguments

    + + +
    opts
    +

    list of simulation parameters returned by the function +setSimulationPath

    + +
    +
    +

    Value

    +

    A table of class antaresDataTable. It contains the usual columns +timeID, mcYear, time and two columns "criterion1" and +"criterion2" containing the values of the criteria. Time step can be daily +or weekly depending on the optimization options.

    +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +setSimulationPath()
    +
    +optimCriteria <- readOptimCriteria()
    +} # } 
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/removeVirtualAreas.html b/dev/reference/removeVirtualAreas.html new file mode 100644 index 00000000..653905b5 --- /dev/null +++ b/dev/reference/removeVirtualAreas.html @@ -0,0 +1,256 @@ + +Remove virtual areas — removeVirtualAreas • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    This function removes virtual areas from an antaresDataList object and +corrects the data for the real areas. The antaresDataList object +should contain area and link data to function correctly.

    +
    + +
    +
    removeVirtualAreas(
    +  x,
    +  storageFlexibility = NULL,
    +  production = NULL,
    +  reassignCosts = FALSE,
    +  newCols = TRUE,
    +  rowBal = TRUE,
    +  prodVars = getAlias("rmVA_production"),
    +  costsVars = c("OV. COST", "OP. COST", "CO2 EMIS.", "NP COST"),
    +  costsOn = c("both", "storageFlexibility", "production")
    +)
    +
    + +
    +

    Arguments

    + + +
    x
    +

    An object of class antaresDataList with at least components +areas and links.

    + + +
    storageFlexibility
    +

    A vector containing the names of the virtual +storage/flexibility areas. Can also be a named list. Names are columns +to add and elements the virtual areas to group.

    + + +
    production
    +

    A vector containing the names of the virtual production +areas.

    + + +
    reassignCosts
    +

    If TRUE, the production costs of the virtual areas are +reallocated to the real areas they are connected to. If the virtual areas +are connected to a virtual hub, their costs are first reallocated to the +hub and then the costs of the hub are reallocated to the real areas.

    + + +
    newCols
    +

    If TRUE, new columns containing the production of the virtual +areas are added. If FALSE their production is added to the production of +the real areas they are connected to.

    + + +
    rowBal
    +

    If TRUE, then BALANCE will be corrected by ROW. BAL: +BALANCE := BALANCE - "ROW. BAL"

    + + +
    prodVars
    +

    Virtual productions columns to add to real area. +Default to getAlias("rmVA_production")

    + + +
    costsVars
    +

    If parameter reassignCosts is TRUE, affected columns. +Default to OV. COST, OP. COST, CO2 EMIS. and NP COST

    + + +
    costsOn
    +

    If parameter reassignCosts is TRUE, then the costs of the +virtual areas are reassigned to the real areas they are connected to. +You can choose to reassigned production & storageFlexibility virtuals areas +("both", default), or only "production" or "storageFlexibility" virtuals areas

    + +
    +
    +

    Value

    +

    An antaresDataList object in which virtual areas have been removed and +data of the real has been corrected. See details for an explanation of the +corrections.

    +
    +
    +

    Details

    +

    Two types of virtual areas have been defined corresponding to different types +of modeling in Antares and different types of post-treatment to do:

    +
    • Flexibility/storage areas are areas created to model +pumping unit or any other flexibility that behave as a storage. For those +virtual areas, the important results are flows on the links.

    • +
    • Production areas are areas created to isolate some generation from +the "real" areas. They can be isolate for several reasons: to distinguish +time-series (for example wind onshore/offshore), to select some specific +unit to participate to day-ahead reserve, etc.

    • +

    removeVirtualAreas performs different corrections:

    +
    • Correct the balance of the real areas (and districts) by removing the flows +to or from virtual areas.

    • +
    • If parameter reassignCosts is TRUE, then the costs of the +virtual areas are reassigned to the real areas they are connected to. The +default affected columns are OV. COST, OP. COST, CO2 EMIS. +and NP COST. If a virtual area is connected to a single real area, +all its costs are attributed to the real area. If it is connected to +several real areas, then costs at a given time step are divided between +them proportionally to the flows between them and the virtual area. +An aggregation is done at the end to correct districts costs.

    • +
    • For each storage/flexibility area, a column named like the area is +created. It contains the values of the flow between the virtual area and +the real areas. This column is interpreted as a production of +electricity: it is positive if the flow from the virtual area to the real +area is positive and negative otherwise. If parameter newCols is +FALSE, the values are added to the variable PSP and the +columns is removed. +An aggregation is done at the end to add virtual storage/flexibility to districts.

    • +
    • If the parameter production is specified, then the non null +productions of the virtual areas are either added to the ones of the real +areas they are connected to if newCols = FALSE or put in new +columns if newCols = TRUE. In the second case the columns are +named *_virtual where "*" is a type of +production (wind, solar, nuclear, ...). Productions that are zero for +all virtual areas are omited. +If virtual production areas contains clusters then they will be move to the +real area. +An aggregation is done at the end to add virtual production to districts.

    • +
    • Finally, virtual areas and the links connected to them are removed +from the data.

    • +

    The functions makes a few assumptions about the network. If they are +violated it will not act correctly:

    +
    • storage/flexibility +areas can be connected to other storage/flexibility areas (hubs), but at +least one of them is connected to a real area. That means that there is +no group of virtual areas disconnected from the real network. If such a +group exists, you can either remove them manually or simply not import +them.

    • +
    • production areas are connected to one and only one real area. They +cannot be connected to virtual areas. But a real area may by connected to +several production areas.

    • +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +
    +# Assume we have a network with two virtual areas acting as pump storage and
    +# an area representing offshore production
    +#
    +#  offshore
    +#     |
    +# real area - psp in
    +#           \
    +#             psp out
    +#
    +
    +data <- readAntares(areas="all", links="all")
    +
    +# Remove pump storage virtual areas
    +
    +correctedData <- removeVirtualAreas(
    +    x = data, 
    +    storageFlexibility = c("psp in", "psp out"),
    +    production = "offshore"
    +)
    +                                    
    +correctedData_list <- removeVirtualAreas(
    +    x = data, 
    +    storageFlexibility = list(PSP = c("psp in", "psp out")),
    +    production = "offshore"
    +)
    + 
    +                                   
    +correctedData_details <- removeVirtualAreas(
    +    x = data, 
    +    storageFlexibility = list(PSP_IN = "psp in", PSP_OUT =  "psp out"),
    +    production = "offshore"
    +)
    +                                    
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/setAlias.html b/dev/reference/setAlias.html new file mode 100644 index 00000000..0e93522a --- /dev/null +++ b/dev/reference/setAlias.html @@ -0,0 +1,170 @@ + +show aliases for variables — showAliases • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    Aliases are short names that can be used in the select parameter in +function readAntares to tell the function which columns and/or +type of data to import.

    +

    setAlias can be used to create a new alias. It can be especially +useful for package developers to help their users select the data required +by their packages.

    +

    getAlias return character vector containing columns and/or types of data

    +

    showAliases lists available aliases

    +
    + +
    +
    showAliases(names = NULL)
    +
    +setAlias(name, desc, select)
    +
    +getAlias(name)
    +
    + +
    +

    Arguments

    + + +
    names
    +

    optional vector of alias names. If provided, the full list of +columns selected by these aliases is displayed. Else only the name and a +short description of all aliases is displayed.

    + + +
    name
    +

    Alias name

    + + +
    desc
    +

    Short description indicating why the new alias is interesting

    + + +
    select
    +

    character vector containing columns and/or types of data to +import.

    + +
    +
    +

    Value

    +

    setAlias is only used for its side effects. A data.frame with columns +'name', 'desc' and 'select'. showAliases invisibly returns a +data.frame with columns "name", "desc" and "select".

    +
    + +
    +

    Examples

    +
    
    +# Display the short description of an alias
    +showAliases()
    +#>              name                                                        desc
    +#> 1         economy      Production costs, prices, exchanges and spilled energy
    +#> 2        adequacy                                          Adequacy variables
    +#> 3      generation Production that can be controlled: thermal and hydrostorage
    +#> 4       renewable                                       Renewable productions
    +#> 5         thermal                                         Thermal productions
    +#> 6         netLoad                          Variables used to compute net load
    +#> 7 rmVA_production                     removeVirtualAreas production varaibles
    +#> 8          nostat    All variables except summary variable (MIN, MAX and STD)
    +
    +# Display the full description of an alias
    +showAliases("renewable")
    +#>        name                  desc
    +#> 4 renewable Renewable productions
    +#>                                                                                                                                                                                  select
    +#> 4 WIND, WIND OFFSHORE, WIND ONSHORE, SOLAR, SOLAR CONCRT., SOLAR PV, SOLAR ROOFT, RENW. 1, RENW. 2, RENW. 3, RENW. 4, H. ROR, H. STOR, MISC. DTG, MISC. DTG 2, MISC. DTG 3, MISC. DTG 4
    +
    +getAlias("renewable")
    +#>  [1] "WIND"          "WIND OFFSHORE" "WIND ONSHORE"  "SOLAR"        
    +#>  [5] "SOLAR CONCRT." "SOLAR PV"      "SOLAR ROOFT"   "RENW. 1"      
    +#>  [9] "RENW. 2"       "RENW. 3"       "RENW. 4"       "H. ROR"       
    +#> [13] "H. STOR"       "MISC. DTG"     "MISC. DTG 2"   "MISC. DTG 3"  
    +#> [17] "MISC. DTG 4"  
    +
    +if (FALSE) { # \dontrun{
    +# Create a new alias that imports flows
    +setAlias("test", "short description", c("links", "FLOW LIN.")) 
    +showAliases()
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/setHvdcAreas.html b/dev/reference/setHvdcAreas.html new file mode 100644 index 00000000..e73505ad --- /dev/null +++ b/dev/reference/setHvdcAreas.html @@ -0,0 +1,117 @@ + +Set hvdc areas — setHvdcAreas • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    This function add hvdc attribute

    +
    + +
    +
    setHvdcAreas(data, areas)
    +
    + +
    +

    Arguments

    + + +
    data
    +

    antaresData or antaresDatalist data.

    + + +
    areas
    +

    character hvdc areas list.

    + +
    +
    +

    Value

    +

    Object of class "antaresDataList" is returned. +It is a list of data.tables, each element representing one type of element (areas, links, clusters)

    +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +
    +library(antaresRead)
    +opts <- setSimulationPath('mypath', 1)
    +myAreaOutput <- readAntares(areas = "all", links = "all")
    +myAreaOutput <- setHvdcAreas(myAreaOutput, "y_dsr")
    +
    +
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/setRam.html b/dev/reference/setRam.html new file mode 100644 index 00000000..0c90cab6 --- /dev/null +++ b/dev/reference/setRam.html @@ -0,0 +1,107 @@ + +Specify RAM limit — setRam • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    This function specify RAM limit (in Go) of the value returned by readAntares.

    +
    + +
    +
    setRam(x)
    +
    + +
    +

    Arguments

    + + +
    x
    +

    numeric RAM limit in Go

    + +
    +
    +

    Value

    +

    list (returned by options())

    +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +#Set maximum ram to used to 50 Go
    +setRam(50)
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/setSimulationPath.html b/dev/reference/setSimulationPath.html new file mode 100644 index 00000000..3e08945e --- /dev/null +++ b/dev/reference/setSimulationPath.html @@ -0,0 +1,353 @@ + +Set Path to an Antares simulation — setSimulationPath • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    This function has to be used before the read functions. It sets the path to +the Antares simulation to work on and other useful options (list of areas, +links, areas with clusters, variables, etc.). On local disk with setSimulationPath or +on an AntaREST API with setSimulationPathAPI

    +
    + +
    +
    setSimulationPath(path, simulation = NULL)
    +
    +setSimulationPathAPI(
    +  host,
    +  study_id,
    +  token,
    +  simulation = NULL,
    +  timeout = 60,
    +  httr_config = list()
    +)
    +
    + +
    +

    Arguments

    + + +
    path
    +

    (optional) +Path to the simulation. It can either be the path to a directory containing +an antares project or directly to the directory containing the output of a +simulation. If missing, a window opens and lets the user choose the +directory of the simulation interactively. Can also choose .h5 file, if rhdf5 is installed.

    + + +
    simulation
    +

    (optional) Only used if "path" represents the path of a study and not of the +output of a simulation. It can be either the name of the simulation or a +number indicating which simulation to use. It is possible to use negative +values to select a simulation from the last one: for instance -1 will +select the most recent simulation, -2 will the penultimate one, etc. There +are two special values 0 and "input" that tells the function that the user +is not interested by the results of any simulation, but only by the inputs. +In such a case, the function readAntares is unavailable.

    + + +
    host
    +

    character host of AntaREST server API

    + + +
    study_id
    +

    character id of the target study on the API

    + + +
    token
    +

    character API personnal access token

    + + +
    timeout
    +

    numeric API timeout (seconds). Default to 60. See also setTimeoutAPI

    + + +
    httr_config
    +

    API httr configuration. See config

    + +
    +
    +

    Value

    +

    A list containing various information about the simulation, in particular:

    +
    studyPath
    +

    path of the Antares study

    + +
    simPath
    +

    path of the simulation

    + +
    inputPath
    +

    path of the input folder of the study

    + +
    studyName
    +

    Name of the study

    + +
    simDataPath
    +

    path of the folder containing the data of the simulation

    + +
    name
    +

    name of the simulation

    + +
    mode
    +

    type of simulation: economy, adequacy, draft or input

    + +
    synthesis
    +

    Are synthetic results available ?

    + +
    yearByYear
    +

    Are the results for each Monte Carlo simulation available ?

    + +
    scenarios
    +

    Are the Monte-Carlo scenarii stored in output ? This is +important to reconstruct some input time series that have been used in +each Monte-Carlo simulation.

    + +
    mcYears
    +

    Vector containing the number of the exported Monte-Carlo scenarios

    + +
    antaresVersion
    +

    Version of Antares used to run the simulation.

    + +
    areaList
    +

    Vector of the available areas.

    + +
    districtList
    +

    Vector of the available districts.

    + +
    linkList
    +

    Vector of the available links.

    + +
    areasWithClusters
    +

    Vector of areas containing clusters.

    + +
    areasWithResClusters
    +

    Vector of areas containing clusters renewable.

    + +
    areasWithSTClusters
    +

    Vector of areas containing clusters storage (>=v8.6.0).

    + +
    variables
    +

    Available variables for areas, districts and links.

    + +
    parameters
    +

    Other parameters of the simulation.

    + +
    binding
    +

    Table of time series dimensions for each group (>=v8.7.0).

    + +
    timeIdMin
    +

    Minimum time id of the simulation. It is generally equal to one but can +be higher if working on a subperiod.

    + +
    timeIdMax
    +

    maximum time id of the simulation.

    + +
    start
    +

    Date of the first day of the year in the simulation. This date corresponds +to timeId = 1.

    + +
    firstWeekday
    +

    First day of the week.

    + +
    districtsDef
    +

    data.table containing the specification of the districts.

    + +
    energyCosts
    +

    list containing the cost of spilled and unsupplied energy.

    + + +
    sleep
    +

    timer for api commande execute

    + +
    +
    +

    Details

    +

    The simulation chosen with setSimulationPath or setSimulationPathAPI becomes the default +simulation for all functions of the package. This behavior is fine when +working on only one simulation, but it may become problematic when working +on multiple simulations at same time.

    +

    In such case, you can store the object returned by the function in a variable +and pass this variable to the functions of the package (see examples).

    +
    + + +
    +

    Examples

    +
    
    +if (FALSE) { # \dontrun{
    +# Select interactively a study. It only works on windows.
    +
    +setSimulationPath()
    +
    +# Specify path of the study. Note: if there are more than one simulation
    +# output in the study, the function will asks the user to interactively choose
    +# one simulation.
    +
    +setSimulationPath("path_of_the_folder_of_the_study")
    +
    +# Select the first simulation of a study
    +
    +setSimulationPath("path_of_the_folder_of_the_study", 1)
    +
    +# Select the last simulation of a study
    +
    +setSimulationPath("path_of_the_folder_of_the_study", -1)
    +
    +# Select a simulation by name
    +
    +setSimulationPath("path_of_the_folder_of_the_study", "name of the simulation")
    +
    +# Just need to read input data
    +
    +setSimulationPath("path_of_the_folder_of_the_study", "input")
    +# or
    +setSimulationPath("path_of_the_folder_of_the_study", 0)
    +
    +# Working with API
    +#--------------------------
    +setSimulationPathAPI(
    +    host = "http://antares_api_adress", 
    +    study_id = "study_id_on_api", 
    +    token = "token"
    +)
    +
    +## Custom httr options ?
    +
    +# global using httr package
    +require(httr)
    +set_config(verbose())
    +setSimulationPathAPI(
    +    host = "http://antares_api_adress", 
    +    study_id = "study_id_on_api", 
    +    token = "token"
    +)
    +
    +reset_config()
    +
    +# or in setSimulationPathAPI
    +setSimulationPathAPI(
    +    host = "http://antares_api_adress", 
    +    study_id = "study_id_on_api", 
    +    token = "token",
    +    httr_config = config(verbose = TRUE)
    +)
    +
    +# disable ssl certificate checking ?
    +setSimulationPathAPI(
    +    host = "http://antares_api_adress", 
    +    study_id = "study_id_on_api", 
    +    token = "token",
    +    httr_config = config(ssl_verifypeer = FALSE)
    +)
    +
    +# WORKING WITH MULTIPLE SIMULATIONS
    +#----------------------------------
    +# Let us assume ten simulations have been run and we want to collect the
    +# variable "LOAD" for each area. We can create a list containing options
    +# for each simulation and iterate through this list.
    +
    +opts <- lapply(1:10, function(i) {
    +   setSimulationPath("path_of_the_folder_of_the_study", i)
    +})
    +
    +output <- lapply(opts, function(o) {
    +  res <- readAntares(areas = "all", select = "LOAD", timeStep = "monthly", opts = o)
    +  # Add a column "simulation" containing the name of the simulation
    +  res$simulation <- o$name
    +  res
    +})
    +
    +# Concatenate all the tables in one super table
    +output <- rbindlist(output)
    +
    +# Reshape output for easier comparisons: one line per timeId and one column
    +# per simulation
    +output <- dcast(output, timeId + areaId ~ simulation, value.var = "LOAD")
    +
    +output
    +
    +# Quick visualization
    +matplot(output[area == area[1], !c("area", "timeId"), with = FALSE], 
    +        type = "l")
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/setTimeoutAPI.html b/dev/reference/setTimeoutAPI.html new file mode 100644 index 00000000..c17eb799 --- /dev/null +++ b/dev/reference/setTimeoutAPI.html @@ -0,0 +1,112 @@ + +Change API Timeout — setTimeoutAPI • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    Change API Timeout

    +
    + +
    +
    setTimeoutAPI(opts, timeout)
    +
    + +
    +

    Arguments

    + + +
    opts
    +

    list of simulation parameters returned by the function +setSimulationPathAPI

    + + +
    timeout
    +

    numeric API timeout (seconds). Default to 60.

    + +
    +
    +

    Value

    +

    Object of class simOptions, list of options used to read the data contained in the last +simulation read by setTimeoutAPI.

    +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +opts <- setTimeoutAPI(opts, timeout = 45)
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/simOptions.html b/dev/reference/simOptions.html new file mode 100644 index 00000000..e7f54545 --- /dev/null +++ b/dev/reference/simOptions.html @@ -0,0 +1,136 @@ + +Extract simulation options — simOptions • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    The function readAntares stores in its output the options used +to read some data (path of the study, area list, link list, start date, +etc.).

    +
    + +
    +
    simOptions(x = NULL)
    +
    + +
    +

    Arguments

    + + +
    x
    +

    object of class antaresTable or antaresData

    + +
    +
    +

    Value

    +

    list of options used to read the data contained in an object or the last +simulation options read by setSimulationPath if x is +NULL

    +
    +
    +

    Details

    +

    simOptions extracts these options from an object of class +antaresTable or antaresOutput. It can be useful when working on +multiple simulations, either to check how some object has been created or to +use it in some functions like getAreas or +getLinks

    +

    If the parameter of the function is NULL, it returns the default +simulation options, that is the options set by setSimulationPath +the last time it was run.

    +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +  setSimulationPath(study1)
    +  
    +  simOptions() # returns the options for study 1
    +  
    +  data <- readAntares()
    +  
    +  # Choose a different study
    +  setSimulationPath(study2)
    +  
    +  simOptions() # returns the options for study 2
    +  
    +  getAreas() # returns the areas of the secund study
    +  getAreas(opts = simOptions(data)) # returns the areas of the first study
    +  
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/subset.antaresDataList.html b/dev/reference/subset.antaresDataList.html new file mode 100644 index 00000000..0f6cffea --- /dev/null +++ b/dev/reference/subset.antaresDataList.html @@ -0,0 +1,144 @@ + +Subset an antaresDataList — subset.antaresDataList • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    Subset method for antaresDataList.

    +
    + +
    +
    # S3 method for class 'antaresDataList'
    +subset(x, y = NULL, areas = NULL, timeIds = NULL, mcYears = NULL, ...)
    +
    + +
    +

    Arguments

    + + +
    x
    +

    Object of class antaresDataList created with +readAntares.

    + + +
    y
    +

    A table containing at least one of the columns "area", "timeId" or +"mcYear". If it is not NULL, then only tuples (area, timeId, + mcYear) present in this table are kept.

    + + +
    areas
    +

    Vector of area names to keep in the result. If NULL, all +areas are kept.

    + + +
    timeIds
    +

    Vector of time ids to keep. If NULL, all time ids are +kept.

    + + +
    mcYears
    +

    Vector of monte-carlo years to keep. If NULL, all time +ids are kept.

    + + +
    ...
    +

    Currently unused.

    + +
    +
    +

    Value

    +

    A filtered antaresDataList.

    +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +#keep only the first year
    +mydata <- readAntares(areas = "all", links = "all", mcYears = "all")
    +mySubset<-subset(mydata, mcYears = 1)
    +  
    +#keep only the first year for areas a and b 
    +mydata <- readAntares(areas = "all", links = "all", mcYears = "all")
    +mySubset<-subset(mydata, mcYears = 1, areas=c("a", "b")) 
    +
    +#' #keep only the first year for areas a and b and timeIds include in 5:16 
    +mydata <- readAntares(areas = "all", links = "all", mcYears = "all")
    +mySubset<-subset(mydata, mcYears = 1, areas=c("a", "b"), timeIds=5:16) 
    +  
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/summary.bindingConstraints.html b/dev/reference/summary.bindingConstraints.html new file mode 100644 index 00000000..5c314b6d --- /dev/null +++ b/dev/reference/summary.bindingConstraints.html @@ -0,0 +1,105 @@ + +Display equation of binding constraint — summary.bindingConstraints • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    [Deprecated] +This function cannot be used for a study >= 8.7.0

    +
    + +
    +
    # S3 method for class 'bindingConstraints'
    +summary(object, ...)
    +
    + +
    +

    Arguments

    + + +
    object
    +

    Object returned by readBindingConstraints

    + + +
    ...
    +

    Unused

    + +
    +
    +

    Value

    +

    A data.frame with one line per constraint.

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/viewAntares.html b/dev/reference/viewAntares.html new file mode 100644 index 00000000..8fca6318 --- /dev/null +++ b/dev/reference/viewAntares.html @@ -0,0 +1,119 @@ + +View the content of an antares output — viewAntares • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    This function displays each element of an antaresData object in a +spreadsheet-like viewer.

    +
    + +
    +
    viewAntares(x, ...)
    +
    + +
    +

    Arguments

    + + +
    x
    +

    An object of class antaresData, generated by the function +readAntares.

    + + +
    ...
    +

    Currently unused

    + +
    +
    +

    Value

    +

    Invisible NULL.

    +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    +setSimulationPath()
    +
    +areas <-readAntares()
    +viewAntares(areas)
    +
    +output <- studyAntares(areas="all", links = "all", clusters = "all")
    +viewAntares(output) # Opens three data viewers for each element of output
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/reference/writeDigest.html b/dev/reference/writeDigest.html new file mode 100644 index 00000000..0c7a6389 --- /dev/null +++ b/dev/reference/writeDigest.html @@ -0,0 +1,107 @@ + +Write digest file — writeDigest • antaresRead + + +
    +
    + + + +
    +
    + + +
    +

    Write digest file

    +
    + +
    +
    writeDigest(digest, opts = simOptions())
    +
    + +
    +

    Arguments

    + + +
    digest
    +

    list of 5 elements similar to what is returned by readDigestFile

    + + +
    opts
    +

    simulation options

    + +
    +
    +

    Value

    +

    updated digest +list of 5 tables (begin, areas, middle, links lin., links quad.)

    +
    +
    +

    See also

    + +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.1.0.

    +
    + +
    + + + + + + + + diff --git a/dev/sitemap.xml b/dev/sitemap.xml new file mode 100644 index 00000000..adde84b5 --- /dev/null +++ b/dev/sitemap.xml @@ -0,0 +1,50 @@ + +/LICENSE-text.html +/articles/antaresRead.html +/articles/index.html +/authors.html +/index.html +/news/index.html +/reference/API-methods.html +/reference/aggregatate_mc_all.html +/reference/antaresRead-package.html +/reference/as.antaresDataList.html +/reference/as.antaresDataTable.html +/reference/changeTimeStep.html +/reference/copyToClipboard.html +/reference/dot-writeIni.html +/reference/extractDataList.html +/reference/getAreas.html +/reference/getGeographicTrimming.html +/reference/getIdCols.html +/reference/getLinks.html +/reference/hvdcModification.html +/reference/index.html +/reference/mergeDigests.html +/reference/ponderateMcAggregation.html +/reference/read-ini.html +/reference/readAntares.html +/reference/readAntaresAreas.html +/reference/readAntaresClusters.html +/reference/readAntaresSTClusters.html +/reference/readBindingConstraints.html +/reference/readClusterDesc.html +/reference/readDigestFile.html +/reference/readInputRES.html +/reference/readInputTS.html +/reference/readInputThermal.html +/reference/readLayout.html +/reference/readOptimCriteria.html +/reference/removeVirtualAreas.html +/reference/setAlias.html +/reference/setHvdcAreas.html +/reference/setRam.html +/reference/setSimulationPath.html +/reference/setTimeoutAPI.html +/reference/simOptions.html +/reference/subset.antaresDataList.html +/reference/summary.bindingConstraints.html +/reference/viewAntares.html +/reference/writeDigest.html + +