66 .. |episode_example | image :: ./img/grid2op_action.jpg
77
88===============================================
9- Welcome to Grid2Op's technical documentation!
9+ Welcome to Grid2Op's documentation
1010===============================================
1111
1212Grid2Op is a pythonic, easy to use framework, to be able to develop, train or evaluate performances of "agent" or
13- "controller" that acts on a powergrid in different ways .
13+ "controller" that acts on a powergrid.
1414
15- It is modular and can be use to train reinforcement learning agent or to assess the performance of optimal control
16- algorithm.
15+ It is modular and can be use to train reinforcement learning agent or to assess the performance of any kind of
16+ agent controlling powergrids (heuristic, machine learning, optimization, mix of everything etc.)
1717
18- It is flexible and allows the power flow to be computed by the algorithm of your choice. It abstracts the modification
19- of a powergrid and use this abstraction to compute the **cascading failures ** resulting from powerlines disconnection
20- for example.
21-
22- **Features **
23-
24- - abstract the computation of the "cascading failures"
25- - ability to have the same code running with multiple powerflows
26- - parallel execution of one agent / controller on multiple independent scenarios (multiprocessing)
27- - fully customisable: this software has been built to be fully customizable to serve different
28- purposes and not only reinforcement learning, or the L2RPN competition.
18+ It is highly flexible and can be modified in different ways.
2919
3020Grid2Op philosophy
3121--------------------
3222Grid2Op is a python module that aims to make easier the research on sequential decision making applied to power systems.
3323
34- This package adopt the "reinforcement learning " point of view and is compatible with the openAI gym programming
35- interface (see section :ref: ` openai-gym ` for more information) .
24+ This package adopt the "sequential decision making " point of view, for example suited
25+ for training and evaluation "reinforcement learning" agents .
3626
37- Applied to power system, the "reinforcement learning" framework ask :
27+ It is made of 4 main blocks :
3828
39- - a "controller" (named Agent) to take an "action" on the powergrid (for example for L2RPN competitions in 2019
40- and 2020 these actions consist in modifying the connectivity of the powergrid).
41- - the "environment" (*a.k.a * the "real world") applies that action on the powergrid, applies some other modifications
42- and return the next state.
29+ - a module that will embed all the "external" / "exogenous" data, called the "time series" (formelly call "chronics").
30+ This module for example contain the variation of each and generators.
31+ - a module that will compute the "powerflows", called "backend". It is important to note that grid2op itself
32+ assumes nothing on the powergrid. And in theory you can use any solver that you want to compute the state of
33+ the grid (static / steady state or dynamic / transient or DC modeling or AC modeling etc. with trafo being modled in `T ` or in `Pi `)
34+ - a module that "takes decision", called "action" on the grid based on the current grid state, called "observation" and
35+ possible future forecasted grid states
36+ - a module that wrap all the above together and implements a few other feature such as making sure provided actions are "legal"
37+ (meet certain rules) or even emulating (if the module that compute the grid states does not do it) the behaviour of some
38+ "protections".
4339
44- The goal of grid2op is to model "sequential decision making" that could be made by human operators, for example
45- changing the configuration of some "substations" as demonstrate in the figure below:
40+ The goal of grid2op is to model "sequential decision making" that could be made by
41+ human operators, for example changing the configuration of some "substations"
42+ as demonstrate in the figure below:
4643
4744|episode_example |
4845
49- Any kind of "controller" can be implemented using this framework even though it has been inspired by the
50- "reinforcement learning" community. You can implement some heuristic "controllers" (some examples are available in the
51- :ref: `agent-module ` module description), "controllers" that comes from the Optimization community
52- (for example "Optimal Power Flow") or
53- "Model Predictive Control". One of the goal of Grid2Op is to allow everyone to contribute to closing the gap
54- between all these research communities.
46+ .. note ::
47+ Any kind of "controller" can be implemented using this framework even though it has been inspired by the
48+ "reinforcement learning" community. You can implement some heuristic "controllers" (some examples are available in the
49+ :ref: `agent-module ` module description), "controllers" that comes from the Optimization community
50+ (for example "Optimal Power Flow") or
51+ "Model Predictive Control". One of the goal of Grid2Op is to allow everyone to contribute to closing the gap
52+ between all these research communities.
53+
54+ .. note ::
55+ Consecutive steps are "correlated" in the sense that the action taken
56+ at time `t ` is part of the process that defines the state observed at
57+ step `t+1 `. More information on this is given in the
58+ :ref: `mdp-doc-module ` for example.
59+
5560
5661Main module content
5762---------------------
5863
64+ This is where you can go if you want some quick introduction about grid2op
65+ or overall view of what is happing when you "run" a scenario using in grid2op.
66+
5967.. toctree ::
60- :maxdepth: 2
61- :caption: Quickstart
68+ :maxdepth: 1
69+ :caption: Overview
6270
6371 quickstart
6472 grid2op
6573
66- Environments
67- ---------------
68- .. toctree ::
69- :maxdepth: 2
70- :caption: Focus on an "environment"
71-
72- available_envs
73- makeenv
74- env_content
75- create_an_environment
76- dive_into_time_series
77- data_pipeline
78- troubleshoot
79-
8074Usage examples
8175---------------------
76+
77+ On this part of the documentation we focus on some usage of grid2op in different
78+ context, for example using optimization or when "wrapping" grid2op into
79+ a gymnsium compatible environment (with only subset of grid2op capabilities)
80+ to ease training of reinforcement learning agents.
81+
8282.. toctree ::
83- :maxdepth: 2
84- :caption: Learn by Example
83+ :maxdepth: 1
84+ :caption: Learn with examples
8585
8686 optimization
8787 gym
@@ -91,49 +91,112 @@ Usage examples
9191Modeling
9292----------
9393
94+ This part of the documentation focuses on the different
95+ "model" in grid2op. You can find the formal definition
96+ (or at least an attempt at such) for the "Markov Decision Process"
97+ (a mathematical framework used to model sequential decisions making) and
98+ the how the elements accessible in the observation or modifiable in
99+ the action of the agent are represented.
100+
101+ You can also find some discussion about the topology of the grid (one
102+ of the focus of grid2op) and the representation of the grid as a
103+ graph.
104+
94105.. toctree ::
95- :maxdepth: 2
106+ :maxdepth: 1
96107 :caption: Models
97108
98109 mdp
99110 modeled_elements
100111 grid_graph
112+ topology
113+
114+ Environments
115+ ---------------
116+
117+ Here we try to explain rapidly how to load pre existing environment and how some
118+ customization can make grid2op faster (depending on the context)
119+
120+ .. toctree ::
121+ :maxdepth: 1
122+ :caption: Focus on an "environment"
123+
124+ available_envs
125+ makeenv
126+ dive_into_time_series
127+ data_pipeline
128+ troubleshoot
101129
102130Plotting capabilities
103131----------------------
104132
133+ Some plotting capabilities of grid2op.
134+
135+ .. warning ::
136+ This has not been updated
137+ for a long time and is maybe not up to date.
138+
105139.. toctree ::
106- :maxdepth: 2
140+ :maxdepth: 1
107141 :caption: Plot
108142
109143 plot
110144
111- Technical Documentation
112- ----------------------------
145+ Technical documentation for grid2op users
146+ -------------------------------------------
147+
148+ This part of the documentation is dedicated to grid2op users. It
149+ covers detailed description of all the modules, classes and their main method
150+ that you, as a user, can use in grid2op.
151+
152+ The documentation there is mainly descirptive. It explains what is done but
153+ avoid (in general) getting in "too much gory details" on how these
154+ things are done.
155+
156+ As a starting point, we suggest you first look here before diving more
157+ deeply into the other section of the documentation.
113158
114159.. toctree ::
115- :maxdepth: 2
116- :caption: Technical Documentation
117-
118- action
119- agent
120- backend
121- chronics
122- converter
123- createbackend
124- environment
125- episode
126- exception
127- observation
128- opponent
129- parameters
130- reward
131- rules
132- runner
133- simulator
134- space
135- timeserie_handlers
136- utils
137- voltagecontroler
160+ :maxdepth: 1
161+ :caption: Technical documentation for grid2op users
162+
163+ user
164+
165+ External contribution technical Documentation
166+ ------------------------------------------------
167+
168+ This part of the documentation is focued on external contribution.
169+ It is best suited if you want to use grid2op as a "core" and extend / modify
170+ it with different elements.
171+
172+ For example, you might want to :
173+ - use a different solver to compute powerflows
174+ (called :class: `grid2op.Backend.Backend ` in grid2op)
175+ - create a new environment
176+ - load time series from a different format than the grid2op default csv
177+ - have an opponent that act differently than the provided ones
178+ - evaluate the performance of the agent differently (change the reward / score function)
179+ - use a different way to control the voltages
180+ - etc.
181+
182+ The main focuse of these pages of the documentation is put on the
183+ interface and still avoid getting into too much detail on how things
184+ are done internally whenever possible.
185+
186+ This is the type of documentation you should be looking at if the
187+ current grid2op modelling statisfies you in its vast majority
188+ but if you want to slightly modify one of its component
189+
190+ .. toctree ::
191+ :maxdepth: 1
192+ :caption: Technical documentation for grid2op external contributors
193+
194+ developer
195+
196+ Developer technical Documentation
197+ -----------------------------------
198+
199+
200+ DOC IN PROGRESS...
138201
139202.. include :: final.rst
0 commit comments