Skip to content

Commit a6d6b28

Browse files
Adding xpress postsolve if necessary (#421)
Co-authored-by: Fabian Hofmann <[email protected]>
1 parent 5b51340 commit a6d6b28

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

linopy/solvers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,6 +1581,10 @@ def solve_problem_from_file(
15811581

15821582
m.solve()
15831583

1584+
# if the solver is stopped (timelimit for example), postsolve the problem
1585+
if m.getAttrib("solvestatus") == xpress.solvestatus_stopped:
1586+
m.postsolve()
1587+
15841588
if basis_fn is not None:
15851589
try:
15861590
m.writebasis(path_to_string(basis_fn))

0 commit comments

Comments
 (0)