Skip to content

import contract fixes - #26

Merged
jd-lara merged 6 commits into
psy6from
jd/import-contract-fixes
Jul 29, 2026
Merged

import contract fixes#26
jd-lara merged 6 commits into
psy6from
jd/import-contract-fixes

Conversation

@jd-lara

@jd-lara jd-lara commented Jul 27, 2026

Copy link
Copy Markdown
Member

No description provided.

jd-lara added 5 commits July 26, 2026 08:09
The parser stored TwoTerminalVSCLine DCSET values raw (kV for the
DC-voltage-controlling side, MW otherwise), but PSY documents
dc_setpoint_from/to as per-unit of rated_dc_voltage on the DC-voltage
side and per-unit of baseMVA otherwise. Derive base_voltage/flow_setpoint
before assigning the setpoints, emit rated_dc_voltage, and normalize
dc_setpoint_from/to accordingly. Also split the ambiguous "must set a
voltage control" error into distinct zero- and two-voltage-controller
cases.
The switched-shunt parser stashed MODSW (control mode) and SWREM
(regulated bus number) in sub_data["ext"], where PSCB's make_switched_shunt
never read them. Set sub_data["control_mode"] and
sub_data["regulated_bus_number"] directly instead, for both v30/32/33 and
v35 sources.

pti.jl's dtypes list names this column "SWREM" for every source version,
including v35 where the PSS/E spec itself calls it SWREG, so a single read
of switched_shunt["SWREM"] covers all versions.
…to reactive_power_required

RMPCT was being mapped into the PSY field now documented as a solver output
(reactive_power_required), and regulated_bus_number was never populated from
FCREG (v35) / REMOT (v32/v33). v30's FACTS record layout has no REMOT field
at all, so that branch falls back to 0.
RMPCT was dropped entirely from the FACTS parse path; keep it as
metadata-only ext data, matching the switched-shunt policy.
_default_switched_shunt_v35 (the SWREG variant) has no references anywhere
in the repo; both _pti_defaults and _pti_defaults_v35 map "SWITCHED SHUNT"
to the plain _default_switched_shunt. Foot-gun for the next reader.
@jd-lara
jd-lara requested a review from m-bossart July 27, 2026 13:48
Comment thread .claude/Sienna.md
Comment on lines +9 to +10
3. the psy6 workspace root `CLAUDE.md` — workspace architecture, design decisions, seams, and the knowledge index (audit, active plans).
4. the workspace top-level `CLAUDE.md` (one level above the psy6 root) — the two-line workspace layout and git/test policy.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these files tracked anywhere?

@jd-lara
jd-lara merged commit 7464fea into psy6 Jul 29, 2026
5 of 7 checks passed
@jd-lara
jd-lara deleted the jd/import-contract-fixes branch July 30, 2026 04:30
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