Skip to content

Commit 7e8f363

Browse files
fix: Allow COPT solution parsing for IMPRECISE status (#466)
* 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]> * revert: Remove 'numerical' termination condition, keep only 'imprecise' Remove 'numerical' enum value and mapping from STATUS_TO_TERMINATION_CONDITION_MAP while preserving the 'imprecise' additions for COPT solver compatibility. Co-authored-by: Fabian Hofmann <[email protected]> --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Fabian Hofmann <[email protected]>
1 parent d3b7b0d commit 7e8f363

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

linopy/constants.py

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

110111
# WARNING
111112
unbounded = "unbounded"
@@ -141,6 +142,7 @@ def process(
141142
TerminationCondition.time_limit,
142143
TerminationCondition.terminated_by_limit,
143144
TerminationCondition.suboptimal,
145+
TerminationCondition.imprecise,
144146
],
145147
SolverStatus.warning: [
146148
TerminationCondition.unbounded,

0 commit comments

Comments
 (0)