Skip to content

Commit f40f2fc

Browse files
committed
Ensure opf test gets the correct result
1 parent 16948af commit f40f2fc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test_nlp_opf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ def branch_flow(vars, params):
204204

205205
assert P_value_sum > total_load_p
206206

207+
objective_value = model.get_model_attribute(poi.ModelAttribute.ObjectiveValue)
208+
assert objective_value == pytest.approx(1.7552e4, rel=1e-3)
209+
207210

208211
if __name__ == "__main__":
209212
from pyoptinterface import ipopt

0 commit comments

Comments
 (0)