Skip to content

Commit

Permalink
Newest version into main (#134)
Browse files Browse the repository at this point in the history
* Feature 100 additional rl (#110)

* initital file to start working with

* bugfixes

* update

* #100 add td3 agent

* #100 add test scripts

* #100 convert action space using wrappers

* #100 add experiments with td3

* fix `TD3Policy` not defined

* adapt td3 to multi dims action and state

* #100 log first results with TD3

* #100 add wandb support

* #100 add notebook example for `TD3`

* #100 fix `max_steps` not defined

* #100 re organise

* fix spelling

* #100 add wandb logged plots

* add wandb, statistcs, revise to project toml

* #100 rm wandb

* #100 fix multiple methods with same name

* #100 fix infos

* #100 rm Wandb

* #100 fix minor issues

* #100 add `wandb` example

* #100 update with figures

* #100 remove `@show`

---------

Co-authored-by: Jan Stenner <[email protected]>

* initial GUI commit

* Feature 23 modeling variable dc link voltage (#118)

* #23 Save for merge.

* #23 Add battery notebook.

* #23 Start plotting the data.

* Added Plotly.js

* Adjusting the notebook and src to the current version.

* Changed function within PV arrays. Added battery model. Changed DEMO PV to DC link models.

* Commiting current state of the notebook. Implementation to Env is still missing.

* Implementing variable dc link voltage.

* Include variable_dc_link.jl

* Deleted Prints and added stuff to nb

* Updated parameter check. Added default values for battery and pv.

* Changed temperature offset to match the one in the battery.

* Finalization of DC Link voltages, adding two example scripts and one example notebook.

* Fixed bug in the pv array

* Update project.toml

* Added check for the source_type key.

* Corrected calculation of DC link voltages.

* #118 Corrected typos

* Cleaned up code. Added calculation of v_dc to env.reset.

* Cleared notebook and added figures.

* Revert "Merged changes."

This reverts commit 2d20e95, reversing
changes made to 9d25c2c.

---------

Co-authored-by: Marvin Meyer <[email protected]>
Co-authored-by: webbah <[email protected]>

* Feature 96 non linear modelling (#120)

* small test file non linear

* test_non_linear

* added Nodconstructor test for nonlinear things

* update

* smal Test

* update: same result as in the nodeconstructor

* update

* update

* update

* small update

* another try

* NodeConstructor works with functions

* Update:
- node_constructor.jl
- electric_grid_env.jl
Both work with nonlinearity

* Small changed using DifferentialEqautions.jl

* small updates

* Update Env

* update: env_example_nonlinear.jl

* updated env_example_nonlinear.jl
and custom_crontrol.jl to get the last x value. Nothing in the middle

* Changed the accuracy of the ODE solver to speed up

* minor changes

* Info for the solver

* Updated Info, and small Notebook

* Reexport added

* merge ended

* Toml update

* fixed nameof bug and updated the Project.toml

* Deleted unnecessary things

* Updated Nonlinear.ipynb

---------

Co-authored-by: Jan Stenner <[email protected]>

* gui update

* mini gui fix

* import Interpolations.LinearInterpolation

* docs update 1

* docs update 2

* RL example preparation 2

* RL example updates

* Changed dtype of the matrix to Float. (#121)

* RL update

* added fixes and osc feature from RL Classic branch

* updates to RL Single Example (also notebook&docs)

* Feature 96 non linear modelling (#123)

* small test file non linear

* test_non_linear

* added Nodconstructor test for nonlinear things

* update

* smal Test

* update: same result as in the nodeconstructor

* update

* update

* update

* small update

* another try

* NodeConstructor works with functions

* Update:
- node_constructor.jl
- electric_grid_env.jl
Both work with nonlinearity

* Small changed using DifferentialEqautions.jl

* small updates

* Update Env

* update: env_example_nonlinear.jl

* updated env_example_nonlinear.jl
and custom_crontrol.jl to get the last x value. Nothing in the middle

* Changed the accuracy of the ODE solver to speed up

* minor changes

* Info for the solver

* Updated Info, and small Notebook

* Reexport added

* merge ended

* Toml update

* fixed nameof bug and updated the Project.toml

* Deleted unnecessary things

* Updated Nonlinear.ipynb

* changes Notebook

* Updated notebook

* Update Project.toml

---------

Co-authored-by: Benedikt Brück <[email protected]>
Co-authored-by: Benedikt Brück <[email protected]>
Co-authored-by: Jan Stenner <[email protected]>
Co-authored-by: Jan Stenner <[email protected]>

* cleanup: Nonlinear Notebook and RLtests

Docs update: New Nonlinear contents and fixed a bug with multiple plots per page ("gd" to "gdd" etc.) BY HAND

* cleanup

* cleanup and minor fixes again

* Update README.md (#127)

correct typo

* Feature 102 extended unit tests (#126)

* #101 Add tests for other voltages

* #45 extended tests

* delete `RL_tests`

* changes done Sep oliver (#132)

Co-authored-by: SeptimusBoshoff <[email protected]>

* updated two RL scripts

* Cleanup with Daniel and Marvin

* Hotfix example scripts (#133)

* Update test_battery.

* Added comments and formatting to scripts.

* Deleted DEMO from nb names

* Changed the plotting function

* Renaming the DC Link example scripts

* readme cleanups and RL_example restore

* Changed names within the NB (#135)

* typo and formatting corrections

---------

Co-authored-by: Vikas <[email protected]>
Co-authored-by: webbah <[email protected]>
Co-authored-by: MarvinMeyer <[email protected]>
Co-authored-by: Marvin Meyer <[email protected]>
Co-authored-by: Benedikt Brück <[email protected]>
Co-authored-by: Benedikt Brück <[email protected]>
Co-authored-by: Oliver Wallscheid <[email protected]>
Co-authored-by: SeptimusBoshoff <[email protected]>
Co-authored-by: Wallscheid <[email protected]>
  • Loading branch information
10 people authored Oct 5, 2023
1 parent d94731c commit 03fbcc0
Show file tree
Hide file tree
Showing 34 changed files with 928 additions and 26,072 deletions.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@


ElectricGrid.jl is a library for setting up realistic electric grid simulations with extensive support for control options. With ElectricGrid.jl you can
- create a simulation environment for an electric grid by defining its sources, loads, and cable connections
- set detailed parameters of your electric components - or let them be auto-generated
- choose different control modes for each source in your system
- use the agent architecture of [ReinforcementLearning.jl](https://juliareinforcementlearning.org/) to either train RL agents as controllers or write your own ones
- create a simulation environment for an electric grid by defining its sources, loads, and cable connections,
- set detailed parameters of your electric components or let them be auto-generated,
- choose different control modes for each power electronic converter in your system and
- use the agent architecture of [ReinforcementLearning.jl](https://juliareinforcementlearning.org/) to either train RL agents as controllers or write your own ones.


![ElectricGrid Framework](docs/src/assets/Overview_EG.png)

## Installation
- Installation using the julia package manager (recommended if you want to use ElectricGrid in your project):
- In a Julia terminal run the follwing:
- Installation using the Julia package manager (recommended if you want to use ElectricGrid in your project):
- In a Julia terminal run the following:
```
import Pkg
Pkg.add("ElectricGrid")
Expand All @@ -36,7 +36,7 @@ or press `]` in the Julia Repl to enter Pkg mode and then run
add ElectricGrid
```

- Install from Github source (recommended if you want to run the example notebooks and scripts):
- Install from GitHub source (recommended if you want to run the example notebooks and scripts):
- Clone the git and navigate to the directory
```
git clone https://github.com/upb-lea/ElectricGrid.jl.git
Expand All @@ -45,12 +45,12 @@ git clone https://github.com/upb-lea/ElectricGrid.jl.git
## Getting Started

To get started with ElectricGrid.jl the following interactive notebooks are useful. They show how to use the ElectricGrid.jl framework to build and simulate the dynamics of an electric power grid controlled via classic controllers or train common RL agents for different control tasks:
* [Create an environment with ElectricGrid.jl](https://github.com/upb-lea/ElectricGrid.jl/blob/main/examples/notebooks/Env_Create_DEMO.ipynb)
* [Theory behind ElectricGrid.jl - Modelling Dynamics using Linear State-Space Systems](https://github.com/upb-lea/ElectricGrid.jl/blob/main/examples/notebooks/NodeConstructor_Theory_DEMO.ipynb)
* [Classic Controlled Electric Power Grids - State of the Art](https://github.com/upb-lea/ElectricGrid.jl/blob/main/examples/notebooks/Classical_Controllers_Introduction.ipynb)
* [Use RL Agents in the ElectricGrid.jl Framework](https://github.com/upb-lea/ElectricGrid.jl/blob/main/examples/notebooks/RL_Single_Agent_DEMO.ipynb)
* [Create an environment with ElectricGrid.jl](https://github.com/upb-lea/ElectricGrid.jl/blob/main/examples/notebooks/Env_Creat.ipynb)
* [Theory behind ElectricGrid.jl - Modelling Dynamics using Linear State-Space Systems](https://github.com/upb-lea/ElectricGrid.jl/blob/main/examples/notebooks/NodeConstructor_Theory.ipynb)
* [Classic Controlled Electric Power Grids - State-of-the-Art](https://github.com/upb-lea/ElectricGrid.jl/blob/main/examples/notebooks/Classical_Controllers_1_Swing.ipynb)
* [Use RL Agents in the ElectricGrid.jl Framework](https://github.com/upb-lea/ElectricGrid.jl/blob/main/examples/notebooks/RL_Single_Agent.ipynb)

An overview of all parameters defining the experiment setting with regards to the electric grid can be found here:
An overview of all parameters defining the experiment setting in regard to the electric grid can be found here:
* [Default Parameters](https://github.com/upb-lea/ElectricGrid.jl/blob/main/examples/notebooks/Default_Parameters.ipynb)


Expand All @@ -73,18 +73,18 @@ There should also appear a plot that looks like this:
## Using the GUI

The current version of ElectricGrid features a graphical user interface (GUI) that helps with setting up a simulation.
This is built on the library [QML.jl](https://github.com/JuliaGraphics/QML.jl), that, at the time of writing, stopped working in it's current release version.
For that reason it is **required to clone this codebase** and install `QML.jl` in it's github main state manually if you want to use the gui.
This is built on the library [QML.jl](https://github.com/JuliaGraphics/QML.jl), that, at the time of writing, stopped working in its current release version.
For that reason it is **required to clone this codebase** and install `QML.jl` in its GitHub main state manually if you want to use the GUI.

```
import Pkg
Pkg.add("QML#main")
```
or press `]` in the Julia Repl to enter Pkg mode and then run
or press `]` in the Julia RPEL to enter Pkg mode and then run
```
add QML#main
```

![gui example](docs/src/assets/gui_example.png)
![GUI example](docs/src/assets/gui_example.png)

Usage of the GUI is explained in the [GUI section in the docs](https://upb-lea.github.io/ElectricGrid.jl/dev/Gui/).
Loading

0 comments on commit 03fbcc0

Please sign in to comment.