Bellman: Compute Bellman values at step i from step i+1, used in...

View source: R/Bellman.R

BellmanR Documentation

Compute Bellman values at step i from step i+1, used in Grid_Matrix

Description

Compute Bellman values at step i from step i+1, used in Grid_Matrix

Usage

Bellman(
  Data_week,
  next_week_values_l,
  decision_space,
  E_max,
  P_max = 0,
  method,
  mcyears,
  q_ratio = 0.75,
  counter,
  stop_rate = 5,
  debugger_feas = F,
  niveau_max,
  states_steps,
  penalty_level_low,
  penalty_level_high,
  lvl_high,
  lvl_low
)

Arguments

Data_week

A "data.table" generated in Grid_Matrix code that contains: * states Numeric. All the water values that can be set, listed in decreasing order. * value_inflow Numeric. Inflow values for each Monte-Carlo year. * Rewards for each simulation value and each Monte-Carlo year. * level_high Numeric. Highest possible reservoir value. * level_low Numeric. Lowest possible reservoir value. * states_next List of vectors enumerating all reachable states

next_week_values_l

Numeric. Bellman values at step i+1.

decision_space

Simulation constraints values

E_max

Numeric of length 1. Maximum energy that can be generated by hydro storage over one step of time.

P_max

Numeric of length 1. Maximum energy that can be pumped to reservoir over one step of time.

method

Character. Perform mean of grids algorithm or grid of means algorithm or grid of quantile algorithm.

mcyears

Vector. Monte Carlo years

q_ratio

numeric in [0,1]. the probability used in quantile algorithm.

counter

Numeric of length 1. number of the week in calculation.

stop_rate

the percent from which the calculation stop. for example stop_rate=5 means the calculation stop if there is a week with less then 5% accessibles states.

debugger_feas

open debug mode in case there is an error of no accessible states

niveau_max

Level max of the reservoir

states_steps

Numeric. Discretization step of reservoir.

penalty_level_low

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

penalty_level_high

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

lvl_high

Double. Upper rule curve for the considered week.

lvl_low

Double. Bottom rule curve for the considered week.

Value

a data.table like Data_week with the Bellman values


rte-antares-rpackage/antaresWaterValues documentation built on Nov. 6, 2024, 11:17 p.m.