diff --git a/.Rbuildignore b/.Rbuildignore index e92cac8e..63ee6338 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -4,3 +4,6 @@ ^\.Rproj\.user$ test_case/ ^\.travis\.yml$ +^_pkgdown\.yml$ +^docs$ +^pkgdown$ diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 00000000..4691d4e3 --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,5 @@ +destination: docs + +template: + params: + bootswatch: readable diff --git a/docs/404.html b/docs/404.html new file mode 100644 index 00000000..7085e02f --- /dev/null +++ b/docs/404.html @@ -0,0 +1,133 @@ + + + +
+ + + + +COPYRIGHT HOLDER: RTE Réseau de transport d’électricité ++ +
++ + +Edit an Antares study before running simulation. Methods are provided to create (and remove) area, links between them, thermal cluster and binding constraints. These steps maybe usefull before running an Antares simulation.
+
You need to set the path to an Antares simulation in “input” mode :
+ +Or you can simply create a new study :
+ +Before modifying your simulation, you can save it in an archive :
+ +This will create a .tar.gz
file in your simulation folder.
You can create a new area with :
+library("antaresEditObject")
+
+createArea(name = "myarea")
+
+# The new area should appear here :
+antaresRead::getAreas()
You can specify the localization of the area on the map, and also color.
+There are two helper function for area parameters :
+filteringOptions()
for filtering options, like filter-year-by-year
+nodalOptimizationOptions()
for nodal optimizations options.You can initialize a cluster with some parameters :
+createCluster(
+ area = "myarea",
+ cluster_name = "myareacluster",
+ group = "other",
+ unitcount = 1,
+ nominalcapacity = 8400,
+ `min-down-time` = 0,
+ `marginal-cost` = 0.010000,
+ `market-bid-cost` = 0.010000
+)
You can edit the settings of an existing cluster :
+ +createLink(
+ from = "area1",
+ to = "area2",
+ propertiesLink = propertiesLinkOptions(
+ hurdles_cost = FALSE,
+ transmission_capacities = "enabled"
+ ),
+ dataLink = NULL
+)
You can edit the settings of an existing link :
+ +For example, set the output of simulation year by year, and limit the number of Monte-Carlo years to 10 :
+ +You can remove from input folder areas, links, clusters and binding constraints with remove*
functions, e.g. :
First, update general settings to activate time series to generate :
+ +Then run TS-generator:
+ +backupStudy.Rd
Save an Antares Study or only inputs in a .tar.gz
file
backupStudy( + backupfile, + what = c("input", "study"), + opts = antaresRead::simOptions() +)+ +
backupfile | +Name of the backup, without extension. If missing,
+either the name of the study or 'input' according argument |
+
---|---|
what | +Which folder to save, |
+
opts | +List of simulation parameters returned by the function
+ |
+
The path of the backup
+ ++if (FALSE) { +backupStudy() +}
checkRemovedArea.Rd
Check if it remains trace of a deleted area in the input folder
+checkRemovedArea(area, all_files = TRUE, opts = antaresRead::simOptions())+ +
area | +An area |
+
---|---|
all_files | +Check files in study directory. |
+
opts | +List of simulation parameters returned by the function
+ |
+
a named list with two elements
+ ++if (FALSE) { +checkRemovedArea("myarea") +}
createArea.Rd
Create An Area In An Antares Study
+createArea( + name, + color = grDevices::rgb(230, 108, 44, max = 255), + localization = c(0, 0), + nodalOptimization = nodalOptimizationOptions(), + filtering = filteringOptions(), + overwrite = FALSE, + opts = antaresRead::simOptions() +)+ +
name | +Name of the area as a character, without punctuation except - and _. |
+
---|---|
color | +Color of the node |
+
localization | +Localization on the map |
+
nodalOptimization | +Nodal optimization parameters, see |
+
filtering | +Filtering parameters, see |
+
overwrite | +Overwrite the area if already exist. |
+
opts | +List of simulation parameters returned by the function
+ |
+
An updated list containing various information about the simulation.
+ ++if (FALSE) { + +library(antaresRead) + +# Set simulation path +setSimulationPath(path = "PATH/TO/SIMULATION", simulation = "input") + +# Create a new area +createArea("fictive_area") + +}
createBindingConstraint.Rd
Create a Binding Constraint
+createBindingConstraint( + name, + id = tolower(name), + values = NULL, + enabled = TRUE, + timeStep = c("hourly", "daily", "weekly"), + operator = c("both", "equal", "greater", "less"), + coefficients = NULL, + overwrite = FALSE, + opts = antaresRead::simOptions() +)+ +
name | +The name for the binding constraint |
+
---|---|
id | +An id |
+
values | +Values used by the constraint. +It contains one line per time step and three columns "less", "greater" and "equal". |
+
enabled | +Logical, is the constraint enabled ? |
+
timeStep | +Time step the constraint applies to : |
+
operator | +Type of constraint: equality, inequality on one side or both sides. |
+
coefficients | +A named vector containing the coefficients used by the constraint. |
+
overwrite | +If the constraint already exist, overwrite the previous value. |
+
opts | +List of simulation parameters returned by the function
+ |
+
An updated list containing various information about the simulation.
+ ++
createCluster.Rd
Create a thermal cluster
+createCluster( + area, + cluster_name, + ..., + time_series = NULL, + prepro_data = NULL, + prepro_modulation = NULL, + add_prefix = TRUE, + overwrite = FALSE, + opts = antaresRead::simOptions() +)+ +
area | +The area where to create the cluster. |
+
---|---|
cluster_name | +cluster name. |
+
... | +Parameters to write in the Ini file. Careful!
+Some parameters must be set as |
+
time_series | +the "ready-made" 8760-hour time-series available for simulation purposes. |
+
prepro_data | +Pre-process data, a |
+
prepro_modulation | +Pre-process modulation, a |
+
add_prefix | +If |
+
overwrite | +Logical, overwrite the cluster or not. |
+
opts | +List of simulation parameters returned by the function
+ |
+
An updated list containing various information about the simulation.
+ +createDSR.Rd
Create a Demand Side Response (DSR)
+createDSR( + areasAndDSRParam = NULL, + spinning = 2, + overwrite = FALSE, + opts = antaresRead::simOptions() +) + +getCapacityDSR(area = NULL, opts = antaresRead::simOptions()) + +editDSR( + area = NULL, + unit = NULL, + nominalCapacity = NULL, + marginalCost = NULL, + spinning = NULL, + opts = antaresRead::simOptions() +)+ +
areasAndDSRParam | +A data.frame with 4 columns |
+
---|---|
spinning | +DSR spinning |
+
overwrite | +Overwrite the DSR plant if already exist. +This will overwrite the previous area and links. |
+
opts | +List of simulation parameters returned by the function
+ |
+
area | +an area where to edit the DSR |
+
unit | +DSR unit number |
+
nominalCapacity | +DSR nominalCapacity |
+
marginalCost | +DSR marginalCost |
+
createDSR()
and editDSR()
returns an updated list containing various information about the simulation.
getCapacityDSR()
returns DSR capacity (unit * nominalCapacity of virtual cluster) of the area
createDistrict.Rd
Allows selecting a set of areas so as to bundle them together in a "district".
+createDistrict( + name, + caption = NULL, + comments = NULL, + apply_filter = "none", + add_area = NULL, + remove_area = NULL, + output = FALSE, + overwrite = FALSE, + opts = antaresRead::simOptions() +)+ +
name | +District's name. |
+
---|---|
caption | +Caption for the district. |
+
comments | +Comments for the district. |
+
apply_filter | +Possible values are |
+
add_area | +Character vector of area(s) to add to the district. |
+
remove_area | +Character vector of area(s) to remove from the district. |
+
output | +Logical, compute the results for the district or not? |
+
overwrite | +Logical, should the district be overwritten if already exist? |
+
opts | +List of simulation parameters returned by the function
+ |
+
An updated list containing various information about the simulation.
+ ++if (FALSE) { +createDistrict(name = "mydistrict", + apply_filter = "add-all", + remove_area = c("fr", "be")) +}
createLink.Rd
Create a link between two areas
+createLink( + from, + to, + propertiesLink = propertiesLinkOptions(), + dataLink = NULL, + overwrite = FALSE, + opts = antaresRead::simOptions() +)+ +
from | +The first area from which to create a link |
+
---|---|
to | +The second one |
+
propertiesLink | +a named list containing the link properties, e.g. hurdles-cost
+or transmission-capacities for example. See |
+
dataLink | +For Antares v7, a matrix with eight column corresponding to : trans. capacity (direct)
+trans. capacity (indirect), hurdles cost (direct), hurdles cost (indirect), impedances, loop flow,
+PST min, PST max.
+If |
+
overwrite | +Logical, overwrite the previous between the two areas if exist |
+
opts | +List of simulation parameters returned by the function
+ |
+
An updated list containing various information about the simulation.
+The eight times-series are:
NTC direct : the upstream-to-downstream capacity, in MW
NTC indirect : the downstream-to-upstream capacity, in MW
Hurdle cost direct : an upstream-to-downstream transmission fee, in euro/MWh
Hurdle cost indirect : a downstream-to-upstream transmission fee, in euro/MWh
Impedances : virtual impedances that are used in economy simulations to give a + physical meaning to raw outputs, when no binding constraints have been defined to enforce Kirchhoff's laws.
Loop flow : amount of power flowing circularly though the grid when all + “nodes” are perfectly balanced (no import and no export).
PST min : lower bound of phase-shifting that can be reached by a PST installed on the link, if any.
PST max : upper bound of phase-shifting that can be reached by a PST installed on the link, if any.
NB: For Antares v7 the eight columns must conform to above order. For Antares v6, only five columns are +expected, and they must follow this other order: NTC direct, NTC indirect, Impedances, Hurdle cost direct, +Hurdle cost indirect.
+In Antares, areas are sorted in alphabetical order to establish links between.
+For example, link between "fr" and "be" will appear under "be".
+So the areas are sorted before creating the link between them, and dataLink
is
+rearranged to match the new order.
+if (FALSE) { + +library(antaresRead) + +# Set simulation path +setSimulationPath(path = "PATH/TO/SIMULATION", simulation = "input") + +# Create a link between two areas +createLink(from = "first_area", to = "second_area") + +}
createPSP.Rd
Create a Pumped Storage Power plant (PSP)
+createPSP( + areasAndCapacities = NULL, + namePumping = "Psp_In", + nameTurbining = "Psp_Out", + hurdleCost = 5e-04, + timeStepBindConstraint = "weekly", + efficiency = NULL, + overwrite = FALSE, + opts = antaresRead::simOptions() +) + +getCapacityPSP( + area = NULL, + nameTurbining = "Psp_Out", + timeStepBindConstraint = "weekly", + opts = antaresRead::simOptions() +) + +editPSP( + area = NULL, + capacity = NULL, + namePumping = "Psp_In", + nameTurbining = "Psp_Out", + timeStepBindConstraint = "weekly", + hurdleCost = 5e-04, + opts = antaresRead::simOptions() +)+ +
areasAndCapacities | +A data.frame with 2 columns |
+
---|---|
namePumping | +The name of the pumping area |
+
nameTurbining | +The name of the turbining area |
+
hurdleCost | +The cost of the PSP |
+
timeStepBindConstraint | +Time step for the binding constraint : |
+
efficiency | +The efficiency of the PSP |
+
overwrite | +Overwrite the Pumped Storage Power plant if already exist. +This will overwrite the previous area and links. |
+
opts | +List of simulation parameters returned by the function
+ |
+
area | +an area name |
+
capacity | +PSP capacity for the area |
+
createPSP()
and editPSP()
returns an updated list containing various information about the simulation.
getCapacityPSP()
returns PSP capacity of the area
+if (FALSE) { + +library(antaresEditObject) +path<-pathToYourStudy +opts<-setSimulationPath(path, simulation = "input") +pspData<-data.frame(area=c("a", "b"), installedCapacity=c(800,900)) + +createPSP(pspData, efficiency = 0.8) + +createPSP(pspData, efficiency = 0.66, overwrite = TRUE) +createPSP(pspData, efficiency = 0.98, timeStepBindConstraint = "daily") +getAreas() + +} + +if (FALSE) { + +getCapacityPSP("a") +editPSP("a", capacity = 8000, hurdleCost = 0.1) +getCapacityPSP("a") + +areaName<-"suisse" +createArea(areaName, overwrite = TRUE) +pspData<-data.frame(area=c(areaName), installedCapacity=c(9856)) +createPSP(pspData, efficiency = 0.5, overwrite = TRUE, timeStepBindConstraint = "daily") + +getCapacityPSP(areaName, timeStepBindConstraint = "daily") + + +}
createStudy.Rd
Create an empty Antares study
+createStudy(path, study_name = "my_study", antares_version = "7.0.0")+ +
path | +Path where to create study, it should be an empty directory, +if it doesn't exist, it'll be created. |
+
---|---|
study_name | +Name of the study. |
+
antares_version | +Antares number version. |
+
logical vector indicating success or failure
+ ++if (FALSE) { + +createStudy("path/to/simulation") + +}
updateGeneralSettings
and actual Antares parameters. — dicoGeneralSettings • antaresEditObjectupdateGeneralSettings
and actual Antares parameters.dicoGeneralSettings.Rd
Correspondence between arguments of updateGeneralSettings
and actual Antares parameters.
dicoGeneralSettings(arg)+ +
arg | +An argument from function |
+
---|
The corresponding Antares general parameter.
+ ++dicoGeneralSettings("year.by.year") # "year-by-year"#> [1] "year-by-year"
updateOptimizationSettings
and actual Antares parameters. — dicoOptimizationSettings • antaresEditObjectupdateOptimizationSettings
and actual Antares parameters.dicoOptimizationSettings.Rd
Correspondence between arguments of updateOptimizationSettings
and actual Antares parameters.
dicoOptimizationSettings(arg)+ +
arg | +An argument from function |
+
---|
The corresponding Antares general parameter.
+ ++#> [1] "year-by-year"
editCluster.Rd
Edit an existing cluster
+editCluster( + area, + cluster_name, + ..., + time_series = NULL, + prepro_data = NULL, + prepro_modulation = NULL, + add_prefix = TRUE, + opts = antaresRead::simOptions() +)+ +
area | +The area where the cluster is. |
+
---|---|
cluster_name | +cluster name. |
+
... | +Parameters to write in the Ini file. |
+
time_series | +the "ready-made" 8760-hour time-series available for simulation purposes. |
+
prepro_data | +Pre-process data, a |
+
prepro_modulation | +Pre-process modulation, a |
+
add_prefix | +If |
+
opts | +List of simulation parameters returned by the function
+ |
+
An updated list containing various information about the simulation.
+ ++if (FALSE) { + +# Update only nominalCapacity for an existing cluster +editCluster(area = "myarea", cluster_name = "mycluster", nominalcapacity = 10600.000) + +}
editLink.Rd
Edit a link between two areas
+editLink( + from, + to, + hurdles_cost = NULL, + transmission_capacities = NULL, + asset_type = NULL, + display_comments = NULL, + filter_synthesis = NULL, + filter_year_by_year = NULL, + dataLink = NULL, + opts = antaresRead::simOptions() +)+ +
from | +The first area from which to create a link |
+
---|---|
to | +The second one |
+
hurdles_cost | +Logical, which is used to state whether (linear) +transmission fees should be taken into account or not in economy and adequacy simulations |
+
transmission_capacities | +Character, one of |
+
asset_type | +Character, one of |
+
display_comments | +Logical |
+
filter_synthesis | +Output synthesis |
+
filter_year_by_year | +Output year-by-year |
+
dataLink | +For Antares v7, a matrix with eight column corresponding to : trans. capacity (direct)
+trans. capacity (indirect), hurdles cost (direct), hurdles cost (indirect), impedances, loop flow,
+PST min, PST max.
+If |
+
opts | +List of simulation parameters returned by the function
+ |
+
An updated list containing various information about the simulation.
+The eight times-series are:
"NTC direct"the upstream-to-downstream capacity, in MW
"NTC indirect"the downstream-to-upstream capacity, in MW
"Hurdle cost direct"an upstream-to-downstream transmission fee, in euro/MWh
"Hurdle cost indirect"a downstream-to-upstream transmission fee, in euro/MWh
"Impedances"virtual impedances that are used in economy simulations to give a physical meaning to raw outputs, when no binding constraints have been defined to enforce Kirchhoff's laws.
"Loop flow"amount of power flowing circularly though the grid when all “nodes” are perfectly balanced (no import and no export).
"PST min"lower bound of phase-shifting that can be reached by a PST installed on the link, if any.
"PST max"upper bound of phase-shifting that can be reached by a PST installed on the link, if any.
NB: For Antares v7 the eight columns must conform to above order. For Antares v6, only five columns are +expected, and they must follow this other order: NTC direct, NTC indirect, Impedances, Hurdle cost direct, +Hurdle cost indirect.
+In Antares, areas are sorted in alphabetical order to establish links between.
+For example, link between "fr" and "be" will appear under "be".
+So the areas are sorted before creating the link between them, and dataLink
is
+rearranged to match the new order.
+if (FALSE) { +editLink( + from = "area1", + to = "area2", + transmission_capacities = "infinite" +) +}
filteringOptions.Rd
Output profile options for creating an area
+filteringOptions( + filter_synthesis = c("hourly", "daily", "weekly", "monthly", "annual"), + filter_year_by_year = c("hourly", "daily", "weekly", "monthly", "annual") +)+ +
filter_synthesis | +Output synthesis |
+
---|---|
filter_year_by_year | +Output Year-by-year |
+
a named list
+ ++filteringOptions()#> $`filter-synthesis` +#> [1] "hourly" "daily" "weekly" "monthly" "annual" +#> +#> $`filter-year-by-year` +#> [1] "hourly" "daily" "weekly" "monthly" "annual" +#>
getPlaylist.Rd
getPlaylist
gives the identifier of the MC years which
+will be simulated in the Antares study, taking into account the potential use of a
+playlist which can skip some MC years
getPlaylist(opts = antaresRead::simOptions())+ +
opts | +list of simulation parameters returned by the function
+ |
+
---|
Returns a vector of the identifier of the simulated MC year
+ +
+ All functions+ + |
+ |
---|---|
+ + | +Create a backup with an Antares Study |
+
+ + | +Seek for a removed area |
+
+ + | +Create An Area In An Antares Study |
+
+ + | +Create a Binding Constraint |
+
+ + | +Create a thermal cluster |
+
+ + | +Create a district |
+
+ + | +Create a Demand Side Response (DSR) |
+
+ + | +Create a link between two areas |
+
+ + | +Create a Pumped Storage Power plant (PSP) |
+
+ + | +Create an empty Antares study |
+
+ + | +Correspondence between arguments of |
+
+ + | +Correspondence between arguments of |
+
+ + | +Edit an existing cluster |
+
+ + | +Edit a link between two areas |
+
+ + | +Output profile options for creating an area |
+
+ + | +Get the playlist of an Antares study |
+
+ + | +Is study an Antares v7 study ? |
+
+ + | +Nodal optimization parameters for creating an area |
+
+ + | +Properties for creating a link |
+
+ + | +Read a INI file |
+
+ + | +Remove An Area From inputs |
+
+ + | +Remove a Binding Constraint |
+
+ + | +Remove a cluster |
+
+ + | +Remove a link between two ares |
+
+ + | +Run an Antares Simulation |
+
+ + | +Run Time-Series Generator |
+
+
|
+ Read, create & update scenario builder |
+
+ + | +Set the playlist of an Antares Study |
+
+ + | +Set path to Antares Solver |
+
+ + | +Update general parameters of an Antares study |
+
+ + | +Update input parameters of an Antares study |
+
+ + | +Update optimization parameters of an Antares study |
+
+ + | +Update output parameters of an Antares study |
+
+ + | +Write ini file from list obtain by antaresRead:::readIniFile and modify by user |
+
+ + | +Write input time series |
+
+ + | +Write prepro data |
+
+ + | +Write water values |
+
is_antares_v7.Rd
Is study an Antares v7 study ?
+is_antares_v7(opts = antaresRead::simOptions())+ +
opts | +List of simulation parameters returned by the function
+ |
+
---|
a logical, TRUE
if study is v7 or above, FALSE
otherwise
++if (FALSE) { +# setSimulationPath + +is_antares_v7() + +}
nodalOptimizationOptions.Rd
Nodal optimization parameters for creating an area
+nodalOptimizationOptions( + non_dispatchable_power = TRUE, + dispatchable_hydro_power = TRUE, + other_dispatchable_power = TRUE, + spread_unsupplied_energy_cost = 0, + spread_spilled_energy_cost = 0 +)+ +
non_dispatchable_power | +logical, default to FALSE |
+
---|---|
dispatchable_hydro_power | +logical, default to FALSE |
+
other_dispatchable_power | +logical, default to FALSE |
+
spread_unsupplied_energy_cost | +numeric, default to 0 |
+
spread_spilled_energy_cost | +numeric, default to 0 |
+
a named list
+ ++nodalOptimizationOptions()#> $`non-dispatchable-power` +#> [1] TRUE +#> +#> $`dispatchable-hydro-power` +#> [1] TRUE +#> +#> $`other-dispatchable-power` +#> [1] TRUE +#> +#> $`spread-unsupplied-energy-cost` +#> [1] 0 +#> +#> $`spread-spilled-energy-cost` +#> [1] 0 +#>
propertiesLinkOptions.Rd
Properties for creating a link
+propertiesLinkOptions( + hurdles_cost = FALSE, + transmission_capacities = "enabled", + asset_type = "ac", + display_comments = TRUE, + filter_synthesis = c("hourly", "daily", "weekly", "monthly", "annual"), + filter_year_by_year = c("hourly", "daily", "weekly", "monthly", "annual") +)+ +
hurdles_cost | +Logical, which is used to state whether (linear) +transmission fees should be taken into account or not in economy and adequacy simulations |
+
---|---|
transmission_capacities | +Character, one of |
+
asset_type | +Character, one of |
+
display_comments | +Logical |
+
filter_synthesis | +Output synthesis |
+
filter_year_by_year | +Output year-by-year |
+
A named list
+ ++if (FALSE) { +propertiesLinkOptions() +}
readIniFile.Rd
Read a INI file
+readIniFile(file, stringsAsFactors = FALSE)+ +
file | +file path. |
+
---|---|
stringsAsFactors | +logical: should character vectors be converted to factors? |
+
A list with an element for each section of the .ini file.
+ +removeArea.Rd
Remove An Area From inputs
+removeArea(name, opts = antaresRead::simOptions())+ +
name | +An area name |
+
---|---|
opts | +List of simulation parameters returned by the function
+ |
+
An updated list containing various information about the simulation.
+ ++if (FALSE) { +removeArea("fictive_area") +}
removeBindingConstraint.Rd
Remove a Binding Constraint
+removeBindingConstraint(name, opts = antaresRead::simOptions())+ +
name | +Name(s) of the binding constraint(s) to remove. |
+
---|---|
opts | +List of simulation parameters returned by the function
+ |
+
An updated list containing various information about the simulation.
+ ++if (FALSE) { +removeBindingConstraint("mybindingconstraint") +}
removeCluster.Rd
Remove a cluster
+removeCluster( + area, + cluster_name, + add_prefix = TRUE, + opts = antaresRead::simOptions() +)+ +
area | +Area from which to remove a cluster. |
+
---|---|
cluster_name | +Cluster to remove. |
+
add_prefix | +If |
+
opts | +List of simulation parameters returned by the function
+ |
+
An updated list containing various information about the simulation.
+ ++if (FALSE) { +createCluster(area = "fr", cluster_name = "fr_gas", + group = "other", `marginal-cost` = 50) + +removeCluster(area = "fr", cluster_name = "fr_gas") + +}
removeLink.Rd
Remove a link between two ares
+removeLink(from, to, opts = antaresRead::simOptions())+ +
from | +The first area from which to create a link |
+
---|---|
to | +The second one |
+
opts | +List of simulation parameters returned by the function
+ |
+
An updated list containing various information about the simulation.
+ ++if (FALSE) { +createLink(from = "myarea", to = "myarea2") +removeLink(from = "myarea", to = "myarea2") +}
runSimulation.Rd
run_simulation
is a function which runs an ANTARES study
+in economic mode
runSimulation( + name, + mode = "economy", + path_solver = getOption("antares.solver"), + wait = TRUE, + show_output_on_console = FALSE, + parallel = TRUE, + opts = antaresRead::simOptions() +)+ +
name | +Name of the simulation. |
+
---|---|
mode | +Simulation mode, can take value "economy", "adequacy" or "draft". |
+
path_solver | +Character containing the Antares Solver path |
+
wait | +Logical, indicating whether the R interpreter should wait for the +simulation to finish, or run it asynchronously. |
+
show_output_on_console | +Logical, indicating whether to capture the ANTARES log and show +it on the R console. |
+
parallel | +Logical. If |
+
opts | +List of simulation parameters returned by the function
+ |
+
The function does not return anything. It is used to launch an +ANTARES simulation
+ +runTsGenerator.Rd
Run Time-Series Generator
+runTsGenerator( + path_solver = getOption("antares.solver"), + wait = TRUE, + show_output_on_console = FALSE, + opts = antaresRead::simOptions() +)+ +
path_solver | +Character containing the Antares Solver path. |
+
---|---|
wait | +Logical, indicating whether the R interpreter should wait for the +simulation to finish, or run it asynchronously. |
+
show_output_on_console | +Logical, indicating whether to capture the ANTARES log and show +it on the R console. |
+
opts | +List of simulation parameters returned by the function
+ |
+
+if (FALSE) { +library(antaresRead) +setSimulationPath(path = "path/to/study") + +library(antaresEditObject) +runTsGenerator( + path_solver = "path/to/antares-6.0-solver.exe", + show_output_on_console = TRUE +) +}
scenario-builder.Rd
Read, create & update scenario builder
+scenarioBuilder( + n_scenario, + n_mc = NULL, + areas = NULL, + areas_rand = NULL, + opts = antaresRead::simOptions() +) + +readScenarioBuilder( + ruleset = "Default Ruleset", + as_matrix = TRUE, + opts = antaresRead::simOptions() +) + +updateScenarioBuilder( + ldata, + ruleset = "Default Ruleset", + series = NULL, + opts = antaresRead::simOptions() +)+ +
n_scenario | +Number of scenario. |
+
---|---|
n_mc | +Number of Monte-Carlo years. |
+
areas | +Areas to use in scenario builder, if |
+
areas_rand | +Areas for which to use |
+
opts | +List of simulation parameters returned by the function
+ |
+
ruleset | +Ruleset to read. |
+
as_matrix | +If |
+
ldata | +A |
+
series | +Name(s) of the serie(s) to update if |
+
scenarioBuilder
: a matrix
readScenarioBuilder
: a list
of matrix
or list
+if (FALSE) { + +library(antaresRead) +library(antaresEditObject) + +# simulation path +setSimulationPath( + path = "pat/to/simulation", + simulation = "input" +) + +# Create a scenario builder matrix +sbuilder <- scenarioBuilder( + n_scenario = 51, + n_mc = 2040, + areas_rand = c("fr", "be") +) +sbuilder[, 1:6] +dim(sbuilder) + + +# Read previous scenario builder +# in a matrix format +prev_sb <- readScenarioBuilder() + + +# Update scenario builder + +# for load serie +updateScenarioBuilder(ldata = sbuilder, series = "load") + +# equivalent as +updateScenarioBuilder(ldata = list(l = sbuilder)) + + +# update several series + +# same input +sbuilder +updateScenarioBuilder( + ldata = sbuilder, + series = c("load", "hydro", "solar") +) + +# different input +updateScenarioBuilder(ldata = list( + l = load_sb, + h = hydro_sb, + s = solar_sb +)) + +}
setPlaylist.Rd
set_playlist
is a function which modifies the input file of an ANTARES
+study and set the playlist in order to simulate only the MC years given in input
setPlaylist(playlist, opts = antaresRead::simOptions())+ +
playlist | +vector of MC years identifier to be simulated |
+
---|---|
opts | +list of simulation parameters returned by the function
+ |
+
The function does not return anything. It is used to modify the input of an +Antares study
+ +setSolverPath.Rd
Set path to Antares Solver
+setSolverPath(path)+ +
path | +(optional) Path to the solver (e.g. |
+
---|
++if (FALSE) { + +setSolverPath(path = "C:/antares/bin/antares-6.0-solver.exe") + +}
updateGeneralSettings.Rd
Update general parameters of an Antares study
+updateGeneralSettings( + mode = NULL, + horizon = NULL, + nbyears = NULL, + simulation.start = NULL, + simulation.end = NULL, + january.1st = NULL, + first.month.in.year = NULL, + first.weekday = NULL, + leapyear = NULL, + year.by.year = NULL, + derated = NULL, + custom.ts.numbers = NULL, + user.playlist = NULL, + filtering = NULL, + active.rules.scenario = NULL, + generate = NULL, + nbtimeseriesload = NULL, + nbtimeserieshydro = NULL, + nbtimeserieswind = NULL, + nbtimeseriesthermal = NULL, + nbtimeseriessolar = NULL, + refreshtimeseries = NULL, + intra.modal = NULL, + inter.modal = NULL, + refreshintervalload = NULL, + refreshintervalhydro = NULL, + refreshintervalwind = NULL, + refreshintervalthermal = NULL, + refreshintervalsolar = NULL, + readonly = NULL, + opts = antaresRead::simOptions() +)+ +
mode | +Economy, Adequacy, Draft. |
+
---|---|
horizon | +Reference year (static tag, not used in the calculations) |
+
nbyears | +Number of Monte-Carlo years that should be prepared for the simulation (not always the same as the Number of MC years actually simulated, see 'selection mode' below). |
+
simulation.start | +First day of the simulation (e.g. 8 for a simulation beginning on the second week of the first month of the year) |
+
simulation.end | +Last day of the simulation (e.g. 28 for a simulation ending on the fourth week of the first month of the year) |
+
january.1st | +First day of the year (Mon, Tue, etc.). |
+
first.month.in.year | +Actual month by which the Time-series begin (Jan to Dec, Oct to Sep, etc.) |
+
first.weekday | +In economy or adequacy simulations, indicates the frame (Mon- Sun, Sat-Fri, etc.) to use for the edition of weekly results. |
+
leapyear | +(TRUE/FALSE) indicates whether February has 28 or 29 days. |
+
year.by.year | +(False) No individual results will be printed out, +(True) For each simulated year, detailed results will be +printed out in an individual directory7 : + Study_name/OUTPUT/simu_tag/Economy /mc-i-number |
+
derated | +See Antares General Reference Guide. |
+
custom.ts.numbers | +See Antares General Reference Guide. |
+
user.playlist | +See Antares General Reference Guide. |
+
filtering | +See Antares General Reference Guide. |
+
active.rules.scenario | +See Antares General Reference Guide. |
+
generate | +See Antares General Reference Guide. |
+
nbtimeseriesload | +See Antares General Reference Guide. |
+
nbtimeserieshydro | +See Antares General Reference Guide. |
+
nbtimeserieswind | +See Antares General Reference Guide. |
+
nbtimeseriesthermal | +See Antares General Reference Guide. |
+
nbtimeseriessolar | +See Antares General Reference Guide. |
+
refreshtimeseries | +See Antares General Reference Guide. |
+
intra.modal | +See Antares General Reference Guide. |
+
inter.modal | +See Antares General Reference Guide. |
+
refreshintervalload | +See Antares General Reference Guide. |
+
refreshintervalhydro | +See Antares General Reference Guide. |
+
refreshintervalwind | +See Antares General Reference Guide. |
+
refreshintervalthermal | +See Antares General Reference Guide. |
+
refreshintervalsolar | +See Antares General Reference Guide. |
+
readonly | +See Antares General Reference Guide. |
+
opts | +List of simulation parameters returned by the function
+ |
+
An updated list containing various information about the simulation.
+ +updateInputSettings.Rd
Update input parameters of an Antares study
+updateInputSettings(import, opts = antaresRead::simOptions())+ +
import | +Series to import. |
+
---|---|
opts | +List of simulation parameters returned by the function
+ |
+
An updated list containing various information about the simulation.
+ ++
updateOptimizationSettings.Rd
Update optimization parameters of an Antares study
+updateOptimizationSettings( + simplex.range = NULL, + transmission.capacities = NULL, + include.constraints = NULL, + include.hurdlecosts = NULL, + include.tc.min.stable.power = NULL, + include.tc.min.up.down.time = NULL, + include.dayahead = NULL, + include.strategicreserve = NULL, + include.spinningreserve = NULL, + include.primaryreserve = NULL, + include.exportmps = NULL, + power.fluctuations = NULL, + shedding.strategy = NULL, + shedding.policy = NULL, + unit.commitment.mode = NULL, + number.of.cores.mode = NULL, + day.ahead.reserve.management = NULL, + opts = antaresRead::simOptions() +)+ +
simplex.range | +week or day |
+
---|---|
transmission.capacities | +true, false or infinite |
+
include.constraints | +true or false |
+
include.hurdlecosts | +true or false |
+
include.tc.min.stable.power | +true or false |
+
include.tc.min.up.down.time | +true or false |
+
include.dayahead | +true or false |
+
include.strategicreserve | +true or false |
+
include.spinningreserve | +true or false |
+
include.primaryreserve | +true or false |
+
include.exportmps | +true or false |
+
power.fluctuations | +free modulations, minimize excursions or minimize ramping |
+
shedding.strategy | +share margins |
+
shedding.policy | +shave peaks or minimize duration |
+
unit.commitment.mode | +fast or accurate |
+
number.of.cores.mode | +minimum, low, medium, high or maximum |
+
day.ahead.reserve.management | +global |
+
opts | +List of simulation parameters returned by the function
+ |
+
An updated list containing various information about the simulation options.
+ +updateOutputSettings.Rd
Update output parameters of an Antares study
+updateOutputSettings( + synthesis = NULL, + storenewset = NULL, + archives = NULL, + opts = antaresRead::simOptions() +)+ +
synthesis | +Logical. If TRUE, synthetic results will be stored in a +directory Study_name/OUTPUT/simu_tag/Economy/mc-all. If FALSE, No general +synthesis will be printed out. |
+
---|---|
storenewset | +Logical. See Antares General Reference Guide. |
+
archives | +Character vector. Series to archive. |
+
opts | +List of simulation parameters returned by the function
+ |
+
An updated list containing various information about the simulation.
+ ++if (FALSE) { + +updateOutputSettings(synthesis = TRUE, storenewset = FALSE, + archives = c("load", "wind")) + +}
writeIni.Rd
Write ini file from list obtain by antaresRead:::readIniFile and modify by user
+writeIni(listData, pathIni, overwrite = FALSE)+ +
listData | +
|
+
---|---|
pathIni | +
|
+
overwrite | +logical, should file be overwritten if already exist? |
+
++if (FALSE) { +pathIni <- "D:/exemple_test/settings/generaldata.ini" +generalSetting <- antaresRead:::readIniFile(pathIni) +generalSetting$output$synthesis <- FALSE +writeIni(generalSetting, pathIni) +}
writeInputTS.Rd
This function writes input time series in an Antares project.
+writeInputTS( + area, + type = c("load", "thermal", "hydro", "wind", "solar"), + data, + overwrite = TRUE, + opts = antaresRead::simOptions() +)+ +
area | +The area where to write the input time series. |
+
---|---|
type | +Serie to write: |
+
data | +A 8760*N matrix of hourly time series. |
+
overwrite | +Logical. Overwrite the values if a file already exists. |
+
opts | +List of simulation parameters returned by the function
+ |
+
+
writeSeriesPrepro.Rd
This function allows to write load, wind and solar prepro data. Using
+character(0)
allows to erase data (cf Examples).
writeSeriesPrepro( + area, + type = c("load", "wind", "solar"), + coefficients = NULL, + daily_profile = NULL, + translation = NULL, + conversion = NULL, + overwrite = TRUE, + opts = antaresRead::simOptions() +)+ +
area | +The area where to write prepro data. |
+
---|---|
type | +Type of data to write : |
+
coefficients | +A 12*6 matrix of monthly values for the primary +parameters alpha, beta, gamma, delta, theta and mu. |
+
daily_profile | +A 24*12 matrix of hourly / monthly coefficients K(hm) +that are used to modulate the values of the stationary stochastic process +by which the actual process is approximated. |
+
translation | +A vector of length 8760 (or 8760*1 matrix) to add to the +time-series generated, prior or after scaling. |
+
conversion | +A 2*N matrix (with 1<=N<=50) that is used to turn the +initial time-series produced by the generators into final data. See Antares +General Reference Guide. |
+
overwrite | +Logical. Overwrite the values if a file already exists. |
+
opts | +List of simulation parameters returned by the function
+ |
+
+
writeWaterValues.Rd
Write water values
+writeWaterValues( + area, + data = NULL, + overwrite = TRUE, + opts = antaresRead::simOptions() +)+ +
area | +The area where to add the water values. |
+
---|---|
data | +A 365*101 numeric matrix: table of marginal values for the stored energy, which depends +on the date (365 days) and on the reservoir level (101 round percentage values ranging from +0% to 100%). OR a 3-column matrix with 365*101 rows. In this latter case the 3 columns must +be 'date', 'level' and 'value' (in this order), and the rows must be sorted by: +ascending day, ascending level. |
+
overwrite | +Logical. Overwrite the values if a file already exists. |
+
opts | +List of simulation parameters returned by the function
+ |
+
+