Skip to contents

Compute Bellman values and water values with dynamic programming based on reward functions computed with get_Reward(). Mode information about this function in vignette("grid_Matrix-parameters").

Usage

Grid_Matrix(
  area,
  reward_db,
  nb_cycle = 1L,
  mcyears,
  week_53 = 0,
  states_step_ratio = 0.01,
  reservoir_capacity = NULL,
  inflow = NULL,
  cvar_value = 1,
  opts,
  shiny = FALSE,
  efficiency = NULL,
  until_convergence = FALSE,
  convergence_rate = 0.9,
  convergence_criteria = 1,
  cycle_limit = 10,
  correct_concavity = FALSE,
  penalty_low = 3000,
  penalty_high = 3000,
  max_hydro_weekly = NULL,
  force_final_level = FALSE,
  final_level = NULL,
  penalty_final_level_low = NULL,
  penalty_final_level_high = NULL
)

Arguments

area

Character. The Antares area concerned by water values computation.

reward_db

Reward functions generated by the function get_Reward().

nb_cycle

Integer. Number of times to run dynamic programming. Used to avoid dependency on final Bellman values.

mcyears

Vector of integer. Monte Carlo years used to compute water values.

week_53

Double or vector of doubles. Final bellman values used at the end of week 52 for the first cycle performed.

states_step_ratio

Double. Discretization ratio to generate steps levels between the reservoir capacity and zero for which Bellman values are computed.

reservoir_capacity

Double. Reservoir capacity for the given area in MWh given by get_reservoir_capacity().

inflow

Generated by get_inflow()

cvar_value

Double from 0 to 1. The probability used in cvar method.

opts

List of study parameters returned by the function antaresRead::setSimulationPath(simulation="input") in input mode.

shiny

Binary. TRUE if the function is called from shiny_water_values().

efficiency

Double between 0 and 1. Pumping efficiency ratio. Get it with getPumpEfficiency().

until_convergence

Binary. TRUE to repeat cycles until convergence of water values or attending the limit.

convergence_rate

Double from 0 to 1. Define the convergence level if until_convergence=TRUE. 1 means all values should have converged (ie identical water values between current cycle and the last one) and 0 means no convergence is needed to stop.

convergence_criteria

Double. Used if until_convergence=TRUE. Thereshold to consider that two different water values are identical.

cycle_limit

Integer. Used if until_convergence=TRUE. Maximum cycles to perform.

correct_concavity

Binary argument (default to FALSE). TRUE to correct concavity of Bellman values.

penalty_low

Double. Penalty for violating the bottom rule curve, comparable to the unsupplied energy cost.

penalty_high

Double. Penalty for violating the top rule curve, comparable to the spilled energy cost.

max_hydro_weekly

Maximum weekly pumping and generating power generated by the function get_max_hydro() with timeStep="weekly".

force_final_level

Binary. Whether final level should be constrained.

final_level

Double. Final level (in percent between 0 and 100) if final level is constrained. If you want initial level, use get_initial_level().

penalty_final_level_low

Double. Penalties for both bottom rule curve to constrain final level.

penalty_final_level_high

Double. Penalties for top rule curve to constrain final level.

Value

watervalues

A dplyr::tibble() with multiple columns and detailed results.

aggregated_results

A dplyr::tibble() with multiple columns and summarized results.

lower_bound

Double. Lower bound.