Skip to content

Fix/pv handoff harmonic cache - #8

Merged
Markus-de-Koster merged 2 commits into
mainfrom
fix/pv-handoff-harmonic-cache
Sep 24, 2026
Merged

Markus-de-Koster merged 2 commits into
mainfrom
fix/pv-handoff-harmonic-cache

Conversation

@Markus-de-Koster

Copy link
Copy Markdown
Member

No description provided.

Markus-de-Koster and others added 2 commits September 24, 2026 16:04
…tors

Carry solved generator reactive power, including Q-limit states and unequal
per-phase regulation, into harmonic source initialization, device shunts and
current recovery. Preserve gradients and leave caller operating points intact.

Distinguish solver-produced reactive-power readout from ordinary prescribed
inputs. Symmetric input resolution ignores a user's phase split with a warning;
only solved readout preserves the allocation required by nodal balance. Warn
when symmetric inputs nevertheless yield unequal solved PV Q, and document the
difference between input symmetry and positive-sequence/per-phase regulation.

Snapshot prepared-system overrides and branch states by value so replacement,
addition, removal and in-place edits cannot silently reuse stale factors.
Include cached voltage-base and connection metadata in network validation.
Equal-valued replacement tensors retain factor reuse with current gradients.

Add PV/PQ equivalence, phase allocation, limit, mutation and differentiation
regressions, including native OpenDSS harmonics and pandapower network updates.

Co-authored-by: Codex <[email protected]>
Expose explicit harmonic preparation through HarmonicFlowSystem and
prepare_harmonic_flow, with simulation and chunked-scenario integration.
Recompute operating points, device shunts and injections on every solve.
Validate complete assembly dependencies and compare evaluated matrices and
numerical options exactly before reusing factors. Rebuild affected entries
when parameters, frequency, topology, connection state or defaults change.

Bypass harmonic numerical caching for matrix gradients so repeated backward
passes use the current graph. Bound retained entries, release obsolete factors
before rebuilding, and avoid retaining scenario factors for streaming chunks.
Document worker-local ownership, shared-input restrictions and whole-solve
locking for callers that need to share a preparation.

Add mutation, backend, fusion, solved-Q, gradient, lifecycle and worker-local
regressions. Extend native OpenDSS comparisons to the prepared path. Include a
standalone synthetic-feeder benchmark requiring no external repository,
reference solver, Git executable or dataset; distinguish identical-batch
replay from genuinely changed operating points.

Co-authored-by: Codex <[email protected]>
@Markus-de-Koster
Markus-de-Koster merged commit 966df9d into main Sep 24, 2026
8 checks passed
@Markus-de-Koster
Markus-de-Koster deleted the fix/pv-handoff-harmonic-cache branch September 24, 2026 14:26
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.

1 participant