Skip to content

Commit

Permalink
small fix to _pq_from_cosphi()
Browse files Browse the repository at this point in the history
  • Loading branch information
SteffenMeinecke committed Nov 16, 2021
1 parent 5fcd87e commit 4f092a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandapower/toolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ def _pq_from_cosphi(s, cosphi, qmode, pmode):
'(Q injection, increases voltage). Please use "underexcited" ' +
'in place of "ind" and "overexcited" in place of "cap".')
if qmode == "ind" or qmode == "underexcited":
qsign = 1 if pmode == "load" else -1
qsign = 1
elif qmode == "cap" or qmode == "overexcited":
qsign = -1 if pmode == "load" else 1
qsign = -1
else:
raise ValueError('Unknown mode %s - specify "underexcited" (Q absorption, decreases voltage'
') or "overexcited" (Q injection, increases voltage)' % qmode)
Expand Down

0 comments on commit 4f092a4

Please sign in to comment.