PFSolver: exclude local shunt from PV/VD bus P/Q reporting - #590
PFSolver: exclude local shunt from PV/VD bus P/Q reporting#590leonardocarreras wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #590 +/- ##
==========================================
+ Coverage 72.14% 72.36% +0.22%
==========================================
Files 491 491
Lines 31623 31633 +10
Branches 16950 16960 +10
==========================================
+ Hits 22815 22892 +77
+ Misses 8722 8670 -52
+ Partials 86 71 -15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
a1aa9cc to
55ba24b
Compare
There was a problem hiding this comment.
DPsim LLM review
TL;DR: One real issue stands out: the new shunt reads in the PV/VD reporting paths need scheduler dependencies to avoid stale attribute values under parallel execution; the rest are low-value style/process nits or documentation/logging suggestions, and the equation/stamping intent otherwise matches the PR. No other correctness or safety problems were confirmed.
Found 2 high, 5 medium, 4 low (0 anchored to lines below).
🔵 Optional / low-confidence (11)
- Missing dependency declaration for shunt parameters read in calculatePAndQAtSlackBus
[high · 35% confidence · unconfirmed]indpsim/src/PFSolverPowerPolar.cpp:484 - Missing dependency declaration for shunt parameters read in calculateQAtPVBuses
[high · 35% confidence · unconfirmed]indpsim/src/PFSolverPowerPolar.cpp:526 - Add debug-level logging for shunt exclusion in calculatePAndQAtSlackBus
[medium · 35% confidence · unconfirmed]indpsim/src/PFSolverPowerPolar.cpp:484 - Add debug-level logging for shunt exclusion in calculateQAtPVBuses
[medium · 35% confidence · unconfirmed]indpsim/src/PFSolverPowerPolar.cpp:526 - Add PFSolverPowerPolar shunt exclusion behavior to documentation
[medium · 35% confidence · unconfirmed]indocs/hugo/content/en/docs/Models/PFSolver.md - Add missing SPDX header to new comment block
[medium · 35% confidence · unconfirmed]indpsim/src/PFSolverPowerPolar.cpp:484 - Add missing SPDX header to new comment block
[medium · 35% confidence · unconfirmed]indpsim/src/PFSolverPowerPolar.cpp:526 - Use const auto for dereferenced shunt parameters
[low · 35% confidence · unconfirmed]indpsim/src/PFSolverPowerPolar.cpp:488 - Use const auto for dereferenced shunt parameters
[low · 35% confidence · unconfirmed]indpsim/src/PFSolverPowerPolar.cpp:530 - Clarify comment for shunt exclusion in calculatePAndQAtSlackBus
[low · 35% confidence · unconfirmed]indpsim/src/PFSolverPowerPolar.cpp:484 - Clarify comment for shunt exclusion in calculateQAtPVBuses
[low · 35% confidence · unconfirmed]indpsim/src/PFSolverPowerPolar.cpp:526
How this review was produced
13 specialized finder passes raised 11 findings over the diff and the full changed sources. After de-duplication, 11 were re-checked against the current file and the base-class / interface headers it inherits (code as truth), escalating survivors to a stronger model: 0 refuted as unsupported, 11 kept (11 tentative).
Automated, non-blocking review. May be wrong. Models: find mistral-small-4-119b-2603, gpt-oss-120b → verify gpt-5.4-mini → final gpt-5.5.
calculatePAndQInjectionPQBusesalready excludes a bus's own shunt when reporting net nodal injection (flow to the rest of the network, matching thePgen - Pd - Gs*Vm^2convention). The PV and VD reporting paths (calculateQAtPVBuses,calculatePAndQAtSlackBus) did not, so a PV or VD bus with a nonzero shunt reported an injection that still included the shunt's own local draw.