Skip to content

Add opt-in EvEMTBench ZIP loads and YNd11 zero-sequence mapping and address PR #122 follow-ups - #138

Merged
qian-harvard merged 5 commits into
Power-Agent:mainfrom
aswinkrishnapoyil:fix/powerfactory-pr122-followups
Oct 30, 2026
Merged

qian-harvard merged 5 commits into
Power-Agent:mainfrom
aswinkrishnapoyil:fix/powerfactory-pr122-followups

Conversation

@aswinkrishnapoyil

@aswinkrishnapoyil aswinkrishnapoyil commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Addresses the three follow-ups from PR #122 and adds opt-in EvEMTBench ZIP loads and a restricted transformer zero-sequence equivalent.

PR #122 follow-ups

  • Reject non-boolean out_of_service and open_digsilent inputs before connecting to PowerFactory.
  • Correct the obsolete documentation statement about unchanged MCP tools.
  • Package all three reference pages and check their presence in the installed-wheel smoke test.

Opt-in ZIP loads

  • Add load_model="zip" with an explicit new type_name.
  • Keep constant-power creation as the default, preserving existing seeded P/Q samples.
  • Sample ZIP coefficients within Table 5 ranges and sum-to-one constraints.
  • Create and verify a dedicated TypLod and connected ElmLod.
  • Bind model, type destination, coefficients and exponents to confirmation.
  • Roll back newly created objects on failure and report incomplete cleanup.

Opt-in transformer zero-sequence equivalent

  • Add zero_sequence_model="ynd11_equivalent" for 20 MVA, 110/20 kV, 60 Hz, YNd11 only.
  • Keep zero_sequence_model="unchanged" as the default.
  • Require explicit r0_r1_ratio and x0_x1_ratio within Table 10 three-limb numerical intervals.
  • Map R0 and X0 separately from positive-sequence values.
  • Create and verify a dedicated TypTr2 and connected ElmTr2, including derived impedance values and explicit solid HV-neutral grounding.
  • Bind model, ratios, grounding and type destination to confirmation.
  • Verify retained values and report incomplete rollback.
  • Keep the partial-mapping disclosure: no physical core/limb model is configured; Tables 10 and 12 are not fully mapped.

Validation

  • Latest Lab PC automated run: 197 tests and 458 subtests passed.
  • FT-28: ZIP type writes and seven isolated load-flow voltage-response checks passed.
  • FT-29: Unified creator successfully created and verified an out-of-service ZIP load and its type.
  • FT-30: Transformer type writes and isolated Complete Method earth-fault sensitivity checks passed, including unchanged three-phase controls and delta-terminal I0 blocking.
  • FT-31: Unified creator successfully created and read back the dedicated YNd11 type and out-of-service transformer, including zero-sequence impedance, type assignment and HV grounding.
  • FT-32: Independent analytical sequence-network reference agreed with PowerFactory for an unloaded, lossless YNd11 equivalent. Baseline, increased R0, increased X0 and 20-ohm neutral-resistance cases all passed, together with a source-only control.
  • FT-32 maximum reported relative current error: approximately 8.94e-9, against a predeclared 0.5% relative / 0.00001 kA absolute tolerance.
  • FT-32 includes complete account-sanitized JSON, the standalone diagnostic script, reproduction instructions and offline regression tests.
  • Restoration and cleanup were confirmed for the isolated transformer tests.
  • Preparation wheel/catalog smoke checks and whitespace checks passed.

Scope and limitations

The voltage-response and earth-fault calculations used separate diagnostic networks. No calculation was run on either integrated out-of-service component.

FT-32 establishes independent absolute-current agreement only for the restricted unloaded, lossless equivalent. It does not certify absolute currents for the original lossy transformer or the integrated transformer, and does not widen the creator's supported configurations.

Physical core/limb, zero-sequence magnetizing, internal-delta YNyn and saturation mappings remain unsupported. RMS/EMT behavior remains unvalidated.

@aswinkrishnapoyil aswinkrishnapoyil changed the title Fix EvEMTBench boolean validation and package reference documentation Add opt-in EvEMTBench ZIP loads and address PR #122 follow-ups Oct 23, 2026
@aswinkrishnapoyil aswinkrishnapoyil changed the title Add opt-in EvEMTBench ZIP loads and address PR #122 follow-ups Add opt-in EvEMTBench ZIP loads and YNd11 zero-sequence mapping and address PR #122 follow-ups Oct 23, 2026

@qian-harvard qian-harvard left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, all three #122 follow-ups are fixed, and both new modes are opt-in with the defaults unchanged. Merged onto current main:

  • The full CI suite passes: 744 passed, 459 subtests passed.
  • out_of_service or open_digsilent set to "false" or 0 is now rejected before connecting, for every component type.
  • The obsolete "unchanged" sentence is gone. The built wheel ships all three reference pages, and evidence/ stays out of the sdist.
  • list_evemtbench_components advertises load_model, type_name, zero_sequence_model, r0_r1_ratio and x0_x1_ratio with the right defaults.
  • ynd11_equivalent rejects ratios that are missing, boolean, strings or outside the Table 10 three-limb intervals. It also rejects any transformer that isn't 20 MVA, 110/20 kV, 60 Hz YNd11.
  • ZIP sampling keeps every coefficient inside its Table 5 interval, and each set sums to 1.

I can't run PowerFactory here, so the live behaviour rests on your FT-28 to FT-32 Lab PC evidence, which is thorough.

@qian-harvard
qian-harvard merged commit 20a9178 into Power-Agent:main Oct 30, 2026
5 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