Skip to main content

deflex - flexible multi-regional energy system model for heat, power and mobility

Project description

https://travis-ci.com/reegis/deflex.svg?branch=master https://coveralls.io/repos/github/reegis/deflex/badge.svg?branch=master https://img.shields.io/lgtm/grade/python/g/reegis/deflex.svg?logo=lgtm&logoWidth=18 https://img.shields.io/lgtm/alerts/g/reegis/deflex.svg?logo=lgtm&logoWidth=18 https://img.shields.io/badge/automatic%20code%20style-black-blueviolet https://img.shields.io/badge/licence-MIT-blue https://zenodo.org/badge/DOI/10.5281/zenodo.3572594.svg

deflex - flexible multi-regional energy system model forheat, power and mobility

  • Free software: MIT license

Warning

deflex is currently under revision. If you are planning to use deflex in the future you should install the upcoming version (see below)!

Installation

We will publish a stable version soon. Until then we recommend to install the already working beta version:

pip install https://github.com/reegis/deflex/archive/revise_deflex.zip

Use the latest stable (PhD) version of deflex to run older scenarios:

pip install https://github.com/reegis/deflex/archive/phd.zip

Additional requirements

The basic installation can be used to compute scenarios (csv, xls, xlsx). For some functions additional packages are needed.

  1. To run the example with all plots you need the following packages:
    • pygeos (spatial operations)
    • geopandas (maps)
    • descartes (plot maps with matplotlib)
    • lmfit (linear fit)
    • matplotlib (plotting)
    • requests (download example files)

    pip install deflex[example]

  2. To use the maps of the polygons, transmission lines etc.:
    • pygeos (spatial operations)
    • geopandas (maps)

    pip install deflex[map]

  3. To develop deflex:
    • pytest
    • sphinx
    • sphinx_rtd_theme
    • pygeos
    • geopandas
    • requests

    pip install deflex[dev]

Basic usage

scenario = "/path/to/my/scenario.xls"
main.model_scenario(scenario)

Use example

  1. Create a local directory (e.g. /home/user/my_example).
  2. Download the example to this new directory.
  3. Now execute the example file. The script will download some example scenarios with results and show some exemplary plots.
  4. A directory “deflex_examples” will be created in you home directory. Use print(os.path.expanduser("~")) to find out where your home directory is located. If you want to change it replace the base path in the example:
- BASEPATH = os.path.join(os.path.expanduser("~"), "deflex_examples")
+ BASEPATH = "/your/favoured/path/"

Documentation

https://deflex.readthedocs.io/

The documentation of deflex is powered by readthedocs.

Go to the download page to download different versions and formats (pdf, html, epub) of the documentation.

Contributing

We are warmly welcoming all who want to contribute to the deflex library.

Citing deflex

Go to the Zenodo page of deflex to find the DOI of your version. To cite all deflex versions use:

https://zenodo.org/badge/DOI/10.5281/zenodo.3572594.svg

Development

To run all the tests run:

tox

Note, to combine the coverage data from all the tox environments run:

Windows
set PYTEST_ADDOPTS=--cov-append
tox
Other
PYTEST_ADDOPTS=--cov-append tox

Changelog

0.2.0 (2021-01-25)

  • Move basic scenario with reegis dependency to new package
  • Revise structure
  • Add tox tests: pyflake, docs, coverage, tests, link-test, manifest, isort

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for deflex, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size deflex-0.2.0-py2.py3-none-any.whl (13.0 MB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size deflex-0.2.0.tar.gz (36.7 MB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page