Run Antares simulations in order to compute water values for a specific area
Source:R/runWaterValuesSimulation.R
runWaterValuesSimulation.Rdnb_disc_stock simulations are run. Each simulation evaluates the cost of a specific control for each week and each scenario.
A control is the difference between initial level and final level on a week.
Results of simulations can be used to compute reward function with get_Reward() and then to compute water values with Grid_Matrix().
See vignette("computation_watervalues") for more details.
Usage
runWaterValuesSimulation(
area = NULL,
simulation_name = "wv_sim_%s",
nb_disc_stock = 10,
mcyears = NULL,
path_solver = NULL,
show_output_on_console = FALSE,
overwrite = FALSE,
opts,
file_name = NULL,
pumping = TRUE,
efficiency,
launch_simulations = NULL,
constraint_values = NULL,
expansion = TRUE
)Arguments
- area
Character. The Antares area concerned by water values computation.
- simulation_name
Character. The name of the simulation,
sis a placeholder for the constraint value defined bynb_disc_stock.- nb_disc_stock
Integer. Number of simulations to launch,
nb_disc_stockdifferent controls values will be generated from maximum pumping power to maximum generating pumping withconstraint_generator(). Each control values will be evaluated with a simulation.- mcyears
Vector of integer. Monte Carlo years used to compute water values.
- path_solver
Character containing the Antares Solver path, argument passed to
runSimulation.- show_output_on_console
Argument passed to
runSimulation.- overwrite
If area or cluster already exists, should they be overwritten?
- opts
List of study parameters returned by the function
antaresRead::setSimulationPath(simulation="input")in input mode.- file_name
the Rdata file name.
- pumping
Boolean. True to take into account the pumping capacity.
- efficiency
Double between 0 and 1. Pumping efficiency ratio. Get it with
getPumpEfficiency().- launch_simulations
Boolean or vector of booleans with the same length as
nb_disc_stock. True to to run the simulations.- constraint_values
Constraint values to use to run simulations, generated by the function
constraint_generatorinstead of parameternb_disc_stock.- expansion
Binary. True if mode expansion (ie linear relaxation) of Antares is used to run simulations, argument passed to
runSimulation. It is recommended to use mode expansion, it will be faster (only one iteration is done) and results will be smoother as the cost result will correspond to the linear relaxation of the problem.
Value
- simulation_names
Vector of character. Names of simulations.
- simulation_values
A
dplyr::tibble()generated byconstraint_generator()describing controls for each simulation.- area
Parameter
area.- mcyears
Parameter
mcyears.- pumping
Parameter
pumping.- efficiency
Parameter
efficiency.- expansion
Parameter
expansion.- fictive_areas
Parameter
fictive_areas.
Details
To implement a specific control of the storage in Antares the study is modified :
The hydro object is deactivated by setting inflows to 0 and set
reservoir_managementtoFALSE.Two fictive areas representing pumping and generating are created and linked to
area. The fictive area for pumping has a high enough load with unsupplied cost of 0. The fictive area for generating has a thermal cluster with marginal cost 0.A weekly binding constraint is created imposing that the difference between the flow coming from generating fictive area and the flow going to pumping fictive area multiplied to the pumping efficiency is equal to the control.
At the end of simulations, the study is reset.