A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

pyehub

A Python-based, modular and nestable implementation of the Energy Hub model (balancing demand and supply, system capacity sizing and network flows using Mixed-Integer Linear Programming).
https://gitlab.com/energyincities/python-ehub

Category: Energy Systems
Sub Category: Grid Management and Microgrid

Last synced: about 18 hours ago
JSON representation

Repository metadata

A python-based, modular and nestable implementation of the Energy Hub model (balancing demand and supply, system capacity sizing and network flows using Mixed-Integer Linear Programming).

https://gitlab.com/energyincities/python-ehub/blob/master/

          PyHub
=====

A program to solve an energy hub model in Python.

Requirements
------------

- Python 3.7.3
- pip for Python 3.7.3
- `GLPK` or another solver supported by PyLP

Running a Model
---------------

To run a energy hub model, use the `General_input.xlsx` file to enter your data.
The data **must** be in the same format.

Check the `config.yaml` file to see if the input file and output file is where
you want to load and output the results of the model respectively.

While inside the `config.yaml` file, be sure to set the settings for using a
specific solver that is installed on your system.
The default one is `glpk` with some options, but you can set it to any other
solver that is supported by PyLP.

Once you have configured the `config.yaml` file, run:
```
python run.py
```
to solve the model.
The results should be in the file you specified in `config.yaml`.

Development
-----------

### Installation

To install PyHub, either pip install PyEHub
or download the repo and its requirements directly.

Pip installing PyEHub:

```
pip install pyehub
```

Download the repo:
```
git clone https://gitlab.com/energyincities/python-ehub
```

Install the libraries needed for PyEHub to run:
```
pip install -r requirements.txt
```

Also install GLPK or another Pulp supporting solver.
Can be found [here](https://www.gnu.org/software/glpk/).
Windows installation instructions [here](http://www.osemosys.org/uploads/1/8/5/0/18504136/glpk_installation_guide_for_windows10_-_201702.pdf)


Edit the `config.yaml` file to use a selected solver.

Run the `run.py` script to see if everything works.
```
python run.py
```

### Docs

Can be found [here](docs/explanation.md).

Contributing
------------

### Features/Bug fixes

If you are fixing a bug or making a new feature, first get the lastest master branch.
```
git checkout master
git pull
```

Then create your own branch for you to work on:
```
git branch 
git checkout 
```

Once you are done, please submit a pull request.



        

Committers metadata

Last synced: 9 months ago

Total Commits: 470
Total Committers: 23
Avg Commits per committer: 20.435
Development Distribution Score (DDS): 0.736

Commits in past year: 3
Committers in past year: 1
Avg Commits per committer in past year: 3.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
Grey Hill i****h@g****m 124
Unknown j****h@s****a 59
bmorvaj b****j@g****m 51
Polina p****y@g****m 43
Grey Hill g****l@u****a 38
Theo Christiaanse t****i@u****a 32
Madhur Panwar m****r@g****m 27
Ross Alexandra r****s@h****m 15
Soumyadip Ghosh g****5@g****m 14
azinrh a****h@u****a 12
Chase p****3@g****m 11
Bryan Eriksson b****3@g****m 11
ABollinger A****r@u****m 6
Mark Hills m****6@u****a 5
revins r****s@u****a 5
Andrew a****r@e****h 3
Theodor Christiaanse t****i@c****a 3
Will w****t@u****a 3
Benjamin Tyler Becker t****r@s****a 2
Grey Hill i****o@g****m 2
ralphevins r****s@g****m 2
Paul Kovacs p****s@u****a 1
Tyler Becker t****r@u****a 1

Committer domains:


Issue and Pull Request metadata

Last synced: 9 months ago

Total issues: 5
Total pull requests: 11
Average time to close issues: 8 months
Average time to close pull requests: 16 minutes
Total issue authors: 4
Total pull request authors: 5
Average comments per issue: 0.4
Average comments per pull request: 0.73
Merged pull request: 0
Bot issues: 0
Bot pull requests: 0

Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://gitlab.com/energyincities/python-ehub

Top Issue Authors

  • fledee (2)
  • pkovacs (1)
  • psagarriga (1)
  • will0 (1)

Top Pull Request Authors

  • greyhillman (6)
  • bryaneriksson3 (2)
  • revins (1)
  • xm-evanguo (1)
  • theochri (1)

Top Issue Labels

  • Status :: New (1)
  • Type :: Bug (1)

Top Pull Request Labels


Package metadata

pypi.org: pyehub

A library used to solve an energy hub model in Python.

  • Homepage: https://gitlab.com/energyincities/python-ehub
  • Documentation: https://pyehub.readthedocs.io/
  • Licenses: GNU General Public License (GPL)
  • Latest release: 1.5.0 (published over 2 years ago)
  • Last Synced: 2025-04-26T14:35:50.460Z (2 days ago)
  • Versions: 15
  • Dependent Packages: 1
  • Dependent Repositories: 3
  • Downloads: 530 Last month
  • Docker Downloads: 16
  • Rankings:
    • Dependent packages count: 3.244%
    • Docker downloads count: 3.552%
    • Dependent repos count: 9.143%
    • Average: 13.855%
    • Downloads: 16.851%
    • Stargazers count: 20.382%
    • Forks count: 29.957%
  • Maintainers (1)
pypi.org: pymilp

A linear problem modeler and optimizer using PuLP

  • Homepage: https://gitlab.com/energyincities/python-ehub/tree/master/pyMILP
  • Documentation: https://pymilp.readthedocs.io/
  • Licenses: gpl-3.0+
  • Latest release: 1.0.0 (published about 6 years ago)
  • Last Synced: 2025-04-26T14:35:50.309Z (2 days ago)
  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 45 Last month
  • Rankings:
    • Dependent packages count: 7.31%
    • Stargazers count: 20.382%
    • Dependent repos count: 22.088%
    • Forks count: 29.957%
    • Average: 31.269%
    • Downloads: 76.611%
  • Maintainers (1)

Dependencies

requirements.txt pypi
  • PyYAML *
  • contexttimer *
  • jsonschema *
  • matplotlib *
  • numpy *
  • openpyxl *
  • pandas *
  • pulp *
  • pylint *
  • xlrd *
setup.py pypi
  • PyYAML *
  • contexttimer *
  • jsonschema *
  • numpy *
  • openpyxl *
  • pandas *
  • pulp *
  • pylint *
  • xlrd *

Score: 11.474995118935094