Grid_Matrix: Calculate grid layer matrix of Bellman values and water...

View source: R/Grid_Matrix.R

Grid_MatrixR Documentation

Calculate grid layer matrix of Bellman values and water values

Description

Calculate grid layer matrix of Bellman values and water values

Usage

Grid_Matrix(
  area,
  simulation_names,
  expansion,
  reward_db = NULL,
  inflow = NULL,
  simulation_values = NULL,
  nb_cycle = 1L,
  district_name = "water values district",
  mcyears = NULL,
  week_53 = 0,
  states_step_ratio = 0.01,
  reservoir_capacity = NULL,
  na_rm = FALSE,
  method,
  only_input = FALSE,
  q_ratio = 0.5,
  test_week = NULL,
  opts = antaresRead::simOptions(),
  shiny = F,
  until_convergence = F,
  convergence_rate = 0.9,
  convergence_criteria = 1,
  cycle_limit = 10,
  pumping = F,
  efficiency = 1,
  stop_rate = 0,
  debug_week = 54,
  correct_concavity = FALSE,
  correct_monotony_gain = FALSE,
  penalty_low = 3000,
  penalty_high = 3000,
  method_old_gain = F,
  hours_reward_calculation = c(seq.int(0, 168, 10), 168),
  controls_reward_calculation = NULL,
  max_hydro_hourly = NULL,
  max_hydro_weekly = NULL,
  force_final_level = F,
  final_level = NULL,
  penalty_final_level_low = NULL,
  penalty_final_level_high = NULL,
  fictive_areas = NULL,
  ...
)

Arguments

area

An 'antares' area.

simulation_names

Names of simulations to retrieve.

expansion

Binary. True if mode expansion was used to run simulations

reward_db

a table contains the reward values generated by the function get_Reward If it's NULL it auto calculated.

inflow

a table contains the hydro storage generated by the function readAntares with th option hydrostorage = TRUE. If it's NULL it auto calculated.

simulation_values

Values for the simulation.

nb_cycle

Number of times to run the algorithm.

district_name

Name of the district used to store output.

mcyears

MC years to consider, by default all of them.

week_53

Water values for week 53, by default 0.

states_step_ratio

Discretization ratio to generate steps levels between the reservoir capacity and zero . Defaults to 0.05

reservoir_capacity

Reservoir capacity for the given area in MWh, if NULL (the default), value in Antares is used if available else a prompt ask the user the value to be used.

na_rm

Remove NAs

method

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

only_input

if TRUE skip bellman values calculation and return the input

q_ratio

from 0 to 1. the probability used in quantile method to determine a bellman value which q_ratio all bellman values are equal or less to it. (quantile(q_ratio))

test_week

the week number u want to see it's calculation information in the console

opts

List of simulation parameters returned by the function antaresRead::setSimulationPath

shiny

Boolean. True to run the script in shiny mode.

until_convergence

Boolean. TRUE to repeat cycle until convergence or attending the limit.

convergence_rate

from 0 to 1. Define the convergence level from which we suppose that no need to continue another cycle..

convergence_criteria

the value define convergence. if the difference between two water values is less then this value those values are converged.

cycle_limit

Define cycles limit when you are in the until_convergence mod.

pumping

Boolean. True to take into account the pumping.

efficiency

in [0,1]. efficient ratio of pumping.

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.

debug_week

the number of the week to open the process in debug mode

correct_concavity

Binary argument (default to false). True to correct concavity of Bellman values.

correct_monotony_gain

Binary argument (default to false). True to correct monotony of gains.

penalty_low

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

penalty_high

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

method_old_gain

If T, linear interpolation used between simulations reward, else smarter interpolation based on marginal prices

hours_reward_calculation

If method_old_gain=F, vector of hours used to evaluate costs/rewards of pumping/generating

controls_reward_calculation

If method_old_gain=F, vector of controls evaluated

max_hydro_hourly

Hourly maximum pumping and turbining powers

max_hydro_weekly

Weekly maximum pumping and turbining powers

force_final_level

Binary. Whether final level should be constrained

final_level

Final level (in percent between 0 and 100) if final level is constrained but different from initial level

penalty_final_level_low

Penalties for both bottom rule curve to constrain final level

penalty_final_level_high

Penalties for top rule curve to constrain final level

fictive_areas

Vector of chr. Fictive areas used in simulation

...

further arguments passed to or from other methods.

Value

List of a data.frame with aggregated water values and a data.frame of more detailed water values


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