initFlowBased: Initialization of the Antares flow-based study

View source: R/initFlowBased.R

initFlowBasedR Documentation

Initialization of the Antares flow-based study

Description

This function initializes the environment for a flow-based study. The study must be of Antares version equal or higher to 6.1.3 to enable binding constraints on thermal clusters.

  • It creates a folder containing the description of the typical flow-based days (files created with the function computeFB), the flow-based time-series consistent with the study inputs (calculated by the function createFBTS), a scenario playlist to combine the flow-based time-series and Antares scenario builder and information about the model and time of creation of the folder. This folder will then be used to run the simulation and afterwards by all the functions acting on the outputs (post-processing, plots ...). Be careful to keep the consistency between the model loaded by initFlowBased and the one used for running previous simulations.

  • It writes the 36 binding constraints representing the flow-based domains, with the weight files being the coefficients of the constraints and the second members converted into availability time series of virtual power plants (= the combination weights x links < thermal availability)

Usage

initFlowBased(
  fb_opts = fbAntares::fbOptions()$path,
  opts = antaresRead::simOptions(),
  scenarios = rep(1:200, times = 5),
  areaName = "cwe_at"
)

Arguments

fb_opts

list of flowbased parameters (flow-based model directory) returned by the function setFlowbasedPath. By default, the value is indicated by fbAntares::fbOptions()

opts

list of simulation parameters returned by the function setSimulationPath, Antares study. By default, the value is indicated by antaresRead::simOptions()

scenarios

numeric vector, it represents the flow-based scenarios builder. It will be written in the file scenario.txt and used by Antares to combine Antares time series (the scenarios builder) and the flow-based time series. By default, the value is rep(1:200, times = 5) (1000 mcYears, with 200 time series repeated 5 times)

areaName

character The name of the area of your study, possible values are cwe_at (default), cwe and other. If you choose other, you have to give a csv file which explains how your area work.

Note

The folder designed by by fb_opts is a flow-based model. It must include the following files :

  • domainesFB.RDS : RDS file created by computeFB, information on the conversion from real to modelled domain

  • second_member.txt : text file created by computeFB, representing the second members (or margins) in the constraints. It includes the following columns :

    • Id_day : numeric, from 1 to the number of typical days

    • Id_hour : numeric, from 1 to 24

    • vect_b : numeric, second member in MW

    • Name : character, name of the constraint, generally "FBnumber"

  • ts.txt: text file created by createFBTS, flow-based typical day time series with

    • First colum : dates, format : YYYY-MM-DD

    • First row : names of the time series, "number"

    • cells : numeric (typival day ID)

  • weigth.txt : text file representing the weights of the binding constraints. It includes the following columns :

    • Name : character, name of the contraints, matching the chosen name in the second member file

    • BE.FR : numeric coefficient on the link from Belgium to France, between -1 and 1

    • DE.FR : numeric coefficient on the link from Germany to France, between -1 and 1

    • DE.NL : numeric coefficient on the link from Germany to The Netherlands, between -1 and 1

    • BE.NL : numeric coefficient on the link from Belgium to The Netherlands, between -1 and 1

    • BE.DE : numeric coefficient on the link from Belgium to Germany, between -1 and 1

These files will be written in the Antares study (directory user'\'flowbased'\'), as well as additional files:

  • scenario.txt, flow-based scenario builder, including only one column entitled "scenarios". The row 2 will then match the MC year 1 in the Antares scenario builder

  • infos.ini Informations on the configured model.

    • date : Time of initialisation

    • model : name of the used model

Examples


## Not run: 

# Change the study path for the path of a study you have on your computer
 
 opts <- antaresRead::setSimulationPath(
 "../Etude Antares/BP19_costs18_FB18_2023_75FacesClusteringHeuresdePointePasEte/")
 path <- setFlowbasedPath(path = "../Résultats test 20 août/Test75FacesClusteringHeuresdePointePasEte/")
 initFlowBased(fb_opts = path$path, opts = opts, scenarios = rep(1:200, times = 5), 
 areaName = "cwe_at")
 
 
 
## End(Not run)
 
 

rte-antares-rpackage/fbAntares documentation built on June 1, 2022, 6:20 p.m.