diff --git a/linopy/solvers.py b/linopy/solvers.py index 2b27ce4c..c52cd7be 100644 --- a/linopy/solvers.py +++ b/linopy/solvers.py @@ -1478,6 +1478,10 @@ def solve_problem_from_file( m.solve() + # if the solver is stopped (timelimit for example), postsolve the problem + if m.getAttrib("solvestatus") == xpress.solvestatus_stopped: + m.postsolve() + if basis_fn is not None: try: m.writebasis(path_to_string(basis_fn))