Skip to content
Snippets Groups Projects
Commit 4568706c authored by Christoph von Oy's avatar Christoph von Oy
Browse files

Merge branch 'main' into dev_cvo_input_format

parents a762822b ebe9bc95
No related branches found
No related tags found
No related merge requests found
Showing
with 784 additions and 69 deletions
...@@ -8,7 +8,7 @@ __pycache__/ ...@@ -8,7 +8,7 @@ __pycache__/
# Distribution / packaging # Distribution / packaging
.Python .Python
env/ env/
build/ #build/
develop-eggs/ develop-eggs/
dist/ dist/
downloads/ downloads/
...@@ -51,7 +51,7 @@ coverage.xml ...@@ -51,7 +51,7 @@ coverage.xml
*.log *.log
# Sphinx documentation # Sphinx documentation
docs/_build/ #docs/_build/
# PyBuilder # PyBuilder
target/ target/
......
# This file is a template, and might need editing before it works on your project.
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml
# Official language image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/python/tags/
image: python:latest
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/topics/caching/
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
cache:
paths:
- .cache/pip
- venv/
before_script:
- python --version # For debugging
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
test:
script:
- python setup.py test
- pip install tox flake8 # you can also use tox
- tox -e py36,flake8
run:
script:
- python setup.py bdist_wheel
# an alternative approach is to install and run:
- pip install dist/*
# run the command here
artifacts:
paths:
- dist/*.whl
pages:
script:
- pip install sphinx sphinx-rtd-theme
- cd doc
- make html
- mv build/html/ ../public/
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
deploy:
stage: deploy
script: echo "Define your deployment script!"
environment: production
[submodule "Database_Connector"] [submodule "Database_Connector"]
path = Database_Connector path = Database_Connector
url = git@git-ce.rwth-aachen.de:ineed-dc/database-connector.git url = git@git-ce.rwth-aachen.de:focus/database-connector.git
[submodule "GUI"] [submodule "GUI"]
path = GUI path = GUI
url = git@git-ce.rwth-aachen.de:ineed-dc/gui.git url = git@git-ce.rwth-aachen.de:focus/gui.git
[submodule "Model_Library"] [submodule "Model_Library"]
path = Model_Library path = Model_Library
url = git@git-ce.rwth-aachen.de:ineed-dc/model-library.git url = git@git-ce.rwth-aachen.de:focus/model-library.git
[submodule "Tooling"] [submodule "Tooling"]
path = Tooling path = Tooling
url = git@git-ce.rwth-aachen.de:ineed-dc/tooling.git url = git@git-ce.rwth-aachen.de:focus/tooling.git
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
#conda:
# environment: envINEED_win.yml
sphinx:
configuration: docs/source/conf.py
formats: all
python:
install:
- requirements: docs/requirements.txt
# - method: pip
# path: .
# extra_requirements:
# - docs
# - method: pip
# path: another/package
system_packages: true
\ No newline at end of file
File added
File added
File added
File added
File added
File added
File added
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 40b373991915a6b3c9880faeef2f6aca
tags: 645f666f9bcd5a90fca523b33c5a78b7
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Development &mdash; FEN InEEd-DC 0.0.1 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Framework Structure" href="Framework%20Structure%20237a636d09a54d1592923b6127a04b8c.html" />
<link rel="prev" title="Installation" href="Installation%20004393c4782a4cf9b6bf8b7722ba7a9c.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> FEN InEEd-DC
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="Overview%209d9037b176744769a3404d91a14f4ee0.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="Installation%20004393c4782a4cf9b6bf8b7722ba7a9c.html">Installation</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Development</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#contribution-guidelines">Contribution Guidelines</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#branches">Branches</a></li>
<li class="toctree-l3"><a class="reference internal" href="#merge-into-main-branch">Merge into main branch</a></li>
<li class="toctree-l3"><a class="reference internal" href="#environment-file">Environment File</a></li>
<li class="toctree-l3"><a class="reference internal" href="#modeling-language">Modeling Language</a></li>
<li class="toctree-l3"><a class="reference internal" href="#programming-guidelines">Programming Guidelines</a></li>
<li class="toctree-l3"><a class="reference internal" href="#coding-style">Coding-Style</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Framework%20Structure%20237a636d09a54d1592923b6127a04b8c.html">Framework Structure</a></li>
<li class="toctree-l1"><a class="reference internal" href="module.html">Module Implementation</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">FEN InEEd-DC</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Development</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/Development ff4105c5c3a04acf898aa42fbe285afb.md.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="development">
<h1>Development<a class="headerlink" href="#development" title="Permalink to this heading"></a></h1>
<section id="contribution-guidelines">
<h2>Contribution Guidelines<a class="headerlink" href="#contribution-guidelines" title="Permalink to this heading"></a></h2>
<p>If you want to contribute to the prosumer model, please follow the rules and guidelines specified below:</p>
<section id="branches">
<h3>Branches<a class="headerlink" href="#branches" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p>All developing works should be done in personal branchs or feature branches. Please follow the name guidelines for creating new branches: <code class="docutils literal notranslate"><span class="pre">dev_&lt;NameAbbr&gt;</span></code> or <code class="docutils literal notranslate"><span class="pre">dev_&lt;feature&gt;</span></code>.</p></li>
<li><p>Merge requests to the <code class="docutils literal notranslate"><span class="pre">main</span></code> branch should be coordinated with other developers in advance.</p></li>
<li><p>The main branch will be updated at least every two weeks.</p></li>
</ul>
</section>
<section id="merge-into-main-branch">
<h3>Merge into main branch<a class="headerlink" href="#merge-into-main-branch" title="Permalink to this heading"></a></h3>
<p>For the update process (mergen) of main branch, the following instruction in 7 Steps has been presented and should be followed:</p>
<p>Importance:</p>
<ul class="simple">
<li><p>On principle, only functional codes can be merged. If this is not the case, put WIP (Work in progress) in the title of merge request.</p></li>
<li><p>Choose “Squash Commit” in the merge request so that the commit history will be set invisible.</p></li>
<li><p>Always use merge request to update work, so that the working history is tracable.</p></li>
</ul>
</section>
<section id="environment-file">
<h3>Environment File<a class="headerlink" href="#environment-file" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p>The environment file in the <code class="docutils literal notranslate"><span class="pre">main</span></code> branch should always be synchronized with the program and should be updated simultaneously with other files.</p></li>
<li><p>In order to keep the used third-party packages in a reasonable size, it is necessary to stay conservative when adding new packages.</p></li>
</ul>
</section>
<section id="modeling-language">
<h3>Modeling Language<a class="headerlink" href="#modeling-language" title="Permalink to this heading"></a></h3>
<p>The currently used modeling language is:</p>
<blockquote>
<div><p>pyomo: https://pyomo.readthedocs.io/en/stable/index.html</p>
</div></blockquote>
</section>
<section id="programming-guidelines">
<h3>Programming Guidelines<a class="headerlink" href="#programming-guidelines" title="Permalink to this heading"></a></h3>
<p><strong>!!To be done!!</strong>
A comprehensive discription on how new attributes/variables/constraints/objectives/sectors/components/prosumers/.. can be added and edited.</p>
</section>
<section id="coding-style">
<h3>Coding-Style<a class="headerlink" href="#coding-style" title="Permalink to this heading"></a></h3>
<ul class="simple">
<li><p>This project follows the Google Python Style Guide:</p></li>
</ul>
<blockquote>
<div><p>Google Python Style Guide: https://google.github.io/styleguide/pyguide.html#s2.6-nested</p>
</div></blockquote>
</section>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="Installation%20004393c4782a4cf9b6bf8b7722ba7a9c.html" class="btn btn-neutral float-left" title="Installation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="Framework%20Structure%20237a636d09a54d1592923b6127a04b8c.html" class="btn btn-neutral float-right" title="Framework Structure" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2022, FEN InEEd-DC Team.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Framework Structure &mdash; FEN InEEd-DC 0.0.1 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Module Implementation" href="module.html" />
<link rel="prev" title="Development" href="Development%20ff4105c5c3a04acf898aa42fbe285afb.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> FEN InEEd-DC
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="Overview%209d9037b176744769a3404d91a14f4ee0.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="Installation%20004393c4782a4cf9b6bf8b7722ba7a9c.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="Development%20ff4105c5c3a04acf898aa42fbe285afb.html">Development</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Framework Structure</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#main-folder">Main Folder</a></li>
<li class="toctree-l2"><a class="reference internal" href="#prosumer-library">Prosumer Library</a></li>
<li class="toctree-l2"><a class="reference internal" href="#component-library">Component Library</a></li>
<li class="toctree-l2"><a class="reference internal" href="#tools">Tools</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="module.html">Module Implementation</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">FEN InEEd-DC</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Framework Structure</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/Framework Structure 237a636d09a54d1592923b6127a04b8c.md.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="framework-structure">
<h1>Framework Structure<a class="headerlink" href="#framework-structure" title="Permalink to this heading"></a></h1>
<p>The project strcuture represents the structure of the developed prosumer model. The different parts and their internal structure is described in the following subsections:</p>
<section id="main-folder">
<h2>Main Folder<a class="headerlink" href="#main-folder" title="Permalink to this heading"></a></h2>
<p>The main folder contains the executive scripts, environment files as well as storage folders for simulation in- and outputs:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">main/</span></code></p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">runme.py</span></code> : Main script to build a prosumer model and run the optimization process and its subfuctions</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">envINEED.yml</span></code> : YAML-File defining the used Anaconca environment, i.e. required packages</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">input_files/</span></code> : Storage for input files</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">output_files/</span></code> : Storage for simulation results</p></li>
</ul>
</li>
</ul>
</section>
<section id="prosumer-library">
<h2>Prosumer Library<a class="headerlink" href="#prosumer-library" title="Permalink to this heading"></a></h2>
<p>The prosumer library is a supporting model database with prosumer models of different prosumer categories and their typical parameters. The prosumer library has been devided into two separate parts:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">prosumer_library/</span></code></p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">prosumer_models/</span></code> : This directory includes prosumer classes with different regulatory conditions. An algebraic optimization function set can be derived from a complete prosumer model. Therefore, the prosumers can be modified and optimized independently according to different technical and strategical conditions. A prosumer model has defined interfaces with other prosumer models and the supply network</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">prosumer_database/</span></code> : This directory includes the parameterization options for the prosumer models.</p></li>
</ul>
</li>
</ul>
</section>
<section id="component-library">
<h2>Component Library<a class="headerlink" href="#component-library" title="Permalink to this heading"></a></h2>
<p>The component library is also a supporting model database for prosumer modeling, which provides physical mathematical descriptions of commonly used electrical and thermal components and typical customary parameterization options for them. The prosumer model is incomplete without components and therefore not able to be simulated.</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">component_library/</span></code></p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">component_models/</span></code> : This directory includes the component models. These models are written in modeling language pyomo and the physical properties of each component are described as mathematical algebraic expressions (constraints) using the gramma of pyomo. These expressions are indispensible for the optimization function set.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">component_database/</span></code> : This directory includes the the parameters for the component models.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">BaseComponent.py</span></code> : This python class includes fundamental attributes, functions and constraints of different components except EMS component. All components except EMS should be established based on BaseComponent. The UML-Diagram <code class="docutils literal notranslate"><span class="pre">InEEd-DC_Components.drawio</span></code> shows the relationship between different component models.</p></li>
</ul>
</li>
</ul>
</section>
<section id="tools">
<h2>Tools<a class="headerlink" href="#tools" title="Permalink to this heading"></a></h2>
<p>To enrich the functionality of the product, we have created an extensive tool-kit which supports the prosumer modeling and optimizing procedure. In latest version, prediction generator, electrical profile generator are available. In future updates, more tools will be provided.</p>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="Development%20ff4105c5c3a04acf898aa42fbe285afb.html" class="btn btn-neutral float-left" title="Development" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="module.html" class="btn btn-neutral float-right" title="Module Implementation" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2022, FEN InEEd-DC Team.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Installation &mdash; FEN InEEd-DC 0.0.1 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Development" href="Development%20ff4105c5c3a04acf898aa42fbe285afb.html" />
<link rel="prev" title="Overview" href="Overview%209d9037b176744769a3404d91a14f4ee0.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> FEN InEEd-DC
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="Overview%209d9037b176744769a3404d91a14f4ee0.html">Overview</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#clone-repository">Clone Repository</a></li>
<li class="toctree-l2"><a class="reference internal" href="#install-environment">Install Environment</a></li>
<li class="toctree-l2"><a class="reference internal" href="#update-environment">Update Environment</a></li>
<li class="toctree-l2"><a class="reference internal" href="#update-the-yml-file">Update the yml file</a></li>
<li class="toctree-l2"><a class="reference internal" href="#install-optimizing-solvers">Install Optimizing Solvers</a></li>
<li class="toctree-l2"><a class="reference internal" href="#executing-prosumer-model">Executing Prosumer Model</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Development%20ff4105c5c3a04acf898aa42fbe285afb.html">Development</a></li>
<li class="toctree-l1"><a class="reference internal" href="Framework%20Structure%20237a636d09a54d1592923b6127a04b8c.html">Framework Structure</a></li>
<li class="toctree-l1"><a class="reference internal" href="module.html">Module Implementation</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">FEN InEEd-DC</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Installation</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/Installation 004393c4782a4cf9b6bf8b7722ba7a9c.md.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="installation">
<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this heading"></a></h1>
<section id="clone-repository">
<h2>Clone Repository<a class="headerlink" href="#clone-repository" title="Permalink to this heading"></a></h2>
<p><code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">clone</span> <span class="pre">--recurse-submodule</span> <span class="pre">git&#64;git-ce.rwth-aachen.de:ineed-dc/ineed-dc-framework.git</span></code></p>
</section>
<section id="install-environment">
<h2>Install Environment<a class="headerlink" href="#install-environment" title="Permalink to this heading"></a></h2>
<p>A collection of all required packages is given by the Anaconda environments defined in <code class="docutils literal notranslate"><span class="pre">envINEED_win.yml</span></code> and <code class="docutils literal notranslate"><span class="pre">envINEED_linux.yml</span></code>. To create a local environment from file execute:</p>
<p><code class="docutils literal notranslate"><span class="pre">conda</span> <span class="pre">env</span> <span class="pre">create</span> <span class="pre">-f</span> <span class="pre">envINEED_win.yml</span></code></p>
<p>or for Linux operating systems:</p>
<p><code class="docutils literal notranslate"><span class="pre">conda</span> <span class="pre">env</span> <span class="pre">create</span> <span class="pre">-f</span> <span class="pre">envINEED_linux.yml</span></code></p>
</section>
<section id="update-environment">
<h2>Update Environment<a class="headerlink" href="#update-environment" title="Permalink to this heading"></a></h2>
<p>Errors may occur when the local environment is not up-to-date. To update the local environment from <code class="docutils literal notranslate"><span class="pre">envINEED_win.yml</span></code> or <code class="docutils literal notranslate"><span class="pre">envINEED_linux.yml</span></code> execute:</p>
<p><code class="docutils literal notranslate"><span class="pre">conda</span> <span class="pre">activate</span> <span class="pre">envINEED</span> <span class="pre">conda</span> <span class="pre">env</span> <span class="pre">update</span> <span class="pre">--file</span> <span class="pre">envINEED_win.yml</span></code></p>
<p>or for linux operating systems:</p>
<p><code class="docutils literal notranslate"><span class="pre">conda</span> <span class="pre">activate</span> <span class="pre">envINEED</span> <span class="pre">conda</span> <span class="pre">env</span> <span class="pre">create</span> <span class="pre">--file</span> <span class="pre">envINEED_linux.yml</span></code></p>
</section>
<section id="update-the-yml-file">
<h2>Update the yml file<a class="headerlink" href="#update-the-yml-file" title="Permalink to this heading"></a></h2>
<p>If you have installed new packages during the development and excution of the program, you should think of updating the yml environment file in both windows and linux systems (or at least contact Jingyu or Felix regarding this) as well. To export the new environment.yml file, excute:</p>
<p><code class="docutils literal notranslate"><span class="pre">conda</span> <span class="pre">activate</span> <span class="pre">envINEED</span> <span class="pre">conda</span> <span class="pre">env</span> <span class="pre">export</span> <span class="pre">&gt;</span> <span class="pre">envINEED_win.yml</span></code></p>
<p>or for linux operating systems:</p>
<p><code class="docutils literal notranslate"><span class="pre">conda</span> <span class="pre">activate</span> <span class="pre">envINEED</span> <span class="pre">conda</span> <span class="pre">env</span> <span class="pre">export</span> <span class="pre">&gt;</span> <span class="pre">envINEED_linux.yml</span></code></p>
</section>
<section id="install-optimizing-solvers">
<h2>Install Optimizing Solvers<a class="headerlink" href="#install-optimizing-solvers" title="Permalink to this heading"></a></h2>
<p>The applied modeling language Pyomo supports a wide variety of solvers. Pyomo has specialized interfaces to some solvers (for example, BARON, CBC, CPLEX, and Gurobi). It also has generic interfaces that support calling any solver that can read AMPL “.nl” and write “.sol” files and the ability to generate GAMS-format models and retrieve the results. You can get the current list of supported solvers using the pyomo command:</p>
<p><code class="docutils literal notranslate"><span class="pre">pyomo</span> <span class="pre">help</span> <span class="pre">--solvers</span></code></p>
<p>Three solvers are recommended by the developers of this programm, Gurobi, glpk, CBC and ipopt. Gurobi glpk and CBC are used in preference when try to solve a LP problem. Although Gurobi usually works more efficient than glpk anc CBC, it requires a commercial license. The solver Ipopt can be applied when the problem is non-linear. The solvers are not installed by default in the environment envINEED. Thus, execute the following command to install the solvers by need:</p>
<p><strong>GLPK (GNU Linear Programming Kit)</strong></p>
<p><code class="docutils literal notranslate"><span class="pre">conda</span> <span class="pre">install</span> <span class="pre">-c</span> <span class="pre">conda-forge</span> <span class="pre">glpk</span></code></p>
<p><strong>CBC (Coin-or branch and cut)</strong>
The easiest way to use CBC is to download its stand-alone executable and install/put it in your local environment (envs/envINEED/bin). The download page is: <a class="reference external" href="https://ampl.com/products/solvers/open-source/#cbc">https://ampl.com/products/solvers/open-source/#cbc</a>.</p>
<p><strong>Ipopt (Interior Point Optimizer)</strong>
You can also download ipopt executable for direct use from the website <a class="reference external" href="https://ampl.com/products/solvers/open-source/#ipopt">https://ampl.com/products/solvers/open-source/#ipopt</a>. Alternatively, you can run the following command in terminal to install ipopt package with conda:</p>
<p><code class="docutils literal notranslate"><span class="pre">conda</span> <span class="pre">install</span> <span class="pre">-c</span> <span class="pre">conda-forge</span> <span class="pre">ipopt=3.11.1</span></code></p>
<p>To use <strong>Gurobi</strong> you should first request a license on <a class="reference external" href="https://www.gurobi.com/downloads/">https://www.gurobi.com/downloads/</a>. To install the license on a computer where Gurobi Optimizer is installed, copy and paste the command (You can find it on the license page.) to the Start/Run menu (Windows only) or a command/terminal prompt (any system):</p>
<p><code class="docutils literal notranslate"><span class="pre">grbgetkey</span> <span class="pre">xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</span></code></p>
</section>
<section id="executing-prosumer-model">
<h2>Executing Prosumer Model<a class="headerlink" href="#executing-prosumer-model" title="Permalink to this heading"></a></h2>
<p><code class="docutils literal notranslate"><span class="pre">python3</span> <span class="pre">runme.py</span></code></p>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="Overview%209d9037b176744769a3404d91a14f4ee0.html" class="btn btn-neutral float-left" title="Overview" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="Development%20ff4105c5c3a04acf898aa42fbe285afb.html" class="btn btn-neutral float-right" title="Development" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2022, FEN InEEd-DC Team.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview &mdash; FEN InEEd-DC 0.0.1 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Installation" href="Installation%20004393c4782a4cf9b6bf8b7722ba7a9c.html" />
<link rel="prev" title="Welcome to FEN InEEd-DC’s documentation!" href="index.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> FEN InEEd-DC
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="Installation%20004393c4782a4cf9b6bf8b7722ba7a9c.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="Development%20ff4105c5c3a04acf898aa42fbe285afb.html">Development</a></li>
<li class="toctree-l1"><a class="reference internal" href="Framework%20Structure%20237a636d09a54d1592923b6127a04b8c.html">Framework Structure</a></li>
<li class="toctree-l1"><a class="reference internal" href="module.html">Module Implementation</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">FEN InEEd-DC</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Overview</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/Overview 9d9037b176744769a3404d91a14f4ee0.md.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="overview">
<h1>Overview<a class="headerlink" href="#overview" title="Permalink to this heading"></a></h1>
<p>This repository includes the thermal and electtrical sectors of prosumer model for the FEN2 InEEd-DC Project. The source code of the model including all required libraries as well as a collection of tools can be found in the repositories structure. <strong>This project is constantly under devlopment, so this README might not represent or include all the latest developments comprehensively.</strong></p>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="index.html" class="btn btn-neutral float-left" title="Welcome to FEN InEEd-DC’s documentation!" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="Installation%20004393c4782a4cf9b6bf8b7722ba7a9c.html" class="btn btn-neutral float-right" title="Installation" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2022, FEN InEEd-DC Team.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>
\ No newline at end of file
# Development
## Contribution Guidelines
If you want to contribute to the prosumer model, please follow the rules and guidelines specified below:
### Branches
- All developing works should be done in personal branchs or feature branches. Please follow the name guidelines for creating new branches: `dev_<NameAbbr>` or `dev_<feature>`.
- Merge requests to the `main` branch should be coordinated with other developers in advance.
- The main branch will be updated at least every two weeks.
### Merge into main branch
For the update process (mergen) of main branch, the following instruction in 7 Steps has been presented and should be followed:
Importance:
- On principle, only functional codes can be merged. If this is not the case, put WIP (Work in progress) in the title of merge request.
- Choose "Squash Commit" in the merge request so that the commit history will be set invisible.
- Always use merge request to update work, so that the working history is tracable.
### Environment File
- The environment file in the `main` branch should always be synchronized with the program and should be updated simultaneously with other files.
- In order to keep the used third-party packages in a reasonable size, it is necessary to stay conservative when adding new packages.
### Modeling Language
The currently used modeling language is:
> pyomo: https://pyomo.readthedocs.io/en/stable/index.html
>
### Programming Guidelines
**!!To be done!!**
A comprehensive discription on how new attributes/variables/constraints/objectives/sectors/components/prosumers/.. can be added and edited.
### Coding-Style
- This project follows the Google Python Style Guide:
> Google Python Style Guide: https://google.github.io/styleguide/pyguide.html#s2.6-nested
>
\ No newline at end of file
# Framework Structure
The project strcuture represents the structure of the developed prosumer model. The different parts and their internal structure is described in the following subsections:
### Main Folder
The main folder contains the executive scripts, environment files as well as storage folders for simulation in- and outputs:
- `main/`
- `runme.py` : Main script to build a prosumer model and run the optimization process and its subfuctions
- `envINEED.yml` : YAML-File defining the used Anaconca environment, i.e. required packages
- `input_files/` : Storage for input files
- `output_files/` : Storage for simulation results
### Prosumer Library
The prosumer library is a supporting model database with prosumer models of different prosumer categories and their typical parameters. The prosumer library has been devided into two separate parts:
- `prosumer_library/`
- `prosumer_models/` : This directory includes prosumer classes with different regulatory conditions. An algebraic optimization function set can be derived from a complete prosumer model. Therefore, the prosumers can be modified and optimized independently according to different technical and strategical conditions. A prosumer model has defined interfaces with other prosumer models and the supply network
- `prosumer_database/` : This directory includes the parameterization options for the prosumer models.
### Component Library
The component library is also a supporting model database for prosumer modeling, which provides physical mathematical descriptions of commonly used electrical and thermal components and typical customary parameterization options for them. The prosumer model is incomplete without components and therefore not able to be simulated.
- `component_library/`
- `component_models/` : This directory includes the component models. These models are written in modeling language pyomo and the physical properties of each component are described as mathematical algebraic expressions (constraints) using the gramma of pyomo. These expressions are indispensible for the optimization function set.
- `component_database/` : This directory includes the the parameters for the component models.
- `BaseComponent.py` : This python class includes fundamental attributes, functions and constraints of different components except EMS component. All components except EMS should be established based on BaseComponent. The UML-Diagram `InEEd-DC_Components.drawio` shows the relationship between different component models.
### Tools
To enrich the functionality of the product, we have created an extensive tool-kit which supports the prosumer modeling and optimizing procedure. In latest version, prediction generator, electrical profile generator are available. In future updates, more tools will be provided.
\ No newline at end of file
# Installation
### Clone Repository
`git clone --recurse-submodule git@git-ce.rwth-aachen.de:ineed-dc/ineed-dc-framework.git`
### Install Environment
A collection of all required packages is given by the Anaconda environments defined in `envINEED_win.yml` and `envINEED_linux.yml`. To create a local environment from file execute:
`conda env create -f envINEED_win.yml`
or for Linux operating systems:
`conda env create -f envINEED_linux.yml`
### Update Environment
Errors may occur when the local environment is not up-to-date. To update the local environment from `envINEED_win.yml` or `envINEED_linux.yml` execute:
`conda activate envINEED
conda env update --file envINEED_win.yml`
or for linux operating systems:
`conda activate envINEED
conda env create --file envINEED_linux.yml`
### Update the yml file
If you have installed new packages during the development and excution of the program, you should think of updating the yml environment file in both windows and linux systems (or at least contact Jingyu or Felix regarding this) as well. To export the new environment.yml file, excute:
`conda activate envINEED
conda env export > envINEED_win.yml`
or for linux operating systems:
`conda activate envINEED
conda env export > envINEED_linux.yml`
### Install Optimizing Solvers
The applied modeling language Pyomo supports a wide variety of solvers. Pyomo has specialized interfaces to some solvers (for example, BARON, CBC, CPLEX, and Gurobi). It also has generic interfaces that support calling any solver that can read AMPL “.nl” and write “.sol” files and the ability to generate GAMS-format models and retrieve the results. You can get the current list of supported solvers using the pyomo command:
`pyomo help --solvers`
Three solvers are recommended by the developers of this programm, Gurobi, glpk, CBC and ipopt. Gurobi glpk and CBC are used in preference when try to solve a LP problem. Although Gurobi usually works more efficient than glpk anc CBC, it requires a commercial license. The solver Ipopt can be applied when the problem is non-linear. The solvers are not installed by default in the environment envINEED. Thus, execute the following command to install the solvers by need:
**GLPK (GNU Linear Programming Kit)**
`conda install -c conda-forge glpk`
**CBC (Coin-or branch and cut)**
The easiest way to use CBC is to download its stand-alone executable and install/put it in your local environment (envs/envINEED/bin). The download page is: [https://ampl.com/products/solvers/open-source/#cbc](https://ampl.com/products/solvers/open-source/#cbc).
**Ipopt (Interior Point Optimizer)**
You can also download ipopt executable for direct use from the website [https://ampl.com/products/solvers/open-source/#ipopt](https://ampl.com/products/solvers/open-source/#ipopt). Alternatively, you can run the following command in terminal to install ipopt package with conda:
`conda install -c conda-forge ipopt=3.11.1`
To use **Gurobi** you should first request a license on [https://www.gurobi.com/downloads/](https://www.gurobi.com/downloads/). To install the license on a computer where Gurobi Optimizer is installed, copy and paste the command (You can find it on the license page.) to the Start/Run menu (Windows only) or a command/terminal prompt (any system):
`grbgetkey xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
### Executing Prosumer Model
`python3 runme.py`
\ No newline at end of file
# Overview
This repository includes the thermal and electtrical sectors of prosumer model for the FEN2 InEEd-DC Project. The source code of the model including all required libraries as well as a collection of tools can be found in the repositories structure. **This project is constantly under devlopment, so this README might not represent or include all the latest developments comprehensively.**
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment