Skip to main content

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

Project description

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 to import into other applications or download the repo and its requirements directly, to run standalone.

Pip installing PyEHub:

pip install pyehub

Download the repo:

git clone https://gitlab.com/energyincities/pyehub.git

Install the libraries needed for PyEHub to run:

pip install -r requirements.txt

Also install glpk or another solver. 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.

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

pyehub-1.1.0.macosx-10.7-x86_64.tar.gz (96.0 kB view details)

Uploaded Source

Built Distribution

pyehub-1.1.0-py3-none-any.whl (55.4 kB view details)

Uploaded Python 3

File details

Details for the file pyehub-1.1.0.macosx-10.7-x86_64.tar.gz.

File metadata

  • Download URL: pyehub-1.1.0.macosx-10.7-x86_64.tar.gz
  • Upload date:
  • Size: 96.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for pyehub-1.1.0.macosx-10.7-x86_64.tar.gz
Algorithm Hash digest
SHA256 f77f41430c88df79d1819ab1c29434f64801f5da41059d7a868fd4064cbc4a06
MD5 b2dd9e15557daa39b86ad94da5f0cb32
BLAKE2b-256 29ef39816c9dba9509ed9a616b8224855a564d4960b788327e8cfc7fa3d6a58c

See more details on using hashes here.

File details

Details for the file pyehub-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyehub-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 55.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for pyehub-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e7007f8ce89eaa24ba69395638cfe36113d34d88e1914ece8c28c4a4846acf9
MD5 f3f58226193e73d74880bf01b8f37de0
BLAKE2b-256 d2049522b7bca0ebaaef9ddc4e9b4f8e5a550a717562affec7084909614b68dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page