rl-institut / multi-vector-simulator

Multi-vector Simulation Tool assessing and optimizing Local Energy Systems (LES) for the E-LAND project
GNU General Public License v2.0
21 stars 10 forks source link
oemof

################################################## MVS - Multi-Vector Simulator of the E-LAND toolbox ##################################################

|badge_docs| |badge_CI| |badge_coverage| |badge_zenodo| |badge_pypi| |badge_gpl2| |badge_black|

Rights: Reiner Lemoine Institut (Berlin) <https://reiner-lemoine-institut.de/>__

The Multi-Vector Simulator (MVS) allows the evaluation of local sector-coupled energy systems that include the energy carriers electricity, heat and/or gas. The MVS has three main features:

The tool is being developed within the scope of the H2020 project E-LAND (Integrated multi-vector management system for Energy isLANDs, project homepage <https://elandh2020.eu/>__). A graphical user interface for the MVS will be integrated.

Latest release: Check the latest release <https://github.com/rl-institut/multi-vector-simulator/releases/latest>. Please check the CHANGELOG.md <https://github.com/rl-institut/multi-vector-simulator/blob/master/CHANGELOG.md> for past updates and changes.

You find advanced documentation of the MVS on readthedocs <https://multi-vector-simulator.readthedocs.io/en/stable/> (stable version, latest developments here <https://multi-vector-simulator.readthedocs.io/en/latest/>).

Disclaimer: As the MVS is still under development, changes might still occur in the code as well as code structure. If you want to try the MVS, please make sure to check this project regularly.

If you are interested to try out the code, please feel free to do so! In case that you are planning to use it for a specific or a larger-scale project, we would be very happy if you would get in contact with us, eg. via creating a github issue. Maybe you have ideas that can help the MVS move forward? Maybe you noticed a bug that we can resolve?

For advanced programmers: You can also use the dev branch that includes the latest updates and changes. You find the changelog HERE <https://github.com/rl-institut/multi-vector-simulator/blob/dev/CHANGELOG.md>__.

.. |badge_docs| image:: https://readthedocs.org/projects/multi-vector-simulator/badge/?version=latest :target: https://multi-vector-simulator.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

.. |badge_CI| image:: https://github.com/rl-institut/multi-vector-simulator/workflows/CI/badge.svg :alt: Build status

.. |badge_coverage| image:: https://coveralls.io/repos/github/rl-institut/multi-vector-simulator/badge.svg :target: https://coveralls.io/github/rl-institut/multi-vector-simulator :alt: Test coverage

.. |badge_zenodo| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.4610237.svg :target: https://doi.org/10.5281/zenodo.4610237 :alt: Zenodo DOI

.. |badge_gpl2| image:: https://img.shields.io/badge/License-GPL%20v2-blue.svg :target: https://img.shields.io/badge/License-GPL%20v2-blue.svg :alt: License gpl2

.. |badge_pypi| image:: https://badge.fury.io/py/multi-vector-simulator.svg :target: https://pypi.org/project/multi-vector-simulator/ :alt: Pypi version

.. |badge_black| image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black :alt: black linter

======================== Getting started with MVS

Setup

To set up the MVS, follow the steps below:

This should create a folder MVS_outputs with the example simulation's results

You can always check which version you installed with the following command

mvs_tool --version

Using the MVS

To run the MVS with custom inputs you have several options:

Use the command line

Edit the json input file (or csv files) and run

::

mvs_tool -i path_input_folder -ext json -o path_output_folder

With path_input_folder: path to folder with input data,

ext: json for using a json file and csv for using csv files

and path_output_folder: path of the folder where simulation results should be stored.

For more information about the possible command lines options

::

mvs_tool -h

Use the main() function

You can also execute the mvs within a script, for this you need to import

::

from multi_vector_simulator.cli import main

The possible arguments to this functions are:

Edit the csv files (or, for devs, the json file) and run the main() function. The following kwargs are possible:

Default settings

If you execute the mvs_tool command in a path where there is a folder named inputs (you can use the folder input_template for inspiration) this folder will be taken as default input folder and you can simply run

::

mvs_tool

A default output folder will be created, if you run the same simulation several time you would have to either overwrite the existing output file with

::

mvs_tool -f

Or provide another output folder's path

::

mvs_tool -o <path_to_other_output_folder>

.. _pdf-report-commands:

Generate pdf report or an app in your browser to visualise the results of the simulation

To use the report feature you need to install extra dependencies first

::

pip install multi-vector-simulator[report]

If you are using zsh terminals and recieve the error message "no matches found", you might need to run

::

pip install 'multi-vector-simulator[report]'

Use the option -pdf in the command line mvs_tool to generate a pdf report in a simulation's output folder (by default in MVS_outputs/report/simulation_report.pdf):

::

mvs_tool -pdf

Use the option -png in the command line mvs_tool to generate png figures of the results in the simulation's output folder (by default in MVS_outputs/):

::

mvs_tool -png

To generate a report of the simulation's results, run the following command after a simulation generated an output folder:

::

mvs_report -i path_simulation_output_folder -o path_pdf_report

where path_simulation_output_folder should link to the folder of your simulation's output, or directly to a json file (default MVS_outputs/json_input_processed.json) and path_pdf_report is the path where the report should be saved as a pdf file.

The report should appear in your browser (at http://127.0.0.1:8050) as an interactive Plotly Dash app.

You can then print the report via your browser print functionality (ctrl+p), however the layout of the pdf report is only well optimized for chrome or chromium browser.

It is also possible to automatically save the report as pdf by using the option -pdf

::

mvs_report -i path_simulation_output_folder -pdf

By default, it will save the report in a report folder within your simulation's output folder default (MVS_outputs/report/). See mvs_report -h for more information about possible options. The css and images used to make the report pretty should be located under report/assets.

Contributing and additional information for developers

If you want to contribute to this project, please read CONTRIBUTING.md <https://github.com/rl-institut/multi-vector-simulator/blob/dev/CONTRIBUTING.md>. For less experienced github users, we propose a workflow <https://github.com/rl-institut/multi-vector-simulator/wiki/Examplary-Workflow>.

For advanced programmers: please checkout the dev branch that includes the latest updates and changes. You can find out about the latest changes in the CHANGELOG.md file <https://github.com/rl-institut/multi-vector-simulator/blob/dev/CHANGELOG.md>__.