-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGrid_Matrix.Rd
124 lines (95 loc) · 3.87 KB
/
Grid_Matrix.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Grid_Matrix.R
\name{Grid_Matrix}
\alias{Grid_Matrix}
\title{Calculate grid layer matrix of Bellman values and water values}
\usage{
Grid_Matrix(
area,
simulation_names,
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,
correct_outliers = FALSE,
method,
only_input = FALSE,
q_ratio = 0.5,
monotonic_bellman = FALSE,
test_week = NULL,
opts = antaresRead::simOptions(),
shiny = F,
inaccessible_states = 1,
until_convergence = F,
convergence_rate = 0.9,
convergence_criteria = 1,
cycle_limit = 10,
pumping = F,
efficiency = 1,
stop_rate = 0,
debug_week = 54,
...
)
}
\arguments{
\item{area}{An 'antares' area.}
\item{simulation_names}{Names of simulations to retrieve.}
\item{reward_db}{a table contains the reward values generated by the function \code{get_Reward}
If it's NULL it auto calculated.}
\item{inflow}{a table contains the hydro storage generated by the function \code{readAntares}
with th option \code{hydrostorage = TRUE}. If it's NULL it auto calculated.}
\item{simulation_values}{Values for the simulation.}
\item{nb_cycle}{Number of times to run the algorithm.}
\item{district_name}{Name of the district used to store output.}
\item{mcyears}{MC years to consider, by default all of them.}
\item{week_53}{Water values for week 53, by default 0.}
\item{states_step_ratio}{Discretization ratio to generate steps levels
between the reservoir capacity and zero . Defaults to 0.05}
\item{reservoir_capacity}{Reservoir capacity for the given area in MWh,
if \code{NULL} (the default), value in Antares is used if available else
a prompt ask the user the value to be used.}
\item{na_rm}{Remove NAs}
\item{correct_outliers}{If TRUE, outliers in Bellman values are replaced
by spline interpolations. Defaults to FALSE.}
\item{method}{Perform mean of grids algorithm or grid of means algorithm or
grid of quantile algorithm.}
\item{only_input}{if TRUE skip bellman values calculation and return the input}
\item{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))}
\item{monotonic_bellman}{force increasing bellman values with the stock
level in the calculation.}
\item{test_week}{the week number u want to see it's calculation information
in the console}
\item{opts}{List of simulation parameters returned by the function
\code{antaresRead::setSimulationPath}}
\item{shiny}{Boolean. True to run the script in shiny mode.}
\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{until_convergence}{Boolean. TRUE to repeat cycle until convergence or
attending the limit.}
\item{convergence_rate}{from 0 to 1. Define the convergence level from which
we suppose that no need to continue another cycle..}
\item{convergence_criteria}{the value define convergence. if the difference
between two water values is less then this value those values are converged.}
\item{cycle_limit}{Define cycles limit when you are in the until_convergence mod.}
\item{pumping}{Boolean. True to take into account the pumping.}
\item{efficiency}{in [0,1]. efficient ratio of pumping.}
\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{debug_week}{the number of the week to open the process in debug mode}
\item{...}{further arguments passed to or from other methods.}
}
\value{
a \code{data.table}
}
\description{
Calculate grid layer matrix of Bellman values and water values
}