Skip to main content

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. Windows installation instructions here

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.

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 <your-branch-name>
git checkout <your-branch-name>

Once you are done, please submit a pull request.

Metadata

Release files for pyehub 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyehub 1.5.0
File Size Uploaded
pyehub-1.5.0.tar.gz 53.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyehub 1.5.0
File Interpreter ABI Platform
pyehub-1.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 117.5 kB

Release files / pyehub-1.5.0.tar.gz

Download URL pyehub-1.5.0.tar.gz
Size 53.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a32515283c52c569a5ac5a2a56f9380a356b906e096c813a0ed6fa688eb45224
BLAKE2b-256 checksum
How to use checksums
1137e1fc5f4d38eedaa1c406f0c0ca01ae0316eca149ad4b9fb3a250eeae9253
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / pyehub-1.5.0-py3-none-any.whl

Download URL pyehub-1.5.0-py3-none-any.whl
Size 64.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
09b9f8f2fde64c928c9eaa9ff4e2443210aba14860a3a9d82117b69f3a9c6f93
BLAKE2b-256 checksum
How to use checksums
0ac7b7555592cf9193882c7553dc96d6480d78b3cbc2361fc157e683e3464595
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release history Release notifications | RSS feed

This release

1.5.0 This release

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page