Metadata-Version: 2.4
Name: monee
Version: 1.1.0
Summary: Framework for calculating the steady-state energy flow and for solving optimization problems in coupled energy grids (gas, heat, electricity)
Author-email: Rico Schrage <rico.schrage@uol.de>
License-Expression: MIT
Project-URL: Homepage, https://monee.readthedocs.io
Project-URL: Repository, https://monee.readthedocs.io
Project-URL: Issues, https://github.com/Digitalized-Energy-Systems/monee/issues
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: scipy>=1.10.1
Requires-Dist: gekko>=1.0.6
Requires-Dist: networkx>=3.0
Requires-Dist: numpy>=1.26.4
Requires-Dist: pandas>=1.5.3
Requires-Dist: geopy>=2.4.1
Requires-Dist: plotly>=6.3.0
Requires-Dist: pyomo
Provides-Extra: simbench
Requires-Dist: simbench>=1.3.0; extra == "simbench"
Requires-Dist: pandapower>=2.9.0; extra == "simbench"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: pre-commit; extra == "test"
Provides-Extra: testpp
Requires-Dist: pytest; extra == "testpp"
Requires-Dist: peext; extra == "testpp"
Requires-Dist: simbench; extra == "testpp"
Requires-Dist: pandapower==2.9.0; extra == "testpp"
Requires-Dist: pandapipes==0.6.0; extra == "testpp"
Requires-Dist: numpy==1.26.4; extra == "testpp"
Requires-Dist: pytest-cov; extra == "testpp"
Requires-Dist: pre-commit; extra == "testpp"
Requires-Dist: pandas==1.5.3; extra == "testpp"
Requires-Dist: kaleido; extra == "testpp"
Requires-Dist: pygraphviz; extra == "testpp"
Dynamic: license-file

<p align="center">

![logo](docs/source/_static/monee-logo.drawio.svg)

</p>

[PyPi](https://pypi.org/project/monee/) | [Docs](https://monee.readthedocs.io)

![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)
[![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/Digitalized-Energy-Systems/monee/blob/development/LICENSE)
[![Test mango-python](https://github.com/Digitalized-Energy-Systems/monee/actions/workflows/test-monee.yml/badge.svg)](https://github.com/Digitalized-Energy-Systems/monee/actions/workflows/test-monee.yml)
[![codecov](https://codecov.io/gh/Digitalized-Energy-Systems/monee/graph/badge.svg?token=KSBSBQGNBZ)](https://codecov.io/gh/Digitalized-Energy-Systems/monee)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Digitalized-Energy-Systems_monee&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Digitalized-Energy-Systems_monee)

The python project `monee` (a Modular Network-based Energy Grid Optimization) can be used to calculate the steady-state energy flow of coupled grids (electricity, water (heating), gas). It is also capable to flexibly formulate and solve optimal energy flow problems. For this `monee` currently uses [GEKKO](https://gekko.readthedocs.io/en/latest/) to solve these problems (further integrations are planned).

Further, there are unique key aspects of monee such as:
* Timeseries simulation
* Native support of multi-energy components as P2H/CHP/P2G
* Integration of networkx as main internal datastructure, this enables easy appliance of graph-based approaches.
* Modular component definitions
* Importing of MATPOWER networks
* Restricted import of [pandapower](pandapower.org) and therefore [simbench](simbench.de) networks.

# Installation

The `monee` framework is hosted on pypi, as such you can install it with:

```bash
pip install monee
```

# Examples

## Creating a network (express API)

```python
from monee import mx, run_energy_flow

# create multi-grid container the monee.Network
net = mx.create_multi_energy_network()

# electricity grid
bus_0 = mx.create_bus(net)
bus_1 = mx.create_bus(net)

mx.create_line(net, bus_0, bus_1, 100, r_ohm_per_m=0.00007, x_ohm_per_m=0.00007)
mx.create_ext_power_grid(net, bus_0)
mx.create_power_load(net, bus_1, 0.1, 0)

# water-based district heating grid
junc_0 = mx.create_water_junction(net)
junc_1 = mx.create_water_junction(net)
junc_2 = mx.create_water_junction(net)

mx.create_ext_hydr_grid(net, junc_0)
mx.create_water_pipe(net, junc_0, junc_1, diameter_m=0.12, length_m=100)
mx.create_sink(net, junc_2, mass_flow=1)

# creating connection between el and water grid
mx.create_p2h(net, bus_1, junc_1, junc_2, heat_energy_mw=0.1, diameter_m=0.1, efficiency=0.9)

# execute an energy flow calculating the energy flow for the whole MES
result = run_energy_flow(net)
```
