Skip to content

Commit

Permalink
Merge pull request #232 from bknueven/itervalues
Browse files Browse the repository at this point in the history
Eliminating Pyomo 6 deprecation warning
  • Loading branch information
michaelbynum authored Jun 1, 2021
2 parents cfad87a + cc3c375 commit 9d3c6cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions egret/common/lazy_ptdf_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,16 +818,16 @@ def uc_instance_binary_relaxer(model, solver):
for ivar in _binary_var_generator(model):
ivar.domain = pyo.UnitInterval
if persistent_solver:
for var in ivar.itervalues():
solver.update_var(var)
for k in ivar:
solver.update_var(ivar[k])

def uc_instance_binary_enforcer(model, solver):
persistent_solver = isinstance(solver, PersistentSolver)
for ivar in _binary_var_generator(model):
ivar.domain = pyo.Binary
if persistent_solver:
for var in ivar.itervalues():
solver.update_var(var)
for k in ivar:
solver.update_var(ivar[k])

def _load_pf_slacks(solver, m, t_subset):
## ensure the slack variables are loaded
Expand Down

0 comments on commit 9d3c6cc

Please sign in to comment.