deflex - flexible multi-regional energy system model for heat, power and mobility
Project description
deflex - flexible multi-regional energy system model forheat, power and mobility
Free software: MIT license
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.
- 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]
- To use the maps of the polygons, transmission lines etc.:
pygeos (spatial operations)
geopandas (maps)
pip install deflex[map]
- 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
Create a local directory (e.g. /home/user/my_example).
Download the example to this new directory.
Now execute the example file. The script will download some example scenarios with results and show some exemplary plots.
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:
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for deflex-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7dec1104bbdca0da1a990c69f8fb73036331135ce783474af801a8b98e338e4 |
|
MD5 | 0874e06eaf0b6e56e2d6c7eae153cfd7 |
|
BLAKE2b-256 | 5bba8d24d8571dee5b8762c44a0961285c42e49145a93e84949cd2c09397289a |