Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Click on the badge to get to the compiled version of the mathematical documentat

To write the documentation, use an editor of your choice and add your formulas in the respective rst file in `doc/source/frameworks`.

Graph descriptions written in the DOT language are rendered with a sphinx extension, that requires Graphviz, a cross-platform open source graph visualization software, that can be downloaded from [here](https://graphviz.org/).

Compiling is done by sphinx, therefore you need a python environment.
If you use conda, you can install the necessary packages doing the following steps:

Expand All @@ -14,6 +16,6 @@ If you use conda, you can install the necessary packages doing the following ste
3. Install it via conda by `conda env create -f mathdoc.yml`.
4. Each time you open a new terminal for compiling, you can activate the environment by `conda activate mathdoc`.

You can build the html pages by simply running while you are in the `doc` folder (ensure that you have a subfolder in `doc` named `build` and a subfolder named `_static` in `doc/source`):
You can build the html pages with the following command while you are in the `doc` folder (ensure that you have a subfolder in `doc` named `build` and a subfolder named `_static` in `doc/source`). Make sure to update the `graphviz_dot` argument to point to the correct location of the `dot` executable on your system:

sphinx-build -b html source build
sphinx-build -b html -D graphviz_dot=C:\path\to\dot.exe source build
3 changes: 2 additions & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'fluiddoc.mathmacro'
'fluiddoc.mathmacro',
'sphinx.ext.graphviz'
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
63 changes: 62 additions & 1 deletion doc/source/frameworks/technologies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,84 @@
representing a unique parameter or variable name. The definition of sets is
also part of `../notation.rst`.

.. sphinx.ext.graphviz

.. Sources
https://graphviz.org/doc/info/attrs.html
https://stackoverflow.com/questions/14873205/horizontal-trees-in-graphviz
https://stackoverflow.com/questions/6450765/how-do-you-center-a-title-for-a-diagram-output-to-svg-using-dot

.. `dot2tex` could perhaps be integrated in the graphviz extension to allow
for LaTEX labels.

Modelling of technologies
=========================
Here the framework's representations of technologies are shown

VRE-units
*********

.. graphviz::

digraph G {
rankdir="LR";
node [ shape=box ];

i -> box [ label="Curtailment" ];
box -> o [ label="Electricity\nproduction" ];

i [ style="invis" ];
o [ style="invis" ];
box [ label="Parameters:\nProfile\nFull load hours"];

label="Used in: Balmorel"
}

.. figure:: images/balmorel_VRE.png
:width: 70 %

Used in: Balmorel


.. graphviz::

digraph G {
rankdir="LR";
node [ shape=box ];

i1 -> box ;
i2 -> box ;
box -> o1 ;
box -> o2 ;

i1 [ label="Capacity Factor" ];
i2 [ label="Electricity Demand" ];
o1 [ label="Electricity Output" ];
o2 [ label="Cost (FixOM, VarOM)" ];
box [ label="Parameters:\ncapacity\nefficiency\ncost\nlifetime\nOaM-rate\nbidirectional"];

label="Used in: GENESYS_2"
}

.. figure:: images/vre_unit_genesys2.png
:width: 70 %

Used in: GENESYS_2

.. graphviz::

digraph G {
rankdir="LR";
node [ shape=box ];

box -> o [ label="Electricity production" ];

o [ style="invis" ];
box [ label="bus\ncapacity\nprofile\nmarginal_cost\ncapacity_cost\nexpandable\noutput_parameters\ncapacity_potential" ];

label="Used in: oemof.tabular"
}


Balmorel
''''''''
The related equation for this technology is (TO BE UPDATED):
Expand Down