Skip to content

fix(dist): preserve ordered OpenDSS source and line snapshots - #599

Merged
samtalki merged 27 commits into
codex/gridlabd-pr-01-sourcefrom
codex/gridlabd-pr-02-dss-fidelity
Oct 27, 2026
Merged

samtalki merged 27 commits into
codex/gridlabd-pr-01-sourcefrom
codex/gridlabd-pr-02-dss-fidelity

Conversation

@frederikgeth

@frederikgeth frederikgeth commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

OpenDSS sources and lines previously lost native assignment order, source impedance and source-return semantics during typed conversion. Resolve executed snapshot state for Circuit/Vsource, Line and LineCode, including copying, frequency changes and native cache invalidation. Materialize finite source impedance separately from ideal EMF constraints and write independent/floating source constraints with exact circuits. Retain disabled source state and unused LineCode definitions without inventing electrical components. Invalid snapshots fail before output and retain their source diagnostics.

Native feature qualification covers 240 source imports, 156 canonical/repeated source cases, and 666 line-state cases / 732 lines / 26,196 complex observations with 732 resistance negative controls. The existing derived dot-product bound remains required for sixty current comparisons; raw discrepancies and matrix budgets are unchanged. Coordinate landing with the Julia static-consumer companion eigenergy/PowerIO.jl#167.

Rebased onto Rust main c505aa9a0cabe56b618fc7c6f55853fc141e74f0 on 27 October 2026. Parent: #598 (codex/gridlabd-pr-01-source). Current head: 162b9d430c11e9b559efa6ff7063d9c9747f798c. The complete #598 → #610 chain includes #598's later pre-allocation include-budget fix, current-main correctness fixes and unchanged published schemas. Julia CI pins PowerIO.jl #167 at 84cb0af3a191ebc5a735319e6a0bd12fe09a7e70.

Fresh local validation of the cumulative stack: 3,268 workspace/C ABI tests passed (42 existing ignores), all seven CI Clippy configurations passed, conversion-matrix findings are unchanged, and the generated 0.11.7 schema matches. Root budget tests pass on Rust 1.99 and 1.88 (89 each); the DSS fidelity checkpoint passes 566 distribution tests (9 existing ignores). Both Julia companions passed against matching full-feature libraries (1,975 / 2,068 assertions, one existing broken test each), with byte-exact raw-binding regeneration. All 23 Python oracle/control unit tests pass.

Fresh current-head hosted CI is running. These cumulative local results do not substitute for each prefix's hosted checks. Native qualification figures above refer to existing pinned feature evidence; the complete feeder-oracle corpus was not rerun. See the committed qualification guide and #697 for current status.

Sam's review/approval remains required. Future integration keeps #598 → #610 order, pairing Julia #167 with Rust #599 and Julia #168 with Rust #610 and checking actual main between authorized merges. No PR merge, tag, deployment or release is authorized.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Conversion Matrix

Legend

Cells show X/Y: observed warnings / expected warnings. Counts include source parse, target write, and target readback.

A nonzero cell means the target format cannot carry what the source stated, and every warning names the field or record it cannot carry. A write or readback warning names a field of the target format; a source parse warning, which every cell of that row shares, names what the source document itself leaves unstated. A warning that named a writer PowerIO could extend instead of a limit of the format would be a defect in this table.

  • 🟢 0/0: no warnings and checked invariants held.
  • 🟡 X=Y: observed warnings match the reviewed expected count, and that count is nonzero.
  • 🔴 X!=Y or invariant failure: behavior changed. If warnings decreased because fidelity improved, update the expected counts in the same PR.
  • Expected counts are the *_WARNING_BASELINE arrays in powerio-cli/tests/conversion_matrix_report.rs; accept an intentional change by editing the matching source/target entry in the same PR.

Transmission

Six generated cases per writable source row; one vendored case per read-only source row.

Into a case format

Source ↓ / target → MATPOWER .m PowerModels JSON PSS/E .raw 33 PSS/E RAWX 35 PowerWorld .aux egret JSON pandapower JSON Surge JSON PSLF .epc
MATPOWER .m 🟢 0/0 🟡 1/1 🟡 15/15 🟡 15/15 🟡 18/18 🟡 7/7 🟡 14/14 🟡 23/23 🟡 14/14
PowerModels JSON 🟢 0/0 🟢 0/0 🟡 15/15 🟡 15/15 🟡 17/17 🟡 6/6 🟡 13/13 🟡 22/22 🟡 13/13
PSS/E .raw 33 🟡 1/1 🟡 1/1 🟢 0/0 🟢 0/0 🟡 2/2 🟡 1/1 🟡 3/3 🟡 1/1 🟡 2/2
PSS/E RAWX 35 🟡 1/1 🟡 1/1 🟢 0/0 🟢 0/0 🟡 2/2 🟡 1/1 🟡 3/3 🟡 1/1 🟡 2/2
PowerWorld .aux 🟡 1/1 🟢 0/0 🟡 6/6 🟡 6/6 🟢 0/0 🟢 0/0 🟡 8/8 🟢 0/0 🟡 6/6
egret JSON 🟢 0/0 🟢 0/0 🟡 9/9 🟡 9/9 🟡 12/12 🟢 0/0 🟡 7/7 🟡 1/1 🟡 7/7
pandapower JSON 🟢 0/0 🟢 0/0 🟡 7/7 🟡 7/7 🟡 8/8 🟢 0/0 🟢 0/0 🟢 0/0 🟡 7/7
Surge JSON 🟢 0/0 🟢 0/0 🟡 9/9 🟡 9/9 🟡 12/12 🟢 0/0 🟡 6/6 🟢 0/0 🟡 7/7
PSLF .epc 🟢 0/0 🟢 0/0 🟡 1/1 🟡 1/1 🟡 1/1 🟢 0/0 🟡 4/4 🟡 3/3 🟢 0/0
XIIDM 1.17 🟡 9/9 🟡 7/7 🟡 33/33 🟡 33/33 🟡 8/8 🟡 7/7 🟡 9/9 🟡 7/7 🟡 8/8
JIIDM 1.17 🟡 9/9 🟡 7/7 🟡 33/33 🟡 33/33 🟡 8/8 🟡 7/7 🟡 9/9 🟡 7/7 🟡 8/8
CGMES 3.0 🟡 8/8 🟡 6/6 🟡 67/67 🟡 42/42 🟡 6/6 🟡 6/6 🟡 7/7 🟡 6/6 🟡 6/6
UCTE-DEF .uct 🟡 18/18 🟡 12/12 🟡 6/6 🟡 6/6 🟡 18/18 🟡 12/12 🟡 6/6 🟡 12/12 🟡 18/18
PyPSA CSV 🟢 0/0 🟡 6/6 🟡 14/14 🟡 14/14 🟡 14/14 🟡 6/6 🟡 9/9 🟡 6/6 🟡 12/12
GridFM Parquet 🟡 6/6 🟢 0/0 🟡 14/14 🟡 14/14 🟡 14/14 🟡 6/6 🟡 9/9 🟢 0/0 🟡 12/12
PSS/E .raw 32 🟡 5/5 🟡 4/4 🟡 2/2 🟡 2/2 🟡 4/4 🟡 4/4 🟡 5/5 🟡 4/4 🟡 6/6
IEEE CDF 🟡 8/8 🟡 8/8 🟡 6/6 🟡 6/6 🟡 8/8 🟡 8/8 🟡 9/9 🟡 8/8 🟡 8/8
GO Challenge 3 JSON 🟡 6/6 🟡 5/5 🟡 7/7 🟡 7/7 🟡 9/9 🟡 5/5 🟡 7/7 🟡 5/5 🟡 7/7
DeepMind OPFData JSON 🟡 3/3 🟡 2/2 🟡 5/5 🟡 5/5 🟡 5/5 🟡 3/3 🟡 4/4 🟡 2/2 🟡 4/4

Into an exchange format

Source ↓ / target → XIIDM 1.17 JIIDM 1.17 CGMES 3.0 UCTE-DEF .uct
MATPOWER .m 🟡 70/70 🟡 70/70 🟡 57/57 🟡 42/42
PowerModels JSON 🟡 69/69 🟡 69/69 🟡 56/56 🟡 41/41
PSS/E .raw 33 🟡 32/32 🟡 32/32 🟡 12/12 🟡 29/29
PSS/E RAWX 35 🟡 32/32 🟡 32/32 🟡 12/12 🟡 29/29
PowerWorld .aux 🟡 54/54 🟡 54/54 🟡 30/30 🟡 33/33
egret JSON 🟡 68/68 🟡 68/68 🟡 36/36 🟡 36/36
pandapower JSON 🟡 55/55 🟡 55/55 🟡 35/35 🟡 52/52
Surge JSON 🟡 67/67 🟡 67/67 🟡 36/36 🟡 36/36
PSLF .epc 🟡 38/38 🟡 38/38 🟡 11/11 🟡 28/28
XIIDM 1.17 🟢 0/0 🟢 0/0 🟡 179/179 🟡 60/60
JIIDM 1.17 🟢 0/0 🟢 0/0 🟡 179/179 🟡 60/60
CGMES 3.0 🟡 44/44 🟡 44/44 🟢 0/0 🟡 51/51
UCTE-DEF .uct 🟡 36/36 🟡 36/36 🟡 12/12 🟢 0/0
PyPSA CSV 🟡 70/70 🟡 70/70 🟡 38/38 🟡 38/38
GridFM Parquet 🟡 64/64 🟡 64/64 🟡 32/32 🟡 40/40
PSS/E .raw 32 🟡 14/14 🟡 14/14 🟡 9/9 🟡 10/10
IEEE CDF 🟡 13/13 🟡 13/13 🟡 8/8 🟡 14/14
GO Challenge 3 JSON 🟡 8/8 🟡 8/8 🟡 7/7 🟡 14/14
DeepMind OPFData JSON 🟡 32/32 🟡 32/32 🟡 8/8 🟡 32/32

Into a dataset directory

Source ↓ / target → PyPSA CSV GridFM Parquet
MATPOWER .m 🟡 15/15 🟡 31/31
PowerModels JSON 🟡 14/14 🟡 30/30
PSS/E .raw 33 🟡 9/9 🟡 28/28
PSS/E RAWX 35 🟡 9/9 🟡 28/28
PowerWorld .aux 🟡 13/13 🟡 27/27
egret JSON 🟡 9/9 🟡 25/25
pandapower JSON 🟡 8/8 🟡 18/18
Surge JSON 🟡 9/9 🟡 25/25
PSLF .epc 🟡 8/8 🟡 27/27
XIIDM 1.17 🟡 15/15 🟡 53/53
JIIDM 1.17 🟡 15/15 🟡 53/53
CGMES 3.0 🟡 13/13 🟡 51/51
UCTE-DEF .uct 🟡 12/12 🟡 36/36
PyPSA CSV 🟢 0/0 🟡 15/15
GridFM Parquet 🟡 12/12 🟢 0/0
PSS/E .raw 32 🟡 6/6 🟡 12/12
IEEE CDF 🟡 9/9 🟡 11/11
GO Challenge 3 JSON 🟡 9/9 🟡 11/11
DeepMind OPFData JSON 🟡 5/5 🟡 4/4

Distribution

Seven cases per source row.

Into a distribution format

Source ↓ / target → OpenDSS .dss BMOPF JSON PMD JSON
OpenDSS .dss 🟡 28/28 🟡 121/121 🟡 323/323
BMOPF JSON 🟡 51/51 🟢 0/0 🟡 26/26
PMD JSON 🟡 57/57 🟡 46/46 🟢 0/0

Geographic Layer

One case per source row.

Into the geographic layer document

Source ↓ / target → geo-json
PowerWorld .aux substation coordinates 🟢 0/0

A geographic layer is a powerio.GeoLayer, not a network: no grid exchange format states a standalone layer, so the layer has its own table rather than a row of the network matrix. Its source is the substation coordinates of a vendored PowerWorld auxiliary file.

Full warning details: download conversion-matrix-warning-details for this workflow run.

@frederikgeth
frederikgeth force-pushed the codex/gridlabd-pr-02-dss-fidelity branch from 9731e43 to fa48cb0 Compare October 10, 2026 22:38
@frederikgeth
frederikgeth marked this pull request as ready for review October 11, 2026 01:20
@samtalki
samtalki added this pull request to stack #633 October 15, 2026 19:32
@frederikgeth
frederikgeth force-pushed the codex/gridlabd-pr-02-dss-fidelity branch from b4d655c to 25d1fa1 Compare October 17, 2026 00:09
@frederikgeth
frederikgeth removed this pull request from stack #633 October 24, 2026 23:26
@frederikgeth
frederikgeth added this pull request to stack #698 October 24, 2026 23:26
samtalki and others added 2 commits October 27, 2026 10:05
# Conflicts:
#	CHANGELOG.md
#	powerio-dist/tests/cim.rs
@samtalki
samtalki merged commit be6f85a into main Oct 27, 2026
0 of 48 checks passed
samtalki added a commit that referenced this pull request Oct 27, 2026
…ine (#740)

Clippy 1.99's assert_is_empty lint fails two tests added today; compare
the slices with assert_eq!/assert_ne! instead.

The cim-dist schema baseline predates #599, where the dss reader began
stating each Vsource as an ideal EMF plus a series Thevenin line. The
writer emits that line as an ACLineSegment with two Terminals, so each dss
fixture output has two more Terminal.phases profile findings. Record the
new counts, a baseline for the case3_balanced PMD fixture from #738, and
the expected refusal for its multinetwork variant, which parses to a time
series that cim-dist cannot write.


Claude-Session: https://claude.ai/code/session_017y9wBqFvHDPxuADQVtZTEZ

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants