Skip to content

Commit

Permalink
Set PStart on branch switching variables (#163)
Browse files Browse the repository at this point in the history
* Setting PStart on branch switching variables
* Use a more pythonic pattern

---------

Co-authored-by: Simon Bowly <[email protected]>
  • Loading branch information
hhijazi and simonbowly authored Nov 27, 2024
1 parent 1dfc259 commit de22ba8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gurobi_optimods/opf/grbformulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ def lpformulator_optimize(alldata, model, opftype):
for j in range(1, 1 + numbuses):
bus = buses[j]
evar[bus].PStart = 1.0
if alldata["branchswitching_mip"]:
for zvar in alldata["MIP"]["zvar"].values():
zvar.PStart = 1.0
model.update()
model.optimize()

Expand Down

0 comments on commit de22ba8

Please sign in to comment.