Skip to content

Commit

Permalink
adding reset after warmstart loop
Browse files Browse the repository at this point in the history
  • Loading branch information
bknueven committed Jun 22, 2021
1 parent 4662ad2 commit a543c7f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions egret/models/unit_commitment.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,11 @@ def _lazy_ptdf_termination_cleanup(m, md, time_periods, solver, ptdf_options, pr
if persistent_solver:
lpu._load_pf_slacks(solver, m, t_subset)
_lazy_ptdf_warmstart_copy_violations(m, md, time_periods, solver, ptdf_options, prepend_str)
# After adding so many constraints,
# the warmstart basis is typically
# worse than useless. If the solver
# implements it, reset the solver.
solver.reset()
results = _lazy_ptdf_solve(m, solver, persistent_solver, symbolic_solver_labels, solver_tee, vars_to_load, solve_method_options)
if persistent_solver and duals and (results is not None) and (vars_to_load is None):
solver.load_duals()
Expand Down

0 comments on commit a543c7f

Please sign in to comment.