Skip to content

Commit

Permalink
Merge pull request #236 from bknueven/reset_after_warmstart
Browse files Browse the repository at this point in the history
Adding reset after pre-lp warmstart loop
  • Loading branch information
michaelbynum authored Jun 28, 2021
2 parents 64dbfdf + a543c7f commit 2ff6d41
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 2ff6d41

Please sign in to comment.