You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
to_powerdata returns bus va in degrees while its docstring says angles are radians #138
Powers are per unit on baseMVA, angles are radians, bus_i keeps the source bus id [...]
The branch rows honour that — src/exa.jl converts phase_shift_degrees, angle_min_degrees and angle_max_degrees with deg2rad. The bus rows do not:
va =_finite(b.va_degrees, T, label, :va),
so bus.va reaches the caller in degrees while branch.shift, branch.angmin and branch.angmax reach it in radians, out of the same call.
A consumer that trusts the docstring and uses bus.va as a warm start, or compares it against branch.shift, is silently off by 180/pi. It is invisible on a flat start, where every va is zero, which is most test cases.
Expected: va = deg2rad(_finite(b.va_degrees, ...)), matching the branch rows and the docstring. Alternatively rename the field so the unit is stated, but the docstring promise is the simpler thing to keep.
This is a behaviour change for anyone already compensating, so it probably wants a CHANGELOG note.
Found while porting PowerDiff.jl to 0.11 (grid-opt-alg-lab/PowerDiff.jl#76). PowerDiff does not consume bus.va, so it is unaffected either way.
Activity
release: pin powerio v0.11.1