HostCap-Screen
Screening of transmission injection capability for new generation.
HostCap-Screen estimates how many megawatts (MW) of new generation — solar, wind, or battery energy storage discharging — can connect at each bus of a transmission network before a thermal or voltage limit is violated, in the base case or after any single line or transformer outage (N-1).
Screening-level tool. Results do not replace the interconnection studies performed by a transmission provider. They depend on the network model, dispatch, and criteria you supply.
In distribution planning this quantity is usually called hosting capacity. At transmission level this tool reports it as transmission injection capability.
What it does
For each candidate bus:
- Adds a new plant at the bus.
- Balances the added MW by reducing existing synchronous generators in proportion to their output (never below their minimum), or optionally by the slack source alone.
- Runs an AC (alternating current) load flow for the base case and every single line, transformer and generator outage. A lost generator's output is picked up by the other units in proportion to their rating, up to their maximum (an approximation of equal-droop governor response); the slack source covers any remainder.
- Uses a bisection search to find the largest output with no new violation, then spot-checks lower outputs to confirm the result.
- Reports the capability, the binding element, the outage that causes it, the direction of flow on the binding branch, and the plant's reactive power.
- When a line or transformer is the limit, repeats the search with that element treated as upgraded, to report the capability if upgraded and the next limit.
Install
Requires Python 3.10 or newer.
pip install hostcap-screen # core tool
pip install "hostcap-screen[psse]" # adds PSS/E .raw import (pypowsybl)
pip install "hostcap-screen[fast,psse]" # also numba for faster load flows
Live demo (IEEE 39-bus): https://ishaibu.github.io/hostcap-screen/demo/
From a local copy of this repository:
pip install -e .
Quick start
Screen every bus of the built-in IEEE 39-bus system with default criteria:
hostcap-screen run --out results
Screen your own PSS/E case (versions 32, 33 and 35):
hostcap-screen run --case my_case.raw --workers 2 --out results
Screen selected buses with your own criteria, using two parallel processes:
hostcap-screen run --buses 4,16,26 --criteria my_criteria.yaml --workers 2 --out results
Outputs in the results folder:
| File | Contents |
|---|---|
hostcap_results.csv |
One row per bus: capability, binding element, outage, value, limit |
hostcap_results.json |
Same, plus all violations at the limit, criteria, and run settings |
hostcap_report.html |
Plain printable report with criteria, pre-existing violations, and outages not studied |
hostcap_dashboard.html |
Interactive dashboard (opens offline): network map, rankings, sortable table, bus details, method and criteria |
The network map has two modes. Capability shades each bus on one indigo scale with fixed bins (< 25, 25–100, 100–250, 250–500, ≥ 500 MW), so a color means the same MW in every run; the five lowest buses pulse. My project has a project-size slider: buses turn green (fits), amber (fits with under 10% margin) or red (does not fit) as you drag. Selecting a bus highlights its binding branch, with moving dashes showing the direction of power flow, and marks the outage that causes it. Motion is switched off for users who set "reduce motion" and when printing.
The dashboard is one self-contained HTML file, so it can be emailed or
attached to a study file. A live example built from the IEEE 39-bus case is
in docs/demo/index.html; it lets you switch between the strict and lenient
pre-existing policies. Rebuild it with python tools/build_demo.py.
Options
| Option | Default | Meaning |
|---|---|---|
--case |
ieee39 |
ieee39, a PSS/E .raw file, or a pandapower .json network file |
--criteria |
built-in | YAML criteria file (see examples/criteria_example.yaml) |
--buses |
all | Comma-separated bus labels |
--pmax |
2000 | Search maximum, MW |
--tol |
1 | Search tolerance, MW |
--redispatch |
proportional |
proportional or slack |
--reactive |
voltage |
voltage: plant holds its pre-project bus voltage within the power factor limit; unity: no reactive power |
--pf |
0.95 | Power factor limit for voltage mode |
--workers |
1 | Number of parallel processes |
--no-gen-outages |
off | Skip generator outages |
--no-next-limit |
off | Skip the upgrade (next limit) search; about 40% faster |
Criteria
NERC Reliability Standard TPL-001 requires each Transmission Planner and Planning Coordinator to set its own steady-state limits, so there is no single national set of values. The built-in profile uses common screening values:
| Limit | Base case | After an outage |
|---|---|---|
| Voltage | 0.95–1.05 per unit | 0.90–1.10 per unit |
| Thermal | 100% of normal rating | 100% of emergency rating |
These are not the criteria of any ISO, RTO, or utility. Copy
examples/criteria_example.yaml, enter the criteria for your system, and
pass it with --criteria. You can set limits by voltage level and for
individual buses. The criteria used are printed in every report.
Pre-existing violations
Many cases already have violations before any plant is added. The published IEEE 39-bus case, for example, has N-1 line overloads at its base dispatch. Two policies are available:
worsen(default): a pre-existing violation limits the plant only if the plant worsens it by more than the tolerance (0.005 per unit or 1% loading).ignore: pre-existing violations never limit the plant.
Both policies list every pre-existing violation in the report.
Reactive power
In voltage mode the plant regulates its bus to the voltage that bus had
before the project, within a reactive range of ±tan(arccos(pf)) × P
(±0.329 × P at 0.95 power factor). If the limit is reached, reactive power
is held at the limit and the bus voltage floats. The ±0.95 range reflects
FERC Order No. 827, which applies at the high side of the generator
substation unless the transmission provider sets a different range.
PSS/E cases
.raw files are read with PowSyBl (pypowsybl) and converted to pandapower.
Every import is checked: the converted network's power flow is compared with
PowSyBl's own solution of the case, and the largest voltage and angle
differences are printed and shown in the report. The slack generator is
never redispatched or tripped; a lost generator's output is shared by the
other units in proportion to their machine MVA rating (MBASE). The star
buses of three-winding transformers are internal model points and are
neither screened nor monitored.
Modeling assumptions and limitations (v0.1)
- Point of interconnection model: the reactive range is applied at the point of interconnection bus. The plant's step-up transformer and collector system are not modeled.
- Single rating models: when the network carries one rating per branch,
the emergency rating equals
emergency_rating_pct_of_normal× normal (100% by default). The report notes this assumption. - Branch outages that island buses with load are not studied. Outages that island only a generator are covered by that generator's outage. Generator outages that do not converge even with no plant added are listed for detailed study. Every skipped outage is listed in the report.
- Generator pickup is a steady-state approximation; it is not a frequency response study.
- Only one new plant at a time. Double outages (N-1-1), stability, short-circuit strength, and ISO-specific deliverability methods are out of scope.
- Accuracy of the search: the reported value is feasible, and the true limit lies less than two tolerance steps above it.
- PSS/E import: RATEA is the normal rating; the emergency rating is the criteria's emergency percent of RATEA (RATEB is not read in v0.1). Branches with RATEA = 0 are not monitored. HVDC lines, converter stations, static var compensators and batteries are not converted; the import notes list anything skipped.
Validation
- Two-bus hand calculation (thermal limit, N-1 of parallel lines): engine 298.5 MW vs. hand calculation 298.8 MW (−0.09%).
- IEEE 39-bus: the binding result was rebuilt independently, outside the engine, and confirmed feasible at the reported value and violated two tolerance steps above it.
- Generator pickup: hand calculation (units capped at maximum, the rest shared by rating) matches exactly.
- Upgrade value at IEEE 39-bus bus 17 (583 → 744 MW): rebuilt by hand with a voltage-regulating plant and confirmed feasible at the reported value and violated two tolerance steps above it.
- Run time, IEEE 39-bus, all buses, default settings: about 10 minutes on
2 processor cores (
--workers 2). - PSS/E import: RATEA ratings, generator limits and slack handling checked
against the
.rawfiles; the WSCC 9-bus three-winding transformer limit rebuilt by hand. Import power-flow match: within 2e-8 pu (IEEE 14-bus) and 7e-6 pu (WSCC 9-bus). - Unit tests:
pip install -e ".[test,psse]"thenpytest -q.
How to cite
See CITATION.cff. The archived release and its DOI will be listed here.
License
GPL-3.0-or-later. See LICENSE.
Author
Shaibu Ibrahim, P.E.
Metadata
Release files for hostcap-screen 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hostcap_screen-0.1.0.tar.gz | 68.7 kB | Without provenance | Details for hostcap_screen-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hostcap_screen-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for hostcap_screen-0.1.0-py3-none-any.whl |
Total release size: 132.4 kB
Release files / hostcap_screen-0.1.0.tar.gz
| Download URL | hostcap_screen-0.1.0.tar.gz |
|---|---|
| Size | 68.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5b8c6b893b73525e89cf742ffed76773d0b8203f63dffca4f7f7545dd9e698ca
|
|
BLAKE2b-256 checksum How to use checksums |
10d7bf24ba2d88d62ae4bf2a73c283dde8db82311e5d7027db45c6455108bb99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / hostcap_screen-0.1.0-py3-none-any.whl
| Download URL | hostcap_screen-0.1.0-py3-none-any.whl |
|---|---|
| Size | 63.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c40f9f9307456b32b6438533f570a29241782c43cbff9933af2a70740b5a8d2a
|
|
BLAKE2b-256 checksum How to use checksums |
cdc362eacfd3ce3c96bf2a43fa58abda085b451acdec8cedbe8cb7882cc68fb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Security for hostcap-screen 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.