Skip to content

Commit

Permalink
[#123] trying to fix doc-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hhijazi committed Oct 10, 2024
1 parent 66179c6 commit ab17a02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/source/mods/opf/opf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ solution information, as specified below.
:options: +NORMALIZE_WHITESPACE

>>> result['bus'][0]
{... 'Vm': 1.09..., 'Va': 0, ...}
{... 'Vm': 1.09..., 'Va': 0.0, ...}

.. tab:: Branches

Expand Down
5 changes: 4 additions & 1 deletion src/gurobi_optimods/opf/violations.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ def grbderive_xtra_sol_values_from_voltages(alldata, model):
var = item[1]

row = model.getRow(constr)
sum = -constr.RHS
if constr.getAttr("QCRHS") is None:
sum = -constr.RHS
else:
sum = -constr.QCRHS
leadcoeff = 0
for i in range(row.size()):
v = row.getVar(i)
Expand Down

0 comments on commit ab17a02

Please sign in to comment.