Identify key facilities (lines & generators) whose outage would most impact a set of PSS/E flowgates.
Reason this release was yanked:
moved to psse-utils
Project description
flowgate-key-facilities
Identify the key facilities for a set of PSS/E flowgates — the equipment whose loss (damage or outage) would most likely have a high impact on those flowgates.
Given a flowgate-definition file (.mon) and a PSS/E model (.raw), this tool
finds, for each flowgate, the nearby high-impact equipment and writes it to CSVs.
What it does
A flowgate (defined in the .mon file) is a set of monitored/contingency
elements. Equipment electrically close to those elements is the most likely to
matter if it goes out. "Key facilities" are selected with a deliberately simple,
transparent rule — for each flowgate in the .mon file:
- Resolve the flowgate's elements to buses in the
.rawmodel. - Take the electrical neighborhood: every bus within
nbuses (hops) of those elements (--hops, default 4). - From that neighborhood, keep the high-impact facilities:
- AC lines / 2-winding transformers whose voltage is in a kV range
(
--kv-min/--kv-max, default 160–765 kV). - Generators with PMax ≥ a threshold (
--gen-min-mw, default 15 MW). - 3-winding transformers touching the neighborhood within the kV range.
- AC lines / 2-winding transformers whose voltage is in a kV range
(
It is not a contingency analysis or a flow-impact calculation — it's a fast, proximity-based screen to surface candidate key facilities for further study.
Installation
pip install --pre flowgate-key-facilities
This pulls in psse-model-util (the engine) from PyPI automatically. --pre is
required while both packages are pre-releases.
Usage
flowgate-key-facilities \
--mon path/to/flowgates.mon \
--raw path/to/Model.raw \
--areas 1 2 3 \
--sc SCA \
--out-dir outputs/
Required arguments:
--mon— PSS/E.monflowgate-definition file.--raw— PSS/E.rawmodel file.--areas— one or more area IDs (integers) restricting the search domain. The model is filtered to keep only equipment touching these areas before resolution. Seeds whose buses fall outside the listed areas appear inunresolved.csvwith reasonbus_not_found.--sc— security-coordinator code; only flowgates with this SC are processed.--out-dir— output directory for the CSVs (created if missing).
Selection overrides (the "key facility" thresholds):
--hops— neighborhood radius in buses (default 4).--kv-min/--kv-max— line/transformer voltage range to keep (default 160 / 765).--gen-min-mw— minimum generator PMax to keep (default 15).-v/--verbose— debug logging.
Output
Four CSV files in --out-dir:
branches.csv— AC lines and 2W transformers within--hopsbuses of any flowgate element, filtered to--kv-min <= kV <= --kv-max(either end).generators.csv— generators in the neighborhood withPMax >= --gen-min-mw.transformers_3w.csv— 3W transformers with any winding in the neighborhood and any winding bus in the kV range.unresolved.csv—.monelements that could not be resolved against the model (bus name not found, branch not found, generator not found).
Development
pip install -e ../psse_model_util # sibling repo, editable
pip install -e .
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flowgate_key_facilities-0.1.0b1.tar.gz.
File metadata
- Download URL: flowgate_key_facilities-0.1.0b1.tar.gz
- Upload date:
- Size: 59.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2127c7070673f725e4c18875c7acec4dc77140e5f363af9742fc9486041f91b
|
|
| MD5 |
affb1f5d8b649e2ba7dfe07b22f818cd
|
|
| BLAKE2b-256 |
4f403e4c6d4cfc2ca3fc688db84e75d211ca651312c1b9cd45906ef094424a4d
|
Provenance
The following attestation bundles were made for flowgate_key_facilities-0.1.0b1.tar.gz:
Publisher:
publish.yml on ppsyOps/flowgate_key_facilities
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flowgate_key_facilities-0.1.0b1.tar.gz -
Subject digest:
d2127c7070673f725e4c18875c7acec4dc77140e5f363af9742fc9486041f91b - Sigstore transparency entry: 1930936712
- Sigstore integration time:
-
Permalink:
ppsyOps/flowgate_key_facilities@0c9dba621cb5511ec100dd8608b5320783e89e0b -
Branch / Tag:
refs/heads/master - Owner: https://github.com/ppsyOps
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0c9dba621cb5511ec100dd8608b5320783e89e0b -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file flowgate_key_facilities-0.1.0b1-py3-none-any.whl.
File metadata
- Download URL: flowgate_key_facilities-0.1.0b1-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14022299b854e324d3641f362b9fdd56d9cdb39f82837eecb649748b5542ac10
|
|
| MD5 |
429b2a77ea59b777862649cecadf8b80
|
|
| BLAKE2b-256 |
16af7139cb926066f45c040e8ee2d7aa8db1b6ad50df168e1f64edb60b72f169
|
Provenance
The following attestation bundles were made for flowgate_key_facilities-0.1.0b1-py3-none-any.whl:
Publisher:
publish.yml on ppsyOps/flowgate_key_facilities
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flowgate_key_facilities-0.1.0b1-py3-none-any.whl -
Subject digest:
14022299b854e324d3641f362b9fdd56d9cdb39f82837eecb649748b5542ac10 - Sigstore transparency entry: 1930936829
- Sigstore integration time:
-
Permalink:
ppsyOps/flowgate_key_facilities@0c9dba621cb5511ec100dd8608b5320783e89e0b -
Branch / Tag:
refs/heads/master - Owner: https://github.com/ppsyOps
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0c9dba621cb5511ec100dd8608b5320783e89e0b -
Trigger Event:
workflow_dispatch
-
Statement type: