Skip to contents

Calculate an optimal trajectory for the reservoir levels based on Bellman values and reward functions.

Usage

getOptimalTrend(
  level_init,
  watervalues,
  mcyears,
  reservoir_capacity,
  penalty_low,
  penalty_high,
  penalty_final_level,
  final_level,
  max_hydro_weekly,
  seed = 0,
  efficiency,
  mix_scenario = TRUE,
  reward
)

Arguments

level_init

Initial level of the reservoir in MWh generated by get_initial_level_year_per_year().

watervalues

Data frame aggregated watervalues generated by Grid_Matrix().

mcyears

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

reservoir_capacity

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

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.

penalty_final_level

Penalties (for both bottom and top rule curves) to force final level

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().

max_hydro_weekly

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

seed

If scenario are mixed, seed to make results reproducible.

efficiency

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

mix_scenario

Should scenario be mix from one week to another ?

reward

Output reward of get_Reward()

Value

Data frame with level ("lev") and optimal transition ("constraint") for each ("week") and each ("scenario"). For each ("week"), the ("scenario") used is given by ("mcYear").