-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBellman.Rd
86 lines (69 loc) · 2.6 KB
/
Bellman.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Bellman.R
\name{Bellman}
\alias{Bellman}
\title{Compute Bellman values at step i from step i+1}
\usage{
Bellman(
Data_week,
next_week_values_l,
decision_space,
E_max,
P_max = 0,
niveau_max,
method,
na_rm = TRUE,
max_mcyear,
print_test = FALSE,
correct_outliers = FALSE,
q_ratio = 0.75,
test_week,
counter,
inaccessible_states = 1,
stop_rate = 5,
debugger_feas = F,
...
)
}
\arguments{
\item{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}
\item{next_week_values_l}{Numeric. Bellman values at step i+1.}
\item{decision_space}{Simulation constraints values}
\item{E_max}{Numeric of length 1. Maximum energy that can be generated by
hydro storage over one step of time.}
\item{P_max}{Numeric of length 1. Maximum energy that can be pumped to
reservoir over one step of time.}
\item{niveau_max}{Numeric of length 1. Reservoir capacity.}
\item{method}{Character. Perform mean of grids algorithm or grid of means algorithm or
grid of quantile algorithm.}
\item{na_rm}{Boolean. Remove NAs}
\item{max_mcyear}{Numeric of length 1. Number of Monte-Carlo year
used in simulations}
\item{print_test}{Boolean. print Bellman values.}
\item{correct_outliers}{If TRUE, outliers in Bellman values are replaced by spline
interpolations. Defaults to FALSE.}
\item{q_ratio}{numeric in [0,1]. the probability used in quantile algorithm.}
\item{test_week}{Numeric of length 1. number of the week to print in test.}
\item{counter}{Numeric of length 1. number of the week in calculation.}
\item{inaccessible_states}{Numeric in [0,1]. Tolerance of inaccessible states.
For example if equal to 0.9 we delete the state if this states is inaccessible by 90\% of scenarios.}
\item{stop_rate}{the percent from which the calculation stop. for example
\code{stop_rate=5} means the calculation stop if there is a week with less then
5\% accessibles states.}
\item{debugger_feas}{open debug mode in case there is an error of no accessible states}
\item{...}{further arguments passed to or from other methods.}
}
\value{
a \code{data.table} like Data_week with the Bellman values
}
\description{
Compute Bellman values at step i from step i+1
}