OpenModelica Microgrid Gym
Project description
OpenModelica Microgrid Gym
The OpenModelica Microgrid Gym (OMG) package is a software toolbox for the simulation and control optimization of microgrids based on energy conversion by power electronic converters.
The main characteristics of the toolbox are the plug-and-play grid design and simulation in OpenModelica as well as the ready-to-go approach of intuitive reinfrocement learning (RL) approaches through a Python interface.
The OMG toolbox is built upon the OpenAI Gym environment definition framework. Therefore, the toolbox is specifically designed for running reinforcement learning algorithms to train agents controlling power electronic converters in microgrids. Nevertheless, also arbritary classical control approaches can be combined and tested using the OMG interface.
Free software: GNU General Public License v3
Documentation: https://upb-lea.github.io/openmodelica-microgrid-gym
Installation
Install Python environment
Install OpenModelica MicrogridGym from PyPI (recommended):
$ pip install openmodelica_microgrid_gym
Or install from Github source:
$ git clone https://github.com/upb-lea/openmodelica-microgrid-gym.git $ cd openmodelica_microgrid_gym $ python setup.py install
Hint: PyFMI might throw some errors while installing via pip. It can be installed via conda by running:
$ conda install -c conda-forge pyfmi
Installation of OpenModelica
OMG was create by using OMEdit v1.16
In this case, try to download the pre-built virtual machine.
Getting started
OMG uses the FMI standard for the exchange of the model between OpenModelica and python.
An example network consisting out of two inverters, three filters and an inductive load.
You can either use one of the provided FMUs (Windows and Linux, 64-bit, both included in the grid.network.fmu) or create your own by running:
openmodelica_microgrid_gym\fmu> omc create_fmu.mos
Running the staticctrl.py starts a simulation with a manually tuned cascaded PIPI controller
A save Bayesian approach of a reinforcement learning agent is provided under examples/berkamkamp.py.
Every user defined settings can be directly done in the example program.
env = gym.make(environment-id, **kwargs)
Returns an instantiated grid environment. Provide any additional settings right here (see full documentation for all possibilities)
Citation
A whitepaper for this framework will be avaiable soon. Please use the following BibTeX entry for citing us:
@misc{LEA2020XXXXXXX, title={XXXXXXXXXX}, author={Daniel Weber and Stefan Heid and Henrik Bode and Oliver Wallscheid}, year={2020}, eprint={XXXXX}, archivePrefix={arXiv}, primaryClass={eess.SY} }
Contributing
Please refer to the contribution guide.
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2020-04-22)
First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for openmodelica_microgrid_gym-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01c67bbe1d453534e880a48b9f571e1cd273a44515fe6600c566c781e90dae1a |
|
MD5 | 974dccf5f8661437a88fea396e295e12 |
|
BLAKE2b-256 | 0e6c439f92de5b08db4ca302d1fa5648d64a2b629d0ecb63b9442b59c5488f67 |
Hashes for openmodelica_microgrid_gym-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0a46885eabcddedd16bf896551f9ab5fa2a609d455032cd8399e62577b007ca |
|
MD5 | 17a07c20e5da2be4cd11c7bd9cbe22e1 |
|
BLAKE2b-256 | a6be5ddd33fd5efbdadf3afd88e929c8396831d3e23476388c12650221329c8c |