Skip to content

Commit

Permalink
Merge pull request #403 from openego/bugfix/documentation-updates
Browse files Browse the repository at this point in the history
Bugfix/documentation updates
  • Loading branch information
birgits authored Jul 11, 2024
2 parents 0a6bf5b + 2f06b51 commit 0374224
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 135 deletions.
13 changes: 10 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,23 @@ def setup(sphinx):
"shapely.%s",
),
"ding0": ("https://dingo.readthedocs.io/en/dev/api/ding0.html#%s", "ding0.%s"),
"pypsa": ("https://pypsa.readthedocs.io/en/latest/components.html#%s", "pypsa.%s"),
"pypsa": (
"https://pypsa.readthedocs.io/en/latest/user-guide/components.html#%s",
"pypsa.%s",
),
"plotly": (
"https://plotly.com/python-api-reference/generated/%s.html",
"plotly.%s",
),
}
# ignore the following external links when checking the links
# stackoverflow is listed here because for some reason the link check fails for these
# stackoverflow and gurobi is listed here because for some reason
# the link check fails for these
# in the github action, even though the link is correct
linkcheck_ignore = [r"https://stackoverflow.com*"]
linkcheck_ignore = [
r"https://stackoverflow.com*",
r"https://support.gurobi.com/*",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand Down
2 changes: 1 addition & 1 deletion doc/dev_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ following commands within your eDisGo directory:

.. code-block:: bash
python -m pip install -e .[full] # install eDisGo from source
python -m pip install -e .[dev] # install eDisGo from source
pre-commit install # install pre-commit hooks
Expand Down
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The toolbox currently includes:

* `ding0 <https://github.com/openego/ding0>`_ tool for synthetic medium and low
voltage grid topologies for the whole of Germany
* `OpenEnergy DataBase (oedb) <https://openenergy-platform.org/dataedit/schemas>`_ for
* `OpenEnergy DataBase (oedb) <https://openenergyplatform.org/dataedit/schemas>`_ for
feed-in time series of fluctuating renewables and scenarios for future
power plant park of Germany
* `demandlib <https://github.com/oemof/demandlib>`_ for electrical load time series
Expand Down
122 changes: 16 additions & 106 deletions doc/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
Getting started
================

.. warning:: Make sure to use python 3.8 or higher!

Installation using Linux
-------------------------

.. warning:: Make sure to use python 3.8 or higher!

Install latest eDisGo version through pip. Therefore, we highly recommend using
a virtual environment and its pip.

Expand All @@ -21,8 +21,6 @@ You may also consider installing a developer version as detailed in
Installation using Windows
--------------------------

.. warning:: Make sure to use python 3.8 or higher!

For Windows users we recommend using Anaconda and to install the geo stack
using the conda-forge channel prior to installing eDisGo. You may use the provided
`eDisGo_env.yml file <https://github.com/openego/eDisGo/blob/dev/eDisGo_env.yml>`_
Expand All @@ -44,117 +42,29 @@ Installation using MacOS
We don't have any experience with our package on MacOS yet! If you try eDisGo on MacOS
we would be happy if you let us know about your experience!

Requirements for edisgoOPF package
----------------------------------

.. warning:: The non-linear optimal power flow is currently not maintained and might not work out of the box!

To use the multiperiod optimal power flow that is provided in the julia package
edisgoOPF in eDisGo you additionally need to install julia version 1.1.1.
Download julia from
`julia download page <https://julialang.org/downloads/oldreleases/>`_ and
add it to your path (see
`platform specific instructions <https://julialang.org/downloads/platform/>`_
for more information).

Before using the edisgoOPF julia package for the first time you need to
instantiate it. Therefore, in a terminal change directory to the edisgoOPF
package located in eDisGo/edisgo/opf/edisgoOPF and call julia from there.
Change to package mode by typing

.. code-block:: bash
]
Additional requirements for Optimal Power Flow
---------------------------------------------------

Then activate the package:
In order to use the optimal power flow, you additionally need:

.. code-block:: bash
(v1.0) pkg> activate .
And finally instantiate it:

.. code-block:: bash
(SomeProject) pkg> instantiate
1. **Julia**: Version 1.6.7 is required.
2. **Gurobi Optimizer**: A powerful optimization solver.

.. _prerequisites:
Installation Steps
^^^^^^^^^^^^^^^^^^^

Additional linear solver
^^^^^^^^^^^^^^^^^^^^^^^^^
1. Install Julia 1.6.7

As with the default linear solver in Ipopt (local solver used in the OPF)
the limit for prolem sizes is reached quite quickly, you may want to instead use
the solver HSL_MA97.
The steps required to set up HSL are also described in the
`Ipopt Documentation <https://coin-or.github.io/Ipopt/INSTALL.html#DOWNLOAD_HSL>`_.
Here is a short version for reference:

First, you need to obtain an academic license for HSL Solvers.
Under https://licences.stfc.ac.uk/product/coin-hsl download the sources for Coin-HSL Full (Stable).
You will need to provide an institutional e-mail to gain access.
Download Julia 1.6.7 from the `Julia LTS releases page <https://julialang.org/downloads/#long_term_support_release>`_.

Unpack the tar.gz:

.. code-block:: bash
tar -xvzf coinhsl-2014.01.10.tar.gz
To install the solver, clone the Ipopt Third Party HSL tools:

.. code-block:: bash
git clone https://github.com/coin-or-tools/ThirdParty-HSL.git
cd ThirdParty-HSL
Under `ThirdParty-HSL`, create a folder for the HSL sources named `coinhsl` and
copy the contents of the HSL archive into it.
Under Ubuntu, you'll need BLAS, LAPACK and GCC for Fortran. If you don't have them, install them via:

.. code-block:: bash
sudo apt-get install libblas-dev liblapack-dev gfortran
You can then configure and install your HSL Solvers:

.. code-block:: bash
./configure
make
sudo make install
To make Ipopt pick up the solver, you need to add it to your path.
During install, there will be an output that tells you where the libraries have
been put. Usually like this:

.. code-block:: bash
Libraries have been installed in:
/usr/local/lib
Add this path to the variable `LD_LIBRARY_PATH`:

.. code-block:: bash
export LD_LIBRARY="/usr/local/bin":$LD_LIBRARY_PATH
You might also want to add this to your .bashrc to make it persistent.

For some reason, Ipopt looks for a library named `libhsl.so`, which is not what
the file is named, so we'll also need to provide a symlink:

.. code-block:: bash
Install Julia by following the instructions in the `Julia installation guide <https://julialang.org/downloads/platform/#linux_and_freebsd>`_. Make sure to add Julia to your system path.

cd /usr/local/lib
ln -s libcoinhsl.so libhsl.so

MA97 should now work and can be called from Julia with:
2. Install Gurobi

.. code-block:: julia

JuMP.setsolver(pm.model,IpoptSolver(linear_solver="ma97"))
Follow the `Gurobi installation guide <https://support.gurobi.com/hc/en-us/articles/14799677517585-Getting-Started-with-Gurobi-Optimizer>`_ to install Gurobi and add it to your system path.

Prerequisites
-------------
Expand Down Expand Up @@ -188,8 +98,8 @@ Aside from grid topology data you may eventually need a dataset on future
installation of power plants. You may therefore use the scenarios developed in
the `open_eGo <https://openegoproject.wordpress.com>`_ project that
are available in the
`OpenEnergy DataBase (oedb) <https://openenergy-platform.org/dataedit/schemas>`_
hosted on the `OpenEnergy Platform (OEP) <https://openenergy-platform.org/>`_.
`OpenEnergy DataBase (oedb) <https://openenergyplatform.org/dataedit/schemas>`_
hosted on the `OpenEnergy Platform (OEP) <https://openenergyplatform.org/>`_.
eDisGo provides an interface to the oedb using the package
`ego.io <https://github.com/openego/ego.io>`_. ego.io gives you a python
SQL-Alchemy representations of the oedb and access to it by using the
Expand Down
2 changes: 1 addition & 1 deletion doc/usage_details.rst
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ This mode can be invoked as follows:
For the following components you can use existing time series:

* Fluctuating generators: Feed-in time series for solar and wind power plants can be
retrieved from the `OpenEnergy DataBase <https://openenergy-platform.org/dataedit/schemas>`_.
retrieved from the `OpenEnergy DataBase <https://openenergyplatform.org/dataedit/schemas>`_.
* Conventional loads: Standard load profiles for the different sectors residential,
commercial, agricultural and industrial are generated using the oemof
`demandlib <https://github.com/oemof/demandlib/>`_.
Expand Down
18 changes: 9 additions & 9 deletions edisgo/edisgo.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def set_time_series_active_power_predefined(
Technology- and weather cell-specific hourly feed-in time series are
obtained from the
`OpenEnergy DataBase
<https://openenergy-platform.org/dataedit/schemas>`_. See
<https://openenergyplatform.org/dataedit/schemas>`_. See
:func:`edisgo.io.timeseries_import.feedin_oedb` for more information.
This option requires that the parameter `engine` is provided in case
Expand Down Expand Up @@ -478,7 +478,7 @@ def set_time_series_active_power_predefined(
Sets active power demand time series using individual hourly electricity
load time series for one year obtained from the `OpenEnergy DataBase
<https://openenergy-platform.org/dataedit/schemas>`_.
<https://openenergyplatform.org/dataedit/schemas>`_.
This option requires that the parameters `engine` and `scenario` are
provided. For further settings, the parameter `timeindex` can also be
Expand Down Expand Up @@ -933,7 +933,7 @@ def import_generators(self, generator_scenario=None, **kwargs):
Gets generator park for specified scenario and integrates generators into grid.
The generator data is retrieved from the
`open energy platform <https://openenergy-platform.org/>`_. Decommissioned
`open energy platform <https://openenergyplatform.org/>`_. Decommissioned
generators are removed from the grid, generators with changed capacity
updated and new generators newly integrated into the grid.
Expand Down Expand Up @@ -1003,7 +1003,7 @@ def analyze(
Conducts a static, non-linear power flow analysis.
Conducts a static, non-linear power flow analysis using
`PyPSA <https://pypsa.readthedocs.io/en/latest/power_flow.html#\
`PyPSA <https://pypsa.readthedocs.io/en/latest/user-guide/power-flow.html#\
full-non-linear-power-flow>`_
and writes results (active, reactive and apparent power as well as
current on lines and voltages at buses) to :class:`~.network.results.Results`
Expand Down Expand Up @@ -1928,7 +1928,7 @@ def import_electromobility(
Imports electromobility data and integrates charging points into grid.
Electromobility data can be obtained from the `OpenEnergy DataBase
<https://openenergy-platform.org/dataedit/schemas>`_ or from self-provided
<https://openenergyplatform.org/dataedit/schemas>`_ or from self-provided
data. In case you want to use self-provided data, it needs to be generated
using the tools
`SimBEV <https://github.com/rl-institut/simbev>`_ (required version:
Expand Down Expand Up @@ -1960,7 +1960,7 @@ def import_electromobility(
* "oedb"
Electromobility data is obtained from the `OpenEnergy DataBase
<https://openenergy-platform.org/dataedit/schemas>`_.
<https://openenergyplatform.org/dataedit/schemas>`_.
This option requires that the parameters `scenario` and `engine` are
provided.
Expand Down Expand Up @@ -2143,7 +2143,7 @@ def import_heat_pumps(self, scenario, engine, timeindex=None, import_types=None)
between two scenarios: 'eGon2035' and 'eGon100RE'.
The data is retrieved from the
`open energy platform <https://openenergy-platform.org/>`_.
`open energy platform <https://openenergyplatform.org/>`_.
# ToDo Add information on scenarios and from which tables data is retrieved.
Expand Down Expand Up @@ -2305,7 +2305,7 @@ def apply_heat_pump_operating_strategy(
def import_dsm(self, scenario: str, engine: Engine, timeindex=None):
"""
Gets industrial and CTS DSM profiles from the
`OpenEnergy DataBase <https://openenergy-platform.org/dataedit/schemas>`_.
`OpenEnergy DataBase <https://openenergyplatform.org/dataedit/schemas>`_.
Profiles comprise minimum and maximum load increase in MW as well as maximum
energy pre- and postponing in MWh. The data is written to the
Expand Down Expand Up @@ -2356,7 +2356,7 @@ def import_home_batteries(
between two scenarios: 'eGon2035' and 'eGon100RE'.
The data is retrieved from the
`open energy platform <https://openenergy-platform.org/>`_.
`open energy platform <https://openenergyplatform.org/>`_.
The batteries are integrated into the grid (added to
:attr:`~.network.topology.Topology.storage_units_df`) based on their building
Expand Down
2 changes: 1 addition & 1 deletion edisgo/io/dsm_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def oedb(
):
"""
Gets industrial and CTS DSM profiles from the
`OpenEnergy DataBase <https://openenergy-platform.org/dataedit/schemas>`_.
`OpenEnergy DataBase <https://openenergyplatform.org/dataedit/schemas>`_.
Profiles comprise minimum and maximum load increase in MW as well as maximum energy
pre- and postponing in MWh.
Expand Down
4 changes: 2 additions & 2 deletions edisgo/io/generators_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def oedb_legacy(edisgo_object, generator_scenario, **kwargs):
The importer uses SQLAlchemy ORM objects. These are defined in
`ego.io <https://github.com/openego/ego.io/tree/dev/egoio/db_tables/>`_.
The data is imported from the tables
`conventional power plants <https://openenergy-platform.org/dataedit/\
`conventional power plants <https://openenergyplatform.org/dataedit/\
view/supply/ego_dp_conv_powerplant>`_ and
`renewable power plants <https://openenergy-platform.org/dataedit/\
`renewable power plants <https://openenergyplatform.org/dataedit/\
view/supply/ego_dp_res_powerplant>`_.
When the generator data is retrieved, the following steps are conducted:
Expand Down
2 changes: 1 addition & 1 deletion edisgo/io/heat_pump_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ def _grid_integration(
def efficiency_resistive_heaters_oedb(scenario, engine):
"""
Get efficiency of resistive heaters from the
`OpenEnergy DataBase <https://openenergy-platform.org/dataedit/schemas>`_.
`OpenEnergy DataBase <https://openenergyplatform.org/dataedit/schemas>`_.
Parameters
----------
Expand Down
10 changes: 5 additions & 5 deletions edisgo/io/timeseries_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _timeindex_helper_func(
def feedin_oedb_legacy(edisgo_object, timeindex=None):
"""
Import feed-in time series data for wind and solar power plants from the
`OpenEnergy DataBase <https://openenergy-platform.org/dataedit/schemas>`_.
`OpenEnergy DataBase <https://openenergyplatform.org/dataedit/schemas>`_.
Parameters
----------
Expand Down Expand Up @@ -158,7 +158,7 @@ def feedin_oedb(
):
"""
Import feed-in time series data for wind and solar power plants from the
`OpenEnergy DataBase <https://openenergy-platform.org/dataedit/schemas>`_.
`OpenEnergy DataBase <https://openenergyplatform.org/dataedit/schemas>`_.
Parameters
----------
Expand Down Expand Up @@ -319,7 +319,7 @@ def load_time_series_demandlib(edisgo_obj, timeindex=None):
def cop_oedb(edisgo_object, engine, weather_cell_ids, timeindex=None):
"""
Get COP (coefficient of performance) time series data from the
`OpenEnergy DataBase <https://openenergy-platform.org/dataedit/schemas>`_.
`OpenEnergy DataBase <https://openenergyplatform.org/dataedit/schemas>`_.
Parameters
----------
Expand Down Expand Up @@ -377,7 +377,7 @@ def cop_oedb(edisgo_object, engine, weather_cell_ids, timeindex=None):
def heat_demand_oedb(edisgo_obj, scenario, engine, timeindex=None):
"""
Get heat demand profiles for heat pumps from the
`OpenEnergy DataBase <https://openenergy-platform.org/dataedit/schemas>`_.
`OpenEnergy DataBase <https://openenergyplatform.org/dataedit/schemas>`_.
Heat demand data is returned for all heat pumps in the grid.
For more information on how individual heat demand profiles are obtained see
Expand Down Expand Up @@ -498,7 +498,7 @@ def electricity_demand_oedb(
):
"""
Get electricity demand profiles for all conventional loads from the
`OpenEnergy DataBase <https://openenergy-platform.org/dataedit/schemas>`_.
`OpenEnergy DataBase <https://openenergyplatform.org/dataedit/schemas>`_.
Conventional loads comprise conventional electricity applications in the
residential, CTS and industrial sector.
Expand Down
Loading

0 comments on commit 0374224

Please sign in to comment.