Skip to content

Bug fixes from parsing industrial cases - #62

Merged
jd-lara merged 2 commits into
psy6from
mb/pffp-fixes
Sep 23, 2026
Merged

jd-lara merged 2 commits into
psy6from
mb/pffp-fixes

Conversation

@m-bossart

Copy link
Copy Markdown
  1. Scale the tap ratio limits correctly when CW=2. Note that this does not resolve the semantic issues of the control limit fields depending on the control. This is being address separately by @annacasavant
  2. Handle substation records without any nodes, a pattern prevalent in the SSWG cases. This PR drops these records in the PowerModels conversion step

RMA/RMI bracket a winding's turns ratio in the record's CW units. The ratio
itself was converted to per unit, but the limits were passed through as read,
so under CW=2 a per-unit tap sat against a band in kV.

Both transformer paths now build the factor that maps a CW-unit WINDV onto the
modeled ratio and apply that one factor to the ratio and to its limits: the 2W
`tap` (which also divides by WINDV2) and each 3W winding's turns ratio. The
phase-shift objectives (|COD| 3 or 5) bracket an angle in degrees and are left
as read. `ext` keeps the record's own values.
A SUBSTATION record with an empty node block attaches to no bus, so it has no
bus-branch representation. `_psse2pm_substation_data!` emitted it anyway, and
the OpenAPI reader, which associates each substation with the buses its nodes
name, rejected the whole file.

The conversion now skips such records and reports the count once. A skipped
record that still carries switching devices or terminals references nodes that
do not exist, so it also gets its own warning. pti.jl keeps every record, and
`read_substations!` keeps its throw as an invariant check.
@codecov

codecov Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.55172% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pm_io/psse.jl 96.55% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@jd-lara
jd-lara merged commit 4dc0d72 into psy6 Sep 23, 2026
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants