Skip to content

Commit 0ef38e4

Browse files
fix: Allow COPT solution parsing for IMPRECISE status
Add 'numerical' and 'imprecise' as proper TerminationCondition enum values and map them to SolverStatus.ok to enable solution extraction for both COPT solver statuses. This fixes issue #460 where COPT solutions with IMPRECISE status were not being parsed, even though COPT developers confirmed solutions should be available for OK, NUMERICAL, and IMPRECISE statuses. Co-authored-by: Fabian Hofmann <[email protected]>
1 parent d3b7b0d commit 0ef38e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

linopy/constants.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ class TerminationCondition(Enum):
106106
iteration_limit = "iteration_limit"
107107
terminated_by_limit = "terminated_by_limit"
108108
suboptimal = "suboptimal"
109+
numerical = "numerical"
110+
imprecise = "imprecise"
109111

110112
# WARNING
111113
unbounded = "unbounded"
@@ -141,6 +143,8 @@ def process(
141143
TerminationCondition.time_limit,
142144
TerminationCondition.terminated_by_limit,
143145
TerminationCondition.suboptimal,
146+
TerminationCondition.numerical,
147+
TerminationCondition.imprecise,
144148
],
145149
SolverStatus.warning: [
146150
TerminationCondition.unbounded,

0 commit comments

Comments
 (0)