Skip to content

Commit

Permalink
adding citation
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinLer committed May 6, 2021
1 parent ae23fb1 commit 73faa78
Showing 1 changed file with 31 additions and 17 deletions.
48 changes: 31 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ Official documentation: https://pypownet.readthedocs.io/
* [4 Generate the documentation](#generate-the-documentation)
* [5 License information](#license-information)

# Installation
## Using Docker
## Installation
### Using Docker
Retrieve the Docker image:
```
sudo docker pull marvinler/pypownet:2.2.8-light
```

## Without using Docker
### Requirements:
### Without using Docker
#### Requirements:
* Python >= 3.6


Expand All @@ -42,41 +42,41 @@ For Octave backend (default is Python backend):
* Octave >= 4.0.6
* Matpower >= 6.0

### Instructions
#### Instructions

These instructions allow to run the simulator with a Python backend; for Octave backend, please refer to the documentation for installation instructions.

#### Step 1: Install Python3.6
##### Step 1: Install Python3.6
```
sudo apt-get update
sudo apt-get install python3.6
```
If you have any trouble with this step, please refer to [the official webpage of Python](https://www.python.org/downloads/release/python-366/).

#### (Optional, recommended) Step 1bis: Create a virtual environment
##### (Optional, recommended) Step 1bis: Create a virtual environment
```
virtualenv -p python3.6 --system-site-packages venv
source venv/bin/activate
```

#### Step 2: Clone pypownet
##### Step 2: Clone pypownet
```
git clone https://github.com/MarvinLer/pypownet
```
This should create a folder pypownet with the current sources.

#### Step 3: Run the installation script of pypownet
##### Step 3: Run the installation script of pypownet
Finally, run the following Python command to install the current simulator (including the Python libraries dependencies):
```
cd pypownet/
python3.6 setup.py install
```
After this, this simulator is available under the name pypownet (e.g. ```import pypownet```).

# Basic usage
## Without using Docker
## Basic usage
### Without using Docker
Experiments can be conducted using the CLI.
### Using CLI arguments
#### Using CLI arguments
CLI can be used to run simulations:
```
python -m pypownet.main -v
Expand All @@ -86,14 +86,14 @@ You can use `python -m pypownet.main --help` for further information about these
python -m pypownet.main --parameters parameters/default14 --niter 1000 --verbose --render
```
With this default14/ parameters (emulates a grid with 14 substations, 5 productions, 11 consumptions and 20 lines), it takes ~100 seconds to run 1000 timesteps (old i5).
## Using Docker
### Using Docker
You can use the command line of the image with shared display (for running the renderer):
```
sudo docker run -it --privileged --net=host --env="DISPLAY" --volume="$HOME/.Xauthority:/root/.Xauthority:rw" marvinler/pypownet:2.2.0 sh
```
This will open a terminal of the image. The usage is then identical to without docker, by doing the steps within this terminal.

# Main features
## Main features
pypownet is a power grid simulator, that emulates a power grid that is subject to pre-computed injections, planned maintenance as well as random external hazards. Here is a list of pypownet main features:
* emulates a grid of any size and electrical properties in a game discretized in timesteps of any (fixed) size
* computes and apply cascading failure process: at each timestep, overflowed lines with certain conditions are switched off, with a consequent loadflow computation to retrieve the new grid steady-state, and reiterating the process
Expand All @@ -106,7 +106,7 @@ pypownet is a power grid simulator, that emulates a power grid that is subject t
* has a set of parameters that can be customized (including AC or DC mode, or hard-overflow coefficient), associated with sets of injections, planned maintenance and random hazards of the various chronics
* handles node-splitting (at the moment only max 2 nodes per substation) and lines switches off for topology management

# Generate the documentation
## Generate the documentation
The stable official documentation is available at https://pypownet.readthedocs.io/.
Alternatively, a copy of the master documentation can be computed: you will need Sphinx, a Documentation building tool, and a nice-looking custom [Sphinx theme similar to the one of readthedocs.io](https://sphinx-rtd-theme.readthedocs.io/en/latest/):
```
Expand All @@ -119,16 +119,30 @@ sphinx-build -b html ./source ./build
```
The html will be available within the folder [doc/build](doc/build/index.html).

# Tests
## Tests
pypownet is provided with series of tests developped by @ZergD and RTE. These tests are designed to verify some behavior of the game as a whole, including some expected grid values based on perfectly controlled injections/topology. Tests can be run with `pytest` in the current directory.

(Here)[tests/README.md] for more information about the testing module.

# License information
## License information

Copyright 2017-2019 RTE and INRIA (France)

RTE: http://www.rte-france.com
INRIA: https://www.inria.fr/

This Source Code is subject to the terms of the GNU Lesser General Public License v3.0. If a copy of the LGPL-v3 was not distributed with this file, You can obtain one at https://www.gnu.org/licenses/lgpl-3.0.fr.html.

## Citation

If you use this repo or find it useful, please consider citing:

```BibTeX
@article{lerousseau2021design,
title={Design and implementation of an environment for Learning to Run a Power Network (L2RPN)},
author={Lerousseau, Marvin},
journal={arXiv preprint arXiv:2104.04080},
year={2021}
}
```

0 comments on commit 73faa78

Please sign in to comment.