Skip to content

Fixed error during compilation #1040

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/pyscipopt/scip.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,13 @@ _SCIP_BOUNDTYPE_TO_STRING = {SCIP_BOUNDTYPE_UPPER: '<=',

cdef extern from "scip/config.h":
"""
#ifndef WITH_DEBUG_SOLUTION
#define WITH_DEBUG_SOLUTION 0
#ifdef WITH_DEBUG_SOLUTION
#define PYSCIPOPT_WITH_DEBUG_SOLUTION 1
#else
#define PYSCIPOPT_WITH_DEBUG_SOLUTION 0
#endif
"""
bint WITH_DEBUG_SOLUTION
bint PYSCIPOPT_WITH_DEBUG_SOLUTION

# Mapping the SCIP_RESULT enum to a python class
# This is required to return SCIP_RESULT in the python code
Expand Down Expand Up @@ -7506,15 +7508,15 @@ cdef class Model:
a debug solution during the solution process of SCIP. It must be explicitly
enabled for the SCIP data structure.
"""
if not WITH_DEBUG_SOLUTION:
if not PYSCIPOPT_WITH_DEBUG_SOLUTION:
raise RuntimeError("SCIP must be built with `DEBUGSOL=true` to enable the debug solution mechanism.")
SCIPenableDebugSol(self._scip)

def disableDebugSol(self):
"""
Disables the debug solution mechanism.
"""
if not WITH_DEBUG_SOLUTION:
if not PYSCIPOPT_WITH_DEBUG_SOLUTION:
raise RuntimeError("SCIP must be built with `DEBUGSOL=true` to disable the debug solution mechanism.")
SCIPdisableDebugSol(self._scip)

Expand Down