Skip to content

Commit

Permalink
Merge pull request #1837 from rbolgaryn/contingency
Browse files Browse the repository at this point in the history
Contingency
  • Loading branch information
rbolgaryn authored Oct 5, 2023
2 parents 80ca87d + c6a732d commit fe6d9c1
Show file tree
Hide file tree
Showing 9 changed files with 1,369 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/github_test_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,11 @@ jobs:
python -m pip install --upgrade pip
python -m pip install pytest nbmake pytest-xdist igraph numba seaborn
./.install_julia.sh 1.8
pip install julia
python -m pip install julia
python ./.install_pycall.py
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install .["all"]
python -m pip install .["all"]
python -m pip install lightsim2grid
- name: List all installed packages
run: |
pip list
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Change Log
- [CHANGED] Compatibility with pandas 1.5, dropped "six" dependency
- [CHANGED] from_ppc(): revision of indexing and naming of elements
- [CHANGED] Complete revision of validate_from_ppc()
- [ADDED] helper functions for contingency calculation
- [CHANGED] Improve defaults, add docstrings and rename parameters of plot_voltage_profile() and plot_loading()
- [CHANGED] merge_nets(): revised for groups and new behavior regarding indexing; reindex_elements(): revised for groups, don't overwrite column "index" and feature parameter lookup
- [FIXED] Bug with user_pf_options: _init_runpp_options in auxiliary.py ignored user_pf_options when performing sanity checks
Expand Down
17 changes: 17 additions & 0 deletions doc/contingency.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#####################
Contingency analysis
#####################

We can define N-1 cases to be analysed as contingencies. This means that indices of net.line, net.trafo, net.trafo3w can be defined as contingencies, which are switched off one at a time. The power system is analyzed with power flow calculations, and the min/max values among all the N-1 cases are obtained for relevant variables.

A tutorial that introduces this feature with an example is available at `Contingency analysis <https://github.com/e2nIEE/pandapower/tree/develop/tutorials/contingency_analysis.ipynb>`_

.. autofunction:: pandapower.contingency.run_contingency

.. autofunction:: pandapower.contingency.run_contingency_ls2g

.. autofunction:: pandapower.contingency.get_element_limits

.. autofunction:: pandapower.contingency.check_elements_within_limits

.. autofunction:: pandapower.contingency.report_contingency_results
1 change: 1 addition & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Operation at the Fraunhofer Institute for Energy Economics and Energy System Tec
elements
std_types
powerflow
contingency
opf
shortcircuit
estimation
Expand Down
1 change: 1 addition & 0 deletions pandapower/contingency/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from pandapower.contingency.contingency import *
493 changes: 493 additions & 0 deletions pandapower/contingency/contingency.py

Large diffs are not rendered by default.

398 changes: 398 additions & 0 deletions pandapower/test/contingency/test_contingency.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pandapower/test/shortcircuit/test_sc_voltage.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# Copyright (c) 2016-2022 by University of Kassel and Fraunhofer Institute for Energy Economics
# Copyright (c) 2016-2023 by University of Kassel and Fraunhofer Institute for Energy Economics
# and Energy System Technology (IEE), Kassel. All rights reserved.


Expand Down
454 changes: 454 additions & 0 deletions tutorials/contingency_analysis.ipynb

Large diffs are not rendered by default.

0 comments on commit fe6d9c1

Please sign in to comment.