Skip to content

fix: correct to_powerdata, unify zero impedance handling, name the DC axes (0.11.1) - #144

Open
samtalki wants to merge 2 commits into
mainfrom
claude/powermcp-powerio-tellegen-4orrbc
Open

fix: correct to_powerdata, unify zero impedance handling, name the DC axes (0.11.1)#144
samtalki wants to merge 2 commits into
mainfrom
claude/powermcp-powerio-tellegen-4orrbc

Conversation

@samtalki

@samtalki samtalki commented Sep 6, 2026

Copy link
Copy Markdown
Member

Summary

PowerIO.jl 0.11.1: the six findings from the PowerDiff.jl port, against PowerIO 0.11.1 over C ABI 7 (eigenergy/powerio branch of the same name, which the Julia binding job resolves).

Return types of the existing calc_* functions are unchanged (0.11.x compatible). Project.toml is 0.11.1, the changelog and NEWS carry the section, and .github/powerio-release.toml is back in draft for the maintainer's prepare-intent.

Closes #138, closes #139, closes #140, closes #141, closes #142, closes #143

Validation

Pkg.test() against a powerio-capi built from the companion branch (POWERIO_CAPI set): 1041 passed. The powerio repository's check-capi-v7.sh passes with this checkout (245 entry points named, all declared).

🤖 Generated with Claude Code

https://claude.ai/code/session_01NoJFzdnTLwtFZLPhUeyCvR


Generated by Claude Code

… axes (0.11.1)

The six findings from the PowerDiff.jl port, bound against PowerIO 0.11.1 over
C ABI 7.

- to_powerdata returns bus.va in radians, as its docstring states (#138);
  generator rows carry model, cost.model verbatim or 0 without a cost record
  (#142); validation runs only on in-service rows, so an out of service row
  cannot refuse the conversion, and strict=false copies in-service rows as
  stated (#143).
- One zero impedance convention (#140): the DC calc_* family, the Julia
  assembled admittance matrices and to_powerdata throw PowerIOError with code
  BUILD.OPERATOR.ZERO_IMPEDANCE and every one accepts skip_zero_impedance=true;
  to_powerdata(net; zero_impedance=:open) keeps the former substitution as an
  explicit choice. ArgumentError is no longer thrown for assembly failures.
- calc_dc_index_map names the bus and branch axes every DC calculation shares
  (#139); each calc_* docstring states its row and column selection; the
  binding builds the operators once through the pio_calc_dc_operators handle
  PowerIO 0.11.1 adds.
- calc_branch_admittances returns (y_ff, y_ft, y_tf, y_tt) per in-service
  branch and to_powerdata documents the c1..c8 correspondence (#141).

Project.toml is 0.11.1 with the changelog and news sections; the release
intent returns to draft for prepare-intent. Two small original MATPOWER
fixtures cover the zero impedance tie and the out of service cubic cost.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NoJFzdnTLwtFZLPhUeyCvR
`calc_branch_admittances` documented its rows as the selection
`calc_dc_index_map` reports. They are not the same axis: the DC branch axis
omits self loop branches and appends three winding transformer windings, while
this function walks `net.branches` and filters on `in_service` alone. The
`calc_dc_index_map` docstring made the mirror claim about the `c1..c8` rows of
`to_powerdata`, which emits one row per branch with its own `status`. Reword
both, and the Matrices page, to state each axis for what it is.

`_branch_coeffs` carried an `open` keyword whose guard could never fire: the
single call site passes `open=true`, and the real check, with the branch and
its buses named, already runs before the call. Remove the keyword and the dead
throw; the zero series admittance substitution stays, since that is the
`zero_impedance=:open` path.

Pin that `strict=false` relaxes the field checks only, not the zero impedance
refusal, in the bridge tests.

Emit a workflow warning when the companion powerio branch lookup falls back to
`.github/powerio-companion`, so the substitution is visible in the run summary
rather than buried in the step log. The earlier red CI on this PR was that
fallback: the branch lookup ran seconds before the companion branch existed,
so the job built a C ABI older than the views this branch mirrors. This push
reruns CI, which now resolves the companion branch.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NoJFzdnTLwtFZLPhUeyCvR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment