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

update Release 0.3.4 #154

Open
wants to merge 132 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
0edfd4e
update version
Dec 10, 2018
513c4d1
Changes to ETraGoData class
birgits Sep 5, 2022
fbabc67
Update edisgo imports
birgits Sep 5, 2022
061178f
Update load_edisgo_results function
birgits Sep 5, 2022
9ffc74a
Delete unnecessary function
birgits Sep 5, 2022
531701d
Updated the _ETraGoData class and added a script to test it
Sep 6, 2022
fdc076f
Merge branch 'features/update_eDisGo_workflow' of https://github.com/…
Sep 6, 2022
90f2382
Rename scenario_setting parameter
birgits Sep 6, 2022
7adcf15
Rename attribute
birgits Sep 6, 2022
b34e79c
Use readonly in database connection
birgits Sep 6, 2022
bf138c3
Merge branch 'features/update_eDisGo_workflow' of github.com:openego/…
birgits Sep 6, 2022
524071e
Remove unnecessary scenario_setting parameters
birgits Sep 6, 2022
4386440
Update run_edisgo
birgits Sep 6, 2022
4ba5294
Update EDisGoNetworks class
birgits Sep 6, 2022
d6246ce
Remove unused imports
birgits Sep 6, 2022
6543f76
Remove unused classes
birgits Sep 6, 2022
1924126
Update eTraGo specs
birgits Sep 6, 2022
f8199fa
Add minimum working example for edisgo interface
birgits Sep 6, 2022
44a998f
Scenario settings for edisgo mwe
birgits Sep 6, 2022
617ffdf
Update run_edisgo
birgits Sep 7, 2022
d8fc909
Update run_edisgo
birgits Sep 7, 2022
191b793
Add geo- and solarthermal energy
birgits Sep 7, 2022
71b597f
Update the interface between eTraGo and eDisGo
Sep 22, 2022
380cec8
Feature/add pre commit hooks (#158)
khelfen Sep 23, 2022
383e904
minor fix in readme
khelfen Sep 23, 2022
ff58b30
Run pre-commit hooks first time in branch
Feb 3, 2023
97e71b1
Merge
Feb 3, 2023
e4c5483
minor fix in readme
khelfen Sep 23, 2022
2d71813
Refactor interface.py
Feb 16, 2023
e4e76e2
Update etrago integration
ClaraBuettner Feb 16, 2023
5e94020
Delete import of old etrago plots
ClaraBuettner Feb 16, 2023
92eb100
Update etrago parameters
ClaraBuettner Feb 16, 2023
b1712c1
Refactor mv grid clustering
Feb 23, 2023
fedd5ab
Add examples for the clustering
Feb 23, 2023
fc4707f
Rename variables, use edisgo grid instead of ding0 grids
Feb 23, 2023
1b0e5ba
Refactor interface and clustering
Feb 26, 2023
ddba219
Update requirements from dev
Mar 6, 2023
0ebff22
Fixing some flake8 errors
Mar 9, 2023
a20bcb0
Read database and ssh from secondary config
Mar 9, 2023
b5897a0
Update edisgo_mwe.py and settings
Mar 9, 2023
0a6cd95
Save config as a results
Mar 9, 2023
35f20b8
Update filepaths, logging and run_edisgo behaviour
Mar 10, 2023
fd88a21
Change storage interface
birgits Mar 21, 2023
dfcd317
Bug fix create directory if it does not exist
birgits Mar 21, 2023
a955e25
Change scenario settings for MWE
birgits Mar 21, 2023
2981cf7
Remove weather cell ID from renewables dataframes
birgits Mar 21, 2023
bdd735e
Rename central heat pump data to make naming more consistent
birgits Mar 21, 2023
b11623a
Adapt edisgo workflow to changes in edisgo
birgits Mar 21, 2023
dbce8cb
Minor change to edisgo_mwe
birgits Mar 21, 2023
5306d4e
Bug fix add edisgo object
birgits Mar 21, 2023
60c341e
Update interface
Mar 23, 2023
357190b
Update loading of config and add missing config values
Mar 23, 2023
60f97dc
Adapt edisgo workflow
birgits Mar 31, 2023
40f86b6
Fix initialisation of edisgo grid
birgits Mar 31, 2023
11fac87
Fix setting timeindex
birgits Mar 31, 2023
d121771
Merge pull request #159 from openego/features/integrate-egon-etrago
ClaraBuettner Apr 4, 2023
cf5d603
Adapt edisgo workflow
birgits Apr 4, 2023
0dbaae3
Only set up central heat store when there are heat pumps
birgits Apr 4, 2023
aadf6ab
Adapt getting cluster attribues for different scenarios
birgits Apr 6, 2023
2e5a8e7
Delete cluster examples
birgits Apr 13, 2023
031d61e
Adapt obtaining heat pump data from database to include resistive hea…
birgits Apr 13, 2023
cd124c2
Adapt MV clustering
birgits Apr 13, 2023
17c1d8c
Allow specifying own scenario settings path
birgits Apr 13, 2023
c614173
Delete old files
birgits Apr 13, 2023
3d6d511
Adapt scenario settings
birgits Apr 13, 2023
81d87dc
Bug fix remove initial reinforcement
birgits Apr 13, 2023
c4d5465
Adapt scenario settings
birgits Apr 13, 2023
dc487f0
Change limits
birgits Apr 14, 2023
519a226
Change integrity checks
birgits Apr 14, 2023
d142c65
Move setting up engine to task setup_grid
birgits Apr 23, 2023
fde3e13
Overwrite configs
birgits Apr 23, 2023
39ebd05
Remove logging message
birgits Apr 23, 2023
5df4776
Bug fix
birgits Apr 23, 2023
2ab096c
Save to different zip to keep original grid
birgits Apr 24, 2023
cc2113d
Change CHP carrier names
birgits Apr 24, 2023
82600d7
Add scaling and check of curtailment
birgits Apr 24, 2023
4b150fd
Also make oil and others CHP gas_CHP
birgits Apr 24, 2023
9a6a526
Adapt docstring
birgits Apr 24, 2023
6fbbafa
Adapt interface functions
birgits Apr 24, 2023
dba981f
Adapt rural_heat interface
birgits Apr 24, 2023
0cd237a
Adapt overlying grid task
birgits Apr 24, 2023
752f137
Rename water generator type
birgits Apr 25, 2023
0448197
Add new database tables to config
birgits Apr 26, 2023
1c85de9
Adapt eTraGo interface
birgits Apr 26, 2023
24a5c2c
Bug fix
birgits Apr 27, 2023
a625210
Add option to drop non-converging time steps
birgits Apr 28, 2023
6bea3c0
Distribute thermal storage for individual heating
birgits Apr 28, 2023
92401a6
Set column names to be district heating ID
birgits Apr 28, 2023
abd6446
Correct numerical errors for curtailment
birgits Apr 28, 2023
e0d3c9a
Rename conventional to others
birgits Apr 28, 2023
e0659bf
Make values positive
birgits Apr 28, 2023
0ca1205
Fix setting type for CHP
birgits Apr 28, 2023
2c06816
Only check for converged time steps
birgits Apr 28, 2023
83c8c59
Bug fix
birgits May 2, 2023
ff4bea5
Add task temporal complexity reduction
birgits May 3, 2023
cfdb7bf
Add optimization task
birgits May 4, 2023
fb39d3d
Always save grid data
birgits May 5, 2023
477dfc9
Bug fix initialise storage time series
birgits May 5, 2023
f831d76
Bug fix set time series for all time steps
birgits May 6, 2023
baa25d0
Bug fix
birgits May 6, 2023
3b89ea3
Fix setting storage time series
birgits May 6, 2023
27fbad6
Adapt to changes in edisgo
birgits May 9, 2023
3feb24c
Move carrier renaming to function
birgits May 10, 2023
e08520d
Add grid reinforcement task
birgits May 10, 2023
86454c6
Use same setup function for full and low flex scenario
birgits May 10, 2023
5522300
Adapt edisgo workflow for low flex scenario
birgits May 10, 2023
d64b0b4
Adapt interface for low flex scenario
birgits May 10, 2023
0e03615
Bug fix in case no storage was build
birgits May 10, 2023
7259b9b
Move mapping of etrago heat bus ID to district heating ID to separate…
birgits May 10, 2023
a6cee9c
Handle low flex and full flex in one function
birgits May 10, 2023
735cdeb
Use same optimisation task for full and low flex
birgits May 10, 2023
f9cd827
Time intervals not needed anymore in grid reinforcement
birgits May 10, 2023
36abdd1
Fixes in optimisation task
birgits May 10, 2023
14d4e71
Add saving of opf results
birgits May 10, 2023
89dacb1
Fix save correct edisgo object
birgits May 11, 2023
f49383c
Fix bug district heating ID as string of integer
birgits May 11, 2023
18323c0
Add reinforcement of LV feeders with large voltage issues to grid rei…
birgits May 12, 2023
0adbd69
Remove capacity limitation
birgits May 25, 2023
b468188
Add expansion as clustering attribute
birgits May 25, 2023
b47baec
Add saving results class
birgits May 25, 2023
81ab6f1
Merge branch 'dev' into workflow
birgits May 25, 2023
35ed7cb
Add docstrings and delete old functions
birgits May 25, 2023
5a3d09e
Use MV grid ID directly
birgits May 25, 2023
17fa273
Adapt config
birgits May 25, 2023
554ccf2
Adapt function name
birgits May 25, 2023
605b65b
Adapt test
birgits May 26, 2023
30280b0
Adapt tests
birgits May 26, 2023
384c5a5
Remove example
birgits May 26, 2023
64efce8
Move database tables from config to database file
birgits May 26, 2023
34cb190
Remove costs
birgits May 27, 2023
566bd66
Update dependencies and scenario_settings
birgits May 27, 2023
dfab09e
Merge pull request #161 from openego/workflow
birgits May 27, 2023
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
7 changes: 7 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[flake8]
extend-exclude = docs
max-line-length = 88
extend-ignore = E203, F841
count = true
statistics = true
show-source = true
4 changes: 4 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[settings]
profile = black
multi_line_output = 3
lines_between_types = 1
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/asottile/pyupgrade
rev: v2.38.0
hooks:
- id: pyupgrade
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:
- id: flake8
18 changes: 10 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


.. image:: https://openegoproject.files.wordpress.com/2017/02/open_ego_logo_breit.png?w=400


*A cross-grid-level electricity grid and storage optimization tool*
| `openegoproject.wordpress.com <https://openegoproject.wordpress.com/>`_
Expand All @@ -16,8 +16,8 @@ eGo

Integrated optimization of flexibility options and grid extension measures
for power grids based on `eTraGo <http://eTraGo.readthedocs.io/>`_ and
`eDisGo <http://edisgo.readthedocs.io/>`_. The Documentation of the eGo tool
can be found on
`eDisGo <http://edisgo.readthedocs.io/>`_. The Documentation of the eGo tool
can be found on
`openego.readthedocs.io <https://openego.readthedocs.io/>`_ .

.. contents::
Expand All @@ -35,7 +35,7 @@ In case of installation errors of pypsa-fork use:

.. code-block::

$ pip3 install -e git+https://github.com/openego/PyPSA@master#egg=0.11.0fork
$ pip3 install -e git+https://github.com/openego/PyPSA@master#egg=0.11.0fork


----------------------------
Expand All @@ -46,10 +46,12 @@ Create a virtualenvironment and activate it:

.. code-block::

$ virtualenv venv --clear -p python3.5
$ virtualenv venv --clear -p python3.8
$ source venv/bin/activate
$ cd venv
$ pip3 install -e git+https://github.com/openego/eGo@dev#egg=eGo --process-dependency-links
$ cd path/to/eGo
$ python -m pip install -e .[full]
$ pre-commit install # install pre-commit hooks


-------
License
Expand Down Expand Up @@ -84,6 +86,6 @@ this program. If not, see https://www.gnu.org/licenses/.
.. |readthedocs| image:: https://readthedocs.org/projects/openego/badge/?version=master
:target: http://openego.readthedocs.io/en/latest/?badge=master
:alt: Documentation Status

.. |zenodo| image:: https://zenodo.org/badge/87306120.svg
:target: https://zenodo.org/badge/latestdoi/87306120
83,700 changes: 41,850 additions & 41,850 deletions doc/_static/ego_example_iplot_map.html

Large diffs are not rendered by default.

37 changes: 16 additions & 21 deletions doc/api/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ Overview of modules
:maxdepth: 7

ego.tools

scenario_settings.json
======================

With the ``scenario_settings.json`` file you set up your calcualtion.
The file can be found on
With the ``scenario_settings.json`` file you set up your calcualtion.
The file can be found on
`github <https://github.com/openego/eGo/blob/master/ego/scenario_setting.json>`_.

.. json:object:: scenario_setting.json
Expand All @@ -33,42 +33,37 @@ The file can be found on


.. json:object:: global

:property bool eTraGo: Decide if you want to run the eTraGo tool (HV/EHV grid optimization).
:property bool eDisGo: Decide if you want to run the eDisGo tool (MV grid optimiztaion). Please note: eDisGo requires eTraGo= ``true``.
:property string csv_import_eTraGo: ``false`` or path to previously calculated eTraGo results (in order to reload the results instead of performing a new run).
:property string csv_import_eDisGo: ``false`` or path to previously calculated eDisGo results (in order to reload the results instead of performing a new run).
:property string csv_import_eTraGo: ``false`` or path to previously calculated eTraGo results (in order to reload the results instead of performing a new run).
:property string csv_import_eDisGo: ``false`` or path to previously calculated eDisGo results (in order to reload the results instead of performing a new run).



.. json:object:: eTraGo

This section of :json:object:`scenario_setting.json` contains all input parameters for the eTraGo tool. A description of the parameters can be found `here. <https://etrago.readthedocs.io/en/dev/api/etrago.html#module-etrago.appl>`_


.. json:object:: eDisGo

This section of :json:object:`scenario_setting.json` contains all input parameters for the eDisGo tool and the clustering of MV grids.

:property string db: Name of your database (e.g.``''oedb''``). eDisGo queries generator data from this database. Please note that this parameters is automatically overwritten in eDisGo's configuration files.
:property string gridversion: ``null`` or *open_eGo* dataset version (e.g. ``''v0.4.5''``). If ``null``, *open_eGo*'s model_draft is used. Please note that this parameters is automatically overwritten in eDisGo's configuration files.
:property string ding0_files: Path to the MV grid files (created by `ding0 <https://readthedocs.org/projects/dingo/>`_) (e.g. ``''data/MV_grids/20180713110719''``)
:property string choice_mode: Mode that eGo uses to chose MV grids out of the files in **ding0_files** (e.g. ``''manual''``, ``''cluster''`` or ``''all''``). If ``''manual''`` is chosen, the parameter **manual_grids** must contain a list of the desired grids. If ``''cluster''`` is chosen, **no_grids** must specify the desired number of clusters and **cluster_attributes** must specify the applied cluster attributes. If ``''all''`` is chosen, all MV grids from **ding0_files** are calculated.
:property list cluster_attributes: List of strings containing the desired cluster attributes. Available attributes are: ``''farthest_node''``, ``''wind_cap''``, ``''solar_cap''`` and ``''extended_storage''``, thus an exemplary list looks like ``["farthest_node", "wind_cap", "solar_cap", "extended_storage"]``. ``''farthest_node''`` represents the longest path within each grid, ``''wind_cap''`` the installed wind capacity within each grid, ``''solar_cap''`` the installed solar capacity within each grid and ``''extended_storage''`` the installed storage units (as calculated by eTraGo). Please note that ``''extended_storage''`` is only available in combination with eTraGo datasets that optimized storage extension. Otherwise this attribute is ignored.
:property string gridversion: This parameter is currently not used.
:property string grid_path: Path to the MV grid files (created by `ding0 <https://readthedocs.org/projects/dingo/>`_) (e.g. ``''data/MV_grids/20180713110719''``)
:property string choice_mode: Mode that eGo uses to chose MV grids out of the files in **grid_path** (e.g. ``''manual''``, ``''cluster''`` or ``''all''``). If ``''manual''`` is chosen, the parameter **manual_grids** must contain a list of the desired grids. If ``''cluster''`` is chosen, **no_grids** must specify the desired number of clusters and **cluster_attributes** must specify the applied cluster attributes. If ``''all''`` is chosen, all MV grids from **grid_path** are calculated.
:property list cluster_attributes: List of strings containing the desired cluster attributes. Available attributes are all attributes returned from :py:func:`~ego.mv_clustering.mv_clustering.get_cluster_attributes.
:property bool only_cluster: If ``true``, eGo only identifies cluster results, but performs no eDisGo run. Please note that for **only_cluster** an eTraGo run or dataset must be provided.
:property list manual_grids: List of MV grid ID's (*open_eGo* HV/MV substation ID's) is case of **choice_mode** = ``''manual''`` (e.g. ``[1718,1719]``). Ohterwise this parameter is ignored.
:property int no_grids: Number of MV grid clusters (from all files in **ding0_files**, a specified number of representative clusters is calculated) in case of **choice_mode** = ``''cluster''``. Otherwise this parameter is ignored.
:property list manual_grids: List of MV grid ID's in case of **choice_mode** = ``''manual''`` (e.g. ``[1718,1719]``). Ohterwise this parameter is ignored.
:property int n_clusters: Number of MV grid clusters (from all grids in **grid_path**, a specified number of representative clusters is calculated) in case of **choice_mode** = ``''cluster''``. Otherwise this parameter is ignored.
:property bool parallelization: If ``false``, eDisgo is used in a consecutive way (this may take very long time). In order to increase the performance of MV grid simulations, ``true`` allows the parallel calculation of MV grids. If **parallelization** = ``true``, **max_calc_time** and **max_workers** must be specified.
:property float max_calc_time: Maximum calculation time in hours for eDisGo simulations. The calculation is terminated after this time and all costs are extrapolated based on the unfinished simulation. Please note that this parameter is only used if **parallelization** = ``true``.
:property ing max_workers: Number of workers (cpus) that are allocated to the simulation. If the given value exceeds the number of available workers, it is reduced to the number of available workers. Please note that this parameter is only used if **parallelization** = ``true``.
:property bool initial_reinforcement: This parameter must be set ``true``.
:property bool apply_curtailment: If ``true``, eDisGo applies and optimizes the curtailment (as calculated by eTraGo) within each MV grid.
:property float curtailment_voltage_threshold: p.u. overvoltage limit (e.g. ``0.05``). If this p.u. overvoltage is exceeded at any bus, curtailment is applied.
:property bool storage_distribution: If ``true``, eDisGo attempts to integrate battery storages (as calculated by eTraGo) into MV grids in order to reduce grid reinforcement.
:property float max_cos_phi_renewable: Maximum power factor for wind and solar generators in MV grids (e.g. ``0.9``). If the reactive power (as calculated by eTraGo) exceeds this power factor, the reactive power is reduced in order to reach the power factor conditions.
:property string solver: Solver eDisGo uses to optimize the curtailment and storage integration (e.g. ``''gurobi''``).
:property string timesteps_pfa: Method eDisGo uses for the storage integration (e.g. ``''snapshot_analysis''``).
:property string results: Path to folder where eDisGo's results will be saved.

:property list tasks: List of string defining the tasks to run. The eDisGo calculation for each MV grid can be devided into separate tasks which is helpful in case one tasks fails and calculations do not need to started in the beginning. The following tasks exist: ``''1_setup_grid''``, ``''2_specs_overlying_grid''``, ``''3_temporal_complexity_reduction''``, ``''4_optimisation''``, ``''5_grid_reinforcement''``.



appl.py
Expand Down
Loading