Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added instructions to install graphviz, if needed. #225

Merged
merged 2 commits into from
May 18, 2024
Merged
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
17 changes: 11 additions & 6 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ save the solution as ``simplicity.sol``. Use otoole to create a folder of CSV re

$ otoole results cplex csv simplicity.sol results csv data config.yaml

.. _model-visualization:

Model Visualization
-------------------

Expand All @@ -217,18 +219,21 @@ Run the following command, where the RES will be saved as the file ``res.png``::

.. WARNING::
If you encounter a ``graphviz`` dependency error, install it on your system
from the graphviz_ website (if on Windows) or via the command::
following instructions on the Graphviz_ website. If on Windows,
download the install package `from Graphviz <https://graphviz.org/download/>`_.
If on Mac or Linux, or running conda, use one of the following commands::

sudo apt install graphviz # if on Ubuntu
brew install graphviz # if on Mac
brew install graphviz # if on Mac
sudo apt install graphviz # if on Ubuntu
conda install graphviz # if using conda

To check that ``graphviz`` installed correctly, run ``dot -V`` to check the
version::

~$ dot -V
$ dot -V
dot - graphviz version 2.43.0 (0)

1. View the RES
2. View the RES
~~~~~~~~~~~~~~~
Open the newly created file, ``res.png`` and the following image should be
displayed
Expand Down Expand Up @@ -503,4 +508,4 @@ will also flag it as an isolated fuel. This means the fuel is unconnected from t
.. _CPLEX: https://www.ibm.com/products/ilog-cplex-optimization-studio/cplex-optimizer
.. _Anaconda: https://www.anaconda.com/
.. _Gurobi: https://www.gurobi.com/
.. _graphviz: https://www.graphviz.org/download/
.. _Graphviz: https://www.graphviz.org/download/
9 changes: 7 additions & 2 deletions docs/functionality.rst
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,14 @@ visualising the reference energy system through the ``vis res`` command is suppo

.. NOTE::
The ``resfile`` command should include a file ending used for images,
including ``bmp``, ``jpg``, ``pdf``, ``png`` etc. The graphviz_ library
including ``bmp``, ``jpg``, ``pdf``, ``png`` etc. The Graphviz_ library
used to layout the reference energy system will interpret the file ending.

.. WARNING::
If you encounter a Graphviz_ dependencey error, please follow Graphviz_
installation instructions described in the
:ref:`visualization examples <model-visualization>`.

Validation
----------
The validation module in ``otoole`` checks technology and fuel names against a
Expand Down Expand Up @@ -217,4 +222,4 @@ the rest of the model::
.. _CPLEX: https://www.ibm.com/products/ilog-cplex-optimization-studio/cplex-optimizer
.. _Gurobi: https://www.gurobi.com/
.. _`OSeMOSYS Repository`: https://github.com/OSeMOSYS/OSeMOSYS_GNU_MathProg/tree/master/scripts
.. _graphviz: https://graphviz.org/
.. _Graphviz: https://graphviz.org/
Loading