diff --git a/linopy/solvers.py b/linopy/solvers.py index 8ccdbcd1..fcc1d185 100644 --- a/linopy/solvers.py +++ b/linopy/solvers.py @@ -1581,6 +1581,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))