From 3aac80a13b9e420ddf93ebef5bd6b8a02064bae3 Mon Sep 17 00:00:00 2001 From: Joao-Dionisio Date: Tue, 28 Nov 2023 16:40:21 +0000 Subject: [PATCH 01/11] EVENTTYPE Overhaul --- src/pyscipopt/scip.pxd | 90 +++++++++++++++++++++--------------------- 1 file changed, 46 insertions(+), 44 deletions(-) diff --git a/src/pyscipopt/scip.pxd b/src/pyscipopt/scip.pxd index bbf12f566..44478f965 100644 --- a/src/pyscipopt/scip.pxd +++ b/src/pyscipopt/scip.pxd @@ -197,43 +197,45 @@ cdef extern from "scip/scip.h": SCIP_BASESTAT_ZERO = 3 - ctypedef enum SCIP_EVENTTYPE: - SCIP_EVENTTYPE_DISABLED = 0x00000000u - SCIP_EVENTTYPE_VARADDED = 0x00000001u - SCIP_EVENTTYPE_VARDELETED = 0x00000002u - SCIP_EVENTTYPE_VARFIXED = 0x00000004u - SCIP_EVENTTYPE_VARUNLOCKED = 0x00000008u - SCIP_EVENTTYPE_OBJCHANGED = 0x00000010u - SCIP_EVENTTYPE_GLBCHANGED = 0x00000020u - SCIP_EVENTTYPE_GUBCHANGED = 0x00000040u - SCIP_EVENTTYPE_LBTIGHTENED = 0x00000080u - SCIP_EVENTTYPE_LBRELAXED = 0x00000100u - SCIP_EVENTTYPE_UBTIGHTENED = 0x00000200u - SCIP_EVENTTYPE_UBRELAXED = 0x00000400u - SCIP_EVENTTYPE_GHOLEADDED = 0x00000800u - SCIP_EVENTTYPE_GHOLEREMOVED = 0x00001000u - SCIP_EVENTTYPE_LHOLEADDED = 0x00002000u - SCIP_EVENTTYPE_LHOLEREMOVED = 0x00004000u - SCIP_EVENTTYPE_IMPLADDED = 0x00008000u - SCIP_EVENTTYPE_PRESOLVEROUND = 0x00010000u - SCIP_EVENTTYPE_NODEFOCUSED = 0x00020000u - SCIP_EVENTTYPE_NODEFEASIBLE = 0x00040000u - SCIP_EVENTTYPE_NODEINFEASIBLE = 0x00080000u - SCIP_EVENTTYPE_NODEBRANCHED = 0x00100000u - SCIP_EVENTTYPE_FIRSTLPSOLVED = 0x00200000u - SCIP_EVENTTYPE_LPSOLVED = 0x00400000u - SCIP_EVENTTYPE_POORSOLFOUND = 0x00800000u - SCIP_EVENTTYPE_BESTSOLFOUND = 0x01000000u - SCIP_EVENTTYPE_ROWADDEDSEPA = 0x02000000u - SCIP_EVENTTYPE_ROWDELETEDSEPA = 0x04000000u - SCIP_EVENTTYPE_ROWADDEDLP = 0x08000000u - SCIP_EVENTTYPE_ROWDELETEDLP = 0x10000000u - SCIP_EVENTTYPE_ROWCOEFCHANGED = 0x20000000u - SCIP_EVENTTYPE_ROWCONSTCHANGED = 0x40000000u - SCIP_EVENTTYPE_ROWSIDECHANGED = 0x80000000u - SCIP_EVENTTYPE_SYNC = 0x100000000u - - SCIP_EVENTTYPE_LPEVENT = SCIP_EVENTTYPE_FIRSTLPSOLVED | SCIP_EVENTTYPE_LPSOLVED + cdef extern from "scip/type_event.h": + unsigned long SCIP_EVENTTYPE_DISABLED + unsigned long SCIP_EVENTTYPE_VARADDED + unsigned long SCIP_EVENTTYPE_VARDELETED + unsigned long SCIP_EVENTTYPE_VARFIXED + unsigned long SCIP_EVENTTYPE_VARUNLOCKED + unsigned long SCIP_EVENTTYPE_OBJCHANGED + unsigned long SCIP_EVENTTYPE_GLBCHANGED + unsigned long SCIP_EVENTTYPE_GUBCHANGED + unsigned long SCIP_EVENTTYPE_LBTIGHTENED + unsigned long SCIP_EVENTTYPE_LBRELAXED + unsigned long SCIP_EVENTTYPE_UBTIGHTENED + unsigned long SCIP_EVENTTYPE_UBRELAXED + unsigned long SCIP_EVENTTYPE_GHOLEADDED + unsigned long SCIP_EVENTTYPE_GHOLEREMOVED + unsigned long SCIP_EVENTTYPE_LHOLEADDED + unsigned long SCIP_EVENTTYPE_LHOLEREMOVED + unsigned long SCIP_EVENTTYPE_IMPLADDED + unsigned long SCIP_EVENTTYPE_PRESOLVEROUND + unsigned long SCIP_EVENTTYPE_NODEFOCUSED + unsigned long SCIP_EVENTTYPE_NODEFEASIBLE + unsigned long SCIP_EVENTTYPE_NODEINFEASIBLE + unsigned long SCIP_EVENTTYPE_NODEBRANCHED + unsigned long SCIP_EVENTTYPE_NODEDELETE + unsigned long SCIP_EVENTTYPE_FIRSTLPSOLVED + unsigned long SCIP_EVENTTYPE_LPSOLVED + unsigned long SCIP_EVENTTYPE_POORSOLFOUND + unsigned long SCIP_EVENTTYPE_BESTSOLFOUND + unsigned long SCIP_EVENTTYPE_ROWADDEDSEPA + unsigned long SCIP_EVENTTYPE_ROWDELETEDSEPA + unsigned long SCIP_EVENTTYPE_ROWADDEDLP + unsigned long SCIP_EVENTTYPE_ROWDELETEDLP + unsigned long SCIP_EVENTTYPE_ROWCOEFCHANGED + unsigned long SCIP_EVENTTYPE_ROWCONSTCHANGED + unsigned long SCIP_EVENTTYPE_ROWSIDECHANGED + unsigned long SCIP_EVENTTYPE_SYNC + + unsigned long SCIP_EVENTTYPE_LPEVENT + ctypedef enum SCIP_LPSOLQUALITY: SCIP_LPSOLQUALITY_ESTIMCONDITION = 0 @@ -544,41 +546,41 @@ cdef extern from "scip/scip.h": # Event Methods SCIP_RETCODE SCIPcatchEvent(SCIP* scip, - SCIP_EVENTTYPE eventtype, + unsigned long eventtype, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA* eventdata, int* filterpos) SCIP_RETCODE SCIPdropEvent(SCIP* scip, - SCIP_EVENTTYPE eventtype, + unsigned long eventtype, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA* eventdata, int filterpos) SCIP_RETCODE SCIPcatchVarEvent(SCIP* scip, SCIP_VAR* var, - SCIP_EVENTTYPE eventtype, + unsigned long eventtype, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA* eventdata, int* filterpos) SCIP_RETCODE SCIPdropVarEvent(SCIP* scip, SCIP_VAR* var, - SCIP_EVENTTYPE eventtype, + unsigned long eventtype, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA* eventdata, int filterpos) SCIP_RETCODE SCIPcatchRowEvent(SCIP* scip, SCIP_ROW* row, - SCIP_EVENTTYPE eventtype, + unsigned long eventtype, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA* eventdata, int* filterpos) SCIP_RETCODE SCIPdropRowEvent(SCIP* scip, SCIP_ROW* row, - SCIP_EVENTTYPE eventtype, + unsigned long eventtype, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA* eventdata, int filterpos) SCIP_EVENTHDLR* SCIPfindEventhdlr(SCIP* scip, const char* name) - SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT* event) + unsigned long SCIPeventGetType(SCIP_EVENT* event) SCIP_Real SCIPeventGetNewbound(SCIP_EVENT* event) SCIP_Real SCIPeventGetOldbound(SCIP_EVENT* event) SCIP_VAR* SCIPeventGetVar(SCIP_EVENT* event) From da69c342af54b30384a877beb5cea077eb072a38 Mon Sep 17 00:00:00 2001 From: Joao-Dionisio Date: Tue, 28 Nov 2023 23:29:32 +0000 Subject: [PATCH 02/11] Directly use SCIP macros instead of their value --- src/pyscipopt/scip.pxd | 584 +++++++++++++++++++++-------------------- 1 file changed, 303 insertions(+), 281 deletions(-) diff --git a/src/pyscipopt/scip.pxd b/src/pyscipopt/scip.pxd index 44478f965..36a0b2668 100644 --- a/src/pyscipopt/scip.pxd +++ b/src/pyscipopt/scip.pxd @@ -2,281 +2,303 @@ #@brief holding prototype of the SCIP public functions to use them in PySCIPOpt cdef extern from "scip/scip.h": # SCIP internal types - ctypedef enum SCIP_RETCODE: - SCIP_OKAY = 1 - SCIP_ERROR = 0 - SCIP_NOMEMORY = -1 - SCIP_READERROR = -2 - SCIP_WRITEERROR = -3 - SCIP_NOFILE = -4 - SCIP_FILECREATEERROR = -5 - SCIP_LPERROR = -6 - SCIP_NOPROBLEM = -7 - SCIP_INVALIDCALL = -8 - SCIP_INVALIDDATA = -9 - SCIP_INVALIDRESULT = -10 - SCIP_PLUGINNOTFOUND = -11 - SCIP_PARAMETERUNKNOWN = -12 - SCIP_PARAMETERWRONGTYPE = -13 - SCIP_PARAMETERWRONGVAL = -14 - SCIP_KEYALREADYEXISTING = -15 - SCIP_MAXDEPTHLEVEL = -16 - - ctypedef enum SCIP_VARTYPE: - SCIP_VARTYPE_BINARY = 0 - SCIP_VARTYPE_INTEGER = 1 - SCIP_VARTYPE_IMPLINT = 2 - SCIP_VARTYPE_CONTINUOUS = 3 - - ctypedef enum SCIP_OBJSENSE: - SCIP_OBJSENSE_MAXIMIZE = -1 - SCIP_OBJSENSE_MINIMIZE = 1 + ctypedef int SCIP_RETCODE + cdef extern from "scip/type_retcode.h": + SCIP_RETCODE SCIP_OKAY + SCIP_RETCODE SCIP_ERROR + SCIP_RETCODE SCIP_NOMEMORY + SCIP_RETCODE SCIP_READERROR + SCIP_RETCODE SCIP_WRITEERROR + SCIP_RETCODE SCIP_NOFILE + SCIP_RETCODE SCIP_FILECREATEERROR + SCIP_RETCODE SCIP_LPERROR + SCIP_RETCODE SCIP_NOPROBLEM + SCIP_RETCODE SCIP_INVALIDCALL + SCIP_RETCODE SCIP_INVALIDDATA + SCIP_RETCODE SCIP_INVALIDRESULT + SCIP_RETCODE SCIP_PLUGINNOTFOUND + SCIP_RETCODE SCIP_PARAMETERUNKNOWN + SCIP_RETCODE SCIP_PARAMETERWRONGTYPE + SCIP_RETCODE SCIP_PARAMETERWRONGVAL + SCIP_RETCODE SCIP_KEYALREADYEXISTING + SCIP_RETCODE SCIP_MAXDEPTHLEVEL + + ctypedef int SCIP_VARTYPE + cdef extern from "scip/type_var.h": + SCIP_VARTYPE SCIP_VARTYPE_BINARY + SCIP_VARTYPE SCIP_VARTYPE_INTEGER + SCIP_VARTYPE SCIP_VARTYPE_IMPLINT + SCIP_VARTYPE SCIP_VARTYPE_CONTINUOUS + + ctypedef int SCIP_OBJSENSE + cdef extern from "scip/type_prob.h": + SCIP_OBJSENSE SCIP_OBJSENSE_MAXIMIZE + SCIP_OBJSENSE SCIP_OBJSENSE_MINIMIZE # This version is used in LPI. - ctypedef enum SCIP_OBJSEN: - SCIP_OBJSEN_MAXIMIZE = -1 - SCIP_OBJSEN_MINIMIZE = 1 - - ctypedef enum SCIP_BOUNDTYPE: - SCIP_BOUNDTYPE_LOWER = 0 - SCIP_BOUNDTYPE_UPPER = 1 - - ctypedef enum SCIP_RESULT: - SCIP_DIDNOTRUN = 1 - SCIP_DELAYED = 2 - SCIP_DIDNOTFIND = 3 - SCIP_FEASIBLE = 4 - SCIP_INFEASIBLE = 5 - SCIP_UNBOUNDED = 6 - SCIP_CUTOFF = 7 - SCIP_SEPARATED = 8 - SCIP_NEWROUND = 9 - SCIP_REDUCEDDOM = 10 - SCIP_CONSADDED = 11 - SCIP_CONSCHANGED = 12 - SCIP_BRANCHED = 13 - SCIP_SOLVELP = 14 - SCIP_FOUNDSOL = 15 - SCIP_SUSPENDED = 16 - SCIP_SUCCESS = 17 - - ctypedef enum SCIP_STATUS: - SCIP_STATUS_UNKNOWN = 0 - SCIP_STATUS_USERINTERRUPT = 1 - SCIP_STATUS_NODELIMIT = 2 - SCIP_STATUS_TOTALNODELIMIT = 3 - SCIP_STATUS_STALLNODELIMIT = 4 - SCIP_STATUS_TIMELIMIT = 5 - SCIP_STATUS_MEMLIMIT = 6 - SCIP_STATUS_GAPLIMIT = 7 - SCIP_STATUS_SOLLIMIT = 8 - SCIP_STATUS_BESTSOLLIMIT = 9 - SCIP_STATUS_RESTARTLIMIT = 10 - SCIP_STATUS_OPTIMAL = 11 - SCIP_STATUS_INFEASIBLE = 12 - SCIP_STATUS_UNBOUNDED = 13 - SCIP_STATUS_INFORUNBD = 14 - - ctypedef enum SCIP_STAGE: - SCIP_STAGE_INIT = 0 - SCIP_STAGE_PROBLEM = 1 - SCIP_STAGE_TRANSFORMING = 2 - SCIP_STAGE_TRANSFORMED = 3 - SCIP_STAGE_INITPRESOLVE = 4 - SCIP_STAGE_PRESOLVING = 5 - SCIP_STAGE_EXITPRESOLVE = 6 - SCIP_STAGE_PRESOLVED = 7 - SCIP_STAGE_INITSOLVE = 8 - SCIP_STAGE_SOLVING = 9 - SCIP_STAGE_SOLVED = 10 - SCIP_STAGE_EXITSOLVE = 11 - SCIP_STAGE_FREETRANS = 12 - SCIP_STAGE_FREE = 13 - - ctypedef enum SCIP_NODETYPE: - SCIP_NODETYPE_FOCUSNODE = 0 - SCIP_NODETYPE_PROBINGNODE = 1 - SCIP_NODETYPE_SIBLING = 2 - SCIP_NODETYPE_CHILD = 3 - SCIP_NODETYPE_LEAF = 4 - SCIP_NODETYPE_DEADEND = 5 - SCIP_NODETYPE_JUNCTION = 6 - SCIP_NODETYPE_PSEUDOFORK = 7 - SCIP_NODETYPE_FORK = 8 - SCIP_NODETYPE_SUBROOT = 9 - SCIP_NODETYPE_REFOCUSNODE = 10 - - ctypedef enum SCIP_PARAMSETTING: - SCIP_PARAMSETTING_DEFAULT = 0 - SCIP_PARAMSETTING_AGGRESSIVE = 1 - SCIP_PARAMSETTING_FAST = 2 - SCIP_PARAMSETTING_OFF = 3 - - ctypedef enum SCIP_PARAMTYPE: - SCIP_PARAMTYPE_BOOL = 0 - SCIP_PARAMTYPE_INT = 1 - SCIP_PARAMTYPE_LONGINT = 2 - SCIP_PARAMTYPE_REAL = 3 - SCIP_PARAMTYPE_CHAR = 4 - SCIP_PARAMTYPE_STRING = 5 - - ctypedef enum SCIP_PARAMEMPHASIS: - SCIP_PARAMEMPHASIS_DEFAULT = 0 - SCIP_PARAMEMPHASIS_CPSOLVER = 1 - SCIP_PARAMEMPHASIS_EASYCIP = 2 - SCIP_PARAMEMPHASIS_FEASIBILITY = 3 - SCIP_PARAMEMPHASIS_HARDLP = 4 - SCIP_PARAMEMPHASIS_OPTIMALITY = 5 - SCIP_PARAMEMPHASIS_COUNTER = 6 - SCIP_PARAMEMPHASIS_PHASEFEAS = 7 - SCIP_PARAMEMPHASIS_PHASEIMPROVE = 8 - SCIP_PARAMEMPHASIS_PHASEPROOF = 9 - SCIP_PARAMEMPHASIS_NUMERICS = 10 - SCIP_PARAMEMPHASIS_BENCHMARK = 11 - - ctypedef enum SCIP_PROPTIMING: - SCIP_PROPTIMING_BEFORELP = 0x001u - SCIP_PROPTIMING_DURINGLPLOOP = 0x002u - SCIP_PROPTIMING_AFTERLPLOOP = 0x004u - SCIP_PROPTIMING_AFTERLPNODE = 0x008u - - ctypedef enum SCIP_PRESOLTIMING: - SCIP_PRESOLTIMING_NONE = 0x002u - SCIP_PRESOLTIMING_FAST = 0x004u - SCIP_PRESOLTIMING_MEDIUM = 0x008u - SCIP_PRESOLTIMING_EXHAUSTIVE = 0x010u - - ctypedef enum SCIP_HEURTIMING: - SCIP_HEURTIMING_BEFORENODE = 0x001u - SCIP_HEURTIMING_DURINGLPLOOP = 0x002u - SCIP_HEURTIMING_AFTERLPLOOP = 0x004u - SCIP_HEURTIMING_AFTERLPNODE = 0x008u - SCIP_HEURTIMING_AFTERPSEUDONODE = 0x010u - SCIP_HEURTIMING_AFTERLPPLUNGE = 0x020u - SCIP_HEURTIMING_AFTERPSEUDOPLUNGE = 0x040u - SCIP_HEURTIMING_DURINGPRICINGLOOP = 0x080u - SCIP_HEURTIMING_BEFOREPRESOL = 0x100u - SCIP_HEURTIMING_DURINGPRESOLLOOP = 0x200u - SCIP_HEURTIMING_AFTERPROPLOOP = 0x400u - - ctypedef enum SCIP_EXPROP: - SCIP_EXPR_VARIDX = 1 - SCIP_EXPR_CONST = 2 - SCIP_EXPR_PARAM = 3 - SCIP_EXPR_PLUS = 8 - SCIP_EXPR_MINUS = 9 - SCIP_EXPR_MUL = 10 - SCIP_EXPR_DIV = 11 - SCIP_EXPR_SQUARE = 12 - SCIP_EXPR_SQRT = 13 - SCIP_EXPR_REALPOWER = 14 - SCIP_EXPR_INTPOWER = 15 - SCIP_EXPR_SIGNPOWER = 16 - SCIP_EXPR_EXP = 17 - SCIP_EXPR_LOG = 18 - SCIP_EXPR_SIN = 19 - SCIP_EXPR_COS = 20 - SCIP_EXPR_TAN = 21 - SCIP_EXPR_MIN = 24 - SCIP_EXPR_MAX = 25 - SCIP_EXPR_ABS = 26 - SCIP_EXPR_SIGN = 27 - SCIP_EXPR_SUM = 64 - SCIP_EXPR_PRODUCT = 65 - SCIP_EXPR_LINEAR = 66 - SCIP_EXPR_QUADRATIC = 67 - SCIP_EXPR_POLYNOMIAL= 68 - SCIP_EXPR_USER = 69 - SCIP_EXPR_LAST = 70 - - - ctypedef enum SCIP_BASESTAT: - SCIP_BASESTAT_LOWER = 0 - SCIP_BASESTAT_BASIC = 1 - SCIP_BASESTAT_UPPER = 2 - SCIP_BASESTAT_ZERO = 3 - - + ctypedef int SCIP_OBJSEN + cdef extern from "lpi/type_lpi.h": + SCIP_OBJSEN SCIP_OBJSEN_MAXIMIZE + SCIP_OBJSEN SCIP_OBJSEN_MINIMIZE + + ctypedef int SCIP_BOUNDTYPE + cdef extern from "scip/type_lp.h": + SCIP_BOUNDTYPE SCIP_BOUNDTYPE_LOWER + SCIP_BOUNDTYPE SCIP_BOUNDTYPE_UPPER + + ctypedef int SCIP_RESULT + cdef extern from "scip/type_result.h": + SCIP_RESULT SCIP_DIDNOTRUN + SCIP_RESULT SCIP_DELAYED + SCIP_RESULT SCIP_DIDNOTFIND + SCIP_RESULT SCIP_FEASIBLE + SCIP_RESULT SCIP_INFEASIBLE + SCIP_RESULT SCIP_UNBOUNDED + SCIP_RESULT SCIP_CUTOFF + SCIP_RESULT SCIP_SEPARATED + SCIP_RESULT SCIP_NEWROUND + SCIP_RESULT SCIP_REDUCEDDOM + SCIP_RESULT SCIP_CONSADDED + SCIP_RESULT SCIP_CONSCHANGED + SCIP_RESULT SCIP_BRANCHED + SCIP_RESULT SCIP_SOLVELP + SCIP_RESULT SCIP_FOUNDSOL + SCIP_RESULT SCIP_SUSPENDED + SCIP_RESULT SCIP_SUCCESS + + ctypedef int SCIP_STATUS + cdef extern from "scip/type_stat.h": + SCIP_STATUS SCIP_STATUS_UNKNOWN + SCIP_STATUS SCIP_STATUS_USERINTERRUPT + SCIP_STATUS SCIP_STATUS_NODELIMIT + SCIP_STATUS SCIP_STATUS_TOTALNODELIMIT + SCIP_STATUS SCIP_STATUS_STALLNODELIMIT + SCIP_STATUS SCIP_STATUS_TIMELIMIT + SCIP_STATUS SCIP_STATUS_MEMLIMIT + SCIP_STATUS SCIP_STATUS_GAPLIMIT + SCIP_STATUS SCIP_STATUS_SOLLIMIT + SCIP_STATUS SCIP_STATUS_BESTSOLLIMIT + SCIP_STATUS SCIP_STATUS_RESTARTLIMIT + SCIP_STATUS SCIP_STATUS_OPTIMAL + SCIP_STATUS SCIP_STATUS_INFEASIBLE + SCIP_STATUS SCIP_STATUS_UNBOUNDED + SCIP_STATUS SCIP_STATUS_INFORUNBD + + ctypedef int SCIP_STAGE + cdef extern from "scip/type_set.h": + SCIP_STAGE SCIP_STAGE_INIT + SCIP_STAGE SCIP_STAGE_PROBLEM + SCIP_STAGE SCIP_STAGE_TRANSFORMING + SCIP_STAGE SCIP_STAGE_TRANSFORMED + SCIP_STAGE SCIP_STAGE_INITPRESOLVE + SCIP_STAGE SCIP_STAGE_PRESOLVING + SCIP_STAGE SCIP_STAGE_EXITPRESOLVE + SCIP_STAGE SCIP_STAGE_PRESOLVED + SCIP_STAGE SCIP_STAGE_INITSOLVE + SCIP_STAGE SCIP_STAGE_SOLVING + SCIP_STAGE SCIP_STAGE_SOLVED + SCIP_STAGE SCIP_STAGE_EXITSOLVE + SCIP_STAGE SCIP_STAGE_FREETRANS + SCIP_STAGE SCIP_STAGE_FREE + + ctypedef int SCIP_NODETYPE + cdef extern from "scip/type_tree.h": + SCIP_NODETYPE SCIP_NODETYPE_FOCUSNODE + SCIP_NODETYPE SCIP_NODETYPE_PROBINGNODE + SCIP_NODETYPE SCIP_NODETYPE_SIBLING + SCIP_NODETYPE SCIP_NODETYPE_CHILD + SCIP_NODETYPE SCIP_NODETYPE_LEAF + SCIP_NODETYPE SCIP_NODETYPE_DEADEND + SCIP_NODETYPE SCIP_NODETYPE_JUNCTION + SCIP_NODETYPE SCIP_NODETYPE_PSEUDOFORK + SCIP_NODETYPE SCIP_NODETYPE_FORK + SCIP_NODETYPE SCIP_NODETYPE_SUBROOT + SCIP_NODETYPE SCIP_NODETYPE_REFOCUSNODE + + ctypedef int SCIP_PARAMSETTING + cdef extern from "scip/type_paramset.h": + SCIP_PARAMSETTING SCIP_PARAMSETTING_DEFAULT + SCIP_PARAMSETTING SCIP_PARAMSETTING_AGGRESSIVE + SCIP_PARAMSETTING SCIP_PARAMSETTING_FAST + SCIP_PARAMSETTING SCIP_PARAMSETTING_OFF + + ctypedef int SCIP_PARAMTYPE + cdef extern from "scip/type_paramset.h": + SCIP_PARAMTYPE SCIP_PARAMTYPE_BOOL + SCIP_PARAMTYPE SCIP_PARAMTYPE_INT + SCIP_PARAMTYPE SCIP_PARAMTYPE_LONGINT + SCIP_PARAMTYPE SCIP_PARAMTYPE_REAL + SCIP_PARAMTYPE SCIP_PARAMTYPE_CHAR + SCIP_PARAMTYPE SCIP_PARAMTYPE_STRING + + ctypedef int SCIP_PARAMEMPHASIS + cdef extern from "scip/type_paramset.h": + SCIP_PARAMEMPHASIS SCIP_PARAMEMPHASIS_DEFAULT + SCIP_PARAMEMPHASIS SCIP_PARAMEMPHASIS_CPSOLVER + SCIP_PARAMEMPHASIS SCIP_PARAMEMPHASIS_EASYCIP + SCIP_PARAMEMPHASIS SCIP_PARAMEMPHASIS_FEASIBILITY + SCIP_PARAMEMPHASIS SCIP_PARAMEMPHASIS_HARDLP + SCIP_PARAMEMPHASIS SCIP_PARAMEMPHASIS_OPTIMALITY + SCIP_PARAMEMPHASIS SCIP_PARAMEMPHASIS_COUNTER + SCIP_PARAMEMPHASIS SCIP_PARAMEMPHASIS_PHASEFEAS + SCIP_PARAMEMPHASIS SCIP_PARAMEMPHASIS_PHASEIMPROVE + SCIP_PARAMEMPHASIS SCIP_PARAMEMPHASIS_PHASEPROOF + SCIP_PARAMEMPHASIS SCIP_PARAMEMPHASIS_NUMERICS + SCIP_PARAMEMPHASIS SCIP_PARAMEMPHASIS_BENCHMARK + + ctypedef unsigned long SCIP_PROPTIMING + cdef extern from "scip/type_timing.h": + SCIP_PROPTIMING SCIP_PROPTIMING_BEFORELP + SCIP_PROPTIMING SCIP_PROPTIMING_DURINGLPLOOP + SCIP_PROPTIMING SCIP_PROPTIMING_AFTERLPLOOP + SCIP_PROPTIMING SCIP_PROPTIMING_AFTERLPNODE + + ctypedef unsigned long SCIP_PRESOLTIMING + cdef extern from "scip/type_timing.h": + SCIP_PRESOLTIMING SCIP_PRESOLTIMING_NONE + SCIP_PRESOLTIMING SCIP_PRESOLTIMING_FAST + SCIP_PRESOLTIMING SCIP_PRESOLTIMING_MEDIUM + SCIP_PRESOLTIMING SCIP_PRESOLTIMING_EXHAUSTIVE + + ctypedef unsigned long SCIP_HEURTIMING + cdef extern from "scip/type_timing.h": + SCIP_HEURTIMING SCIP_HEURTIMING_BEFORENODE + SCIP_HEURTIMING SCIP_HEURTIMING_DURINGLPLOOP + SCIP_HEURTIMING SCIP_HEURTIMING_AFTERLPLOOP + SCIP_HEURTIMING SCIP_HEURTIMING_AFTERLPNODE + SCIP_HEURTIMING SCIP_HEURTIMING_AFTERPSEUDONODE + SCIP_HEURTIMING SCIP_HEURTIMING_AFTERLPPLUNGE + SCIP_HEURTIMING SCIP_HEURTIMING_AFTERPSEUDOPLUNGE + SCIP_HEURTIMING SCIP_HEURTIMING_DURINGPRICINGLOOP + SCIP_HEURTIMING SCIP_HEURTIMING_BEFOREPRESOL + SCIP_HEURTIMING SCIP_HEURTIMING_DURINGPRESOLLOOP + SCIP_HEURTIMING SCIP_HEURTIMING_AFTERPROPLOOP + + ctypedef int SCIP_EXPR + cdef extern from "scip/type_expr.h": + SCIP_EXPR SCIP_EXPR_VARIDX + SCIP_EXPR SCIP_EXPR_CONST + SCIP_EXPR SCIP_EXPR_PARAM + SCIP_EXPR SCIP_EXPR_PLUS + SCIP_EXPR SCIP_EXPR_MINUS + SCIP_EXPR SCIP_EXPR_MUL + SCIP_EXPR SCIP_EXPR_DIV + SCIP_EXPR SCIP_EXPR_SQUARE + SCIP_EXPR SCIP_EXPR_SQRT + SCIP_EXPR SCIP_EXPR_REALPOWER + SCIP_EXPR SCIP_EXPR_INTPOWER + SCIP_EXPR SCIP_EXPR_SIGNPOWER + SCIP_EXPR SCIP_EXPR_EXP + SCIP_EXPR SCIP_EXPR_LOG + SCIP_EXPR SCIP_EXPR_SIN + SCIP_EXPR SCIP_EXPR_COS + SCIP_EXPR SCIP_EXPR_TAN + SCIP_EXPR SCIP_EXPR_MIN + SCIP_EXPR SCIP_EXPR_MAX + SCIP_EXPR SCIP_EXPR_ABS + SCIP_EXPR SCIP_EXPR_SIGN + SCIP_EXPR SCIP_EXPR_SUM + SCIP_EXPR SCIP_EXPR_PRODUCT + SCIP_EXPR SCIP_EXPR_LINEAR + SCIP_EXPR SCIP_EXPR_QUADRATIC + SCIP_EXPR SCIP_EXPR_POLYNOMIAL + SCIP_EXPR SCIP_EXPR_USER + SCIP_EXPR SCIP_EXPR_LAST + + ctypedef int SCIP_BASESTAT + cdef extern from "lpi/type_lpi.h": + SCIP_BASESTAT SCIP_BASESTAT_LOWER + SCIP_BASESTAT SCIP_BASESTAT_BASIC + SCIP_BASESTAT SCIP_BASESTAT_UPPER + SCIP_BASESTAT SCIP_BASESTAT_ZERO + + ctypedef unsigned long SCIP_EVENTTYPE cdef extern from "scip/type_event.h": - unsigned long SCIP_EVENTTYPE_DISABLED - unsigned long SCIP_EVENTTYPE_VARADDED - unsigned long SCIP_EVENTTYPE_VARDELETED - unsigned long SCIP_EVENTTYPE_VARFIXED - unsigned long SCIP_EVENTTYPE_VARUNLOCKED - unsigned long SCIP_EVENTTYPE_OBJCHANGED - unsigned long SCIP_EVENTTYPE_GLBCHANGED - unsigned long SCIP_EVENTTYPE_GUBCHANGED - unsigned long SCIP_EVENTTYPE_LBTIGHTENED - unsigned long SCIP_EVENTTYPE_LBRELAXED - unsigned long SCIP_EVENTTYPE_UBTIGHTENED - unsigned long SCIP_EVENTTYPE_UBRELAXED - unsigned long SCIP_EVENTTYPE_GHOLEADDED - unsigned long SCIP_EVENTTYPE_GHOLEREMOVED - unsigned long SCIP_EVENTTYPE_LHOLEADDED - unsigned long SCIP_EVENTTYPE_LHOLEREMOVED - unsigned long SCIP_EVENTTYPE_IMPLADDED - unsigned long SCIP_EVENTTYPE_PRESOLVEROUND - unsigned long SCIP_EVENTTYPE_NODEFOCUSED - unsigned long SCIP_EVENTTYPE_NODEFEASIBLE - unsigned long SCIP_EVENTTYPE_NODEINFEASIBLE - unsigned long SCIP_EVENTTYPE_NODEBRANCHED - unsigned long SCIP_EVENTTYPE_NODEDELETE - unsigned long SCIP_EVENTTYPE_FIRSTLPSOLVED - unsigned long SCIP_EVENTTYPE_LPSOLVED - unsigned long SCIP_EVENTTYPE_POORSOLFOUND - unsigned long SCIP_EVENTTYPE_BESTSOLFOUND - unsigned long SCIP_EVENTTYPE_ROWADDEDSEPA - unsigned long SCIP_EVENTTYPE_ROWDELETEDSEPA - unsigned long SCIP_EVENTTYPE_ROWADDEDLP - unsigned long SCIP_EVENTTYPE_ROWDELETEDLP - unsigned long SCIP_EVENTTYPE_ROWCOEFCHANGED - unsigned long SCIP_EVENTTYPE_ROWCONSTCHANGED - unsigned long SCIP_EVENTTYPE_ROWSIDECHANGED - unsigned long SCIP_EVENTTYPE_SYNC - - unsigned long SCIP_EVENTTYPE_LPEVENT - - - ctypedef enum SCIP_LPSOLQUALITY: - SCIP_LPSOLQUALITY_ESTIMCONDITION = 0 - SCIP_LPSOLQUALITY_EXACTCONDITION = 1 - - ctypedef enum SCIP_LOCKTYPE: - SCIP_LOCKTYPE_MODEL = 0 - SCIP_LOCKTYPE_CONFLICT = 1 - - ctypedef enum SCIP_BENDERSENFOTYPE: - SCIP_BENDERSENFOTYPE_LP = 1 - SCIP_BENDERSENFOTYPE_RELAX = 2 - SCIP_BENDERSENFOTYPE_PSEUDO = 3 - SCIP_BENDERSENFOTYPE_CHECK = 4 - - ctypedef enum SCIP_LPSOLSTAT: - SCIP_LPSOLSTAT_NOTSOLVED = 0 - SCIP_LPSOLSTAT_OPTIMAL = 1 - SCIP_LPSOLSTAT_INFEASIBLE = 2 - SCIP_LPSOLSTAT_UNBOUNDEDRAY = 3 - SCIP_LPSOLSTAT_OBJLIMIT = 4 - SCIP_LPSOLSTAT_ITERLIMIT = 5 - SCIP_LPSOLSTAT_TIMELIMIT = 6 - SCIP_LPSOLSTAT_ERROR = 7 - - ctypedef enum SCIP_BRANCHDIR: - SCIP_BRANCHDIR_DOWNWARDS = 0 - SCIP_BRANCHDIR_UPWARDS = 1 - SCIP_BRANCHDIR_FIXED = 2 - SCIP_BRANCHDIR_AUTO = 3 - - ctypedef enum SCIP_BOUNDCHGTYPE: - SCIP_BOUNDCHGTYPE_BRANCHING = 0 - SCIP_BOUNDCHGTYPE_CONSINFER = 1 - SCIP_BOUNDCHGTYPE_PROPINFER = 2 - - ctypedef enum SCIP_ROWORIGINTYPE: - SCIP_ROWORIGINTYPE_UNSPEC = 0 - SCIP_ROWORIGINTYPE_CONS = 1 - SCIP_ROWORIGINTYPE_SEPA = 2 - SCIP_ROWORIGINTYPE_REOPT = 3 + SCIP_EVENTTYPE SCIP_EVENTTYPE_DISABLED + SCIP_EVENTTYPE SCIP_EVENTTYPE_VARADDED + SCIP_EVENTTYPE SCIP_EVENTTYPE_VARDELETED + SCIP_EVENTTYPE SCIP_EVENTTYPE_VARFIXED + SCIP_EVENTTYPE SCIP_EVENTTYPE_VARUNLOCKED + SCIP_EVENTTYPE SCIP_EVENTTYPE_OBJCHANGED + SCIP_EVENTTYPE SCIP_EVENTTYPE_GLBCHANGED + SCIP_EVENTTYPE SCIP_EVENTTYPE_GUBCHANGED + SCIP_EVENTTYPE SCIP_EVENTTYPE_LBTIGHTENED + SCIP_EVENTTYPE SCIP_EVENTTYPE_LBRELAXED + SCIP_EVENTTYPE SCIP_EVENTTYPE_UBTIGHTENED + SCIP_EVENTTYPE SCIP_EVENTTYPE_UBRELAXED + SCIP_EVENTTYPE SCIP_EVENTTYPE_GHOLEADDED + SCIP_EVENTTYPE SCIP_EVENTTYPE_GHOLEREMOVED + SCIP_EVENTTYPE SCIP_EVENTTYPE_LHOLEADDED + SCIP_EVENTTYPE SCIP_EVENTTYPE_LHOLEREMOVED + SCIP_EVENTTYPE SCIP_EVENTTYPE_IMPLADDED + SCIP_EVENTTYPE SCIP_EVENTTYPE_PRESOLVEROUND + SCIP_EVENTTYPE SCIP_EVENTTYPE_NODEFOCUSED + SCIP_EVENTTYPE SCIP_EVENTTYPE_NODEFEASIBLE + SCIP_EVENTTYPE SCIP_EVENTTYPE_NODEINFEASIBLE + SCIP_EVENTTYPE SCIP_EVENTTYPE_NODEBRANCHED + SCIP_EVENTTYPE SCIP_EVENTTYPE_NODEDELETE + SCIP_EVENTTYPE SCIP_EVENTTYPE_FIRSTLPSOLVED + SCIP_EVENTTYPE SCIP_EVENTTYPE_LPSOLVED + SCIP_EVENTTYPE SCIP_EVENTTYPE_POORSOLFOUND + SCIP_EVENTTYPE SCIP_EVENTTYPE_BESTSOLFOUND + SCIP_EVENTTYPE SCIP_EVENTTYPE_ROWADDEDSEPA + SCIP_EVENTTYPE SCIP_EVENTTYPE_ROWDELETEDSEPA + SCIP_EVENTTYPE SCIP_EVENTTYPE_ROWADDEDLP + SCIP_EVENTTYPE SCIP_EVENTTYPE_ROWDELETEDLP + SCIP_EVENTTYPE SCIP_EVENTTYPE_ROWCOEFCHANGED + SCIP_EVENTTYPE SCIP_EVENTTYPE_ROWCONSTCHANGED + SCIP_EVENTTYPE SCIP_EVENTTYPE_ROWSIDECHANGED + SCIP_EVENTTYPE SCIP_EVENTTYPE_SYNC + SCIP_EVENTTYPE SCIP_EVENTTYPE_LPEVENT + + + ctypedef int SCIP_LPSOLQUALITY + cdef extern from "lpi/type_lpi.h": + SCIP_LPSOLQUALITY SCIP_LPSOLQUALITY_ESTIMCONDITION + SCIP_LPSOLQUALITY SCIP_LPSOLQUALITY_EXACTCONDITION + + ctypedef int SCIP_LOCKTYPE + cdef extern from "scip/type_var.h": + SCIP_LOCKTYPE SCIP_LOCKTYPE_MODEL + SCIP_LOCKTYPE SCIP_LOCKTYPE_CONFLICT + + ctypedef int SCIP_BENDERSENFOTYPE + cdef extern from "scip/type_benders.h": + SCIP_BENDERSENFOTYPE SCIP_BENDERSENFOTYPE_LP + SCIP_BENDERSENFOTYPE SCIP_BENDERSENFOTYPE_RELAX + SCIP_BENDERSENFOTYPE SCIP_BENDERSENFOTYPE_PSEUDO + SCIP_BENDERSENFOTYPE SCIP_BENDERSENFOTYPE_CHECK + + ctypedef int SCIP_LPSOLSTAT + cdef extern from "scip/type_lp.h": + SCIP_LPSOLSTAT SCIP_LPSOLSTAT_NOTSOLVED + SCIP_LPSOLSTAT SCIP_LPSOLSTAT_OPTIMAL + SCIP_LPSOLSTAT SCIP_LPSOLSTAT_INFEASIBLE + SCIP_LPSOLSTAT SCIP_LPSOLSTAT_UNBOUNDEDRAY + SCIP_LPSOLSTAT SCIP_LPSOLSTAT_OBJLIMIT + SCIP_LPSOLSTAT SCIP_LPSOLSTAT_ITERLIMIT + SCIP_LPSOLSTAT SCIP_LPSOLSTAT_TIMELIMIT + SCIP_LPSOLSTAT SCIP_LPSOLSTAT_ERROR + + ctypedef int SCIP_BRANCHDIR + cdef extern from "scip/type_history.h": + SCIP_BRANCHDIR SCIP_BRANCHDIR_DOWNWARDS + SCIP_BRANCHDIR SCIP_BRANCHDIR_UPWARDS + SCIP_BRANCHDIR SCIP_BRANCHDIR_FIXED + SCIP_BRANCHDIR SCIP_BRANCHDIR_AUTO + + ctypedef int SCIP_BOUNDCHGTYPE + cdef extern from "scip/type_var.h": + SCIP_BOUNDCHGTYPE SCIP_BOUNDCHGTYPE_BRANCHING + SCIP_BOUNDCHGTYPE SCIP_BOUNDCHGTYPE_CONSINFER + SCIP_BOUNDCHGTYPE SCIP_BOUNDCHGTYPE_PROPINFER + + ctypedef int SCIP_ROWORIGINTYPE + cdef extern from "scip/type_lp.h": + SCIP_ROWORIGINTYPE SCIP_ROWORIGINTYPE_UNSPEC + SCIP_ROWORIGINTYPE SCIP_ROWORIGINTYPE_CONS + SCIP_ROWORIGINTYPE SCIP_ROWORIGINTYPE_SEPA + SCIP_ROWORIGINTYPE SCIP_ROWORIGINTYPE_REOPT ctypedef bint SCIP_Bool @@ -416,8 +438,8 @@ cdef extern from "scip/scip.h": ctypedef struct SCIP_HASHMAP: pass - ctypedef struct SCIP_BOUNDTYPE: - pass + #ctypedef struct SCIP_BOUNDTYPE: + # pass ctypedef struct SCIP_BDCHGIDX: pass @@ -546,41 +568,41 @@ cdef extern from "scip/scip.h": # Event Methods SCIP_RETCODE SCIPcatchEvent(SCIP* scip, - unsigned long eventtype, + SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA* eventdata, int* filterpos) SCIP_RETCODE SCIPdropEvent(SCIP* scip, - unsigned long eventtype, + SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA* eventdata, int filterpos) SCIP_RETCODE SCIPcatchVarEvent(SCIP* scip, SCIP_VAR* var, - unsigned long eventtype, + SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA* eventdata, int* filterpos) SCIP_RETCODE SCIPdropVarEvent(SCIP* scip, SCIP_VAR* var, - unsigned long eventtype, + SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA* eventdata, int filterpos) SCIP_RETCODE SCIPcatchRowEvent(SCIP* scip, SCIP_ROW* row, - unsigned long eventtype, + SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA* eventdata, int* filterpos) SCIP_RETCODE SCIPdropRowEvent(SCIP* scip, SCIP_ROW* row, - unsigned long eventtype, + SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR* eventhdlr, SCIP_EVENTDATA* eventdata, int filterpos) SCIP_EVENTHDLR* SCIPfindEventhdlr(SCIP* scip, const char* name) - unsigned long SCIPeventGetType(SCIP_EVENT* event) + SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT* event) SCIP_Real SCIPeventGetNewbound(SCIP_EVENT* event) SCIP_Real SCIPeventGetOldbound(SCIP_EVENT* event) SCIP_VAR* SCIPeventGetVar(SCIP_EVENT* event) From ce54e5db00b135680bc2f2e1e51bb2a61279084e Mon Sep 17 00:00:00 2001 From: Joao-Dionisio Date: Tue, 28 Nov 2023 23:31:51 +0000 Subject: [PATCH 03/11] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b36a7bfa5..51399024e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Add convenience methods relax and getVarDict - Add SCIP functions hasPrimalRay, getPrimalRay, getPrimalRayVal ### Fixed +- - Fixed typo in documentation of chgRhs - Pricer plugin fundamental callbacks now raise an error if not implemented - Brachrule plugin fundamental callbacks now raise an error if not implemented From 8e7a4b98540cdb2f01d1b85887a0faddd622cc74 Mon Sep 17 00:00:00 2001 From: Joao-Dionisio Date: Tue, 28 Nov 2023 23:32:03 +0000 Subject: [PATCH 04/11] Update CHANGELOG --- CHANGELOG.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51399024e..26c1846e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,13 @@ ## Unreleased ### Added -- Add SCIP functions SCIPconsGetNVars, SCIPconsGetVars -- Add SCIP functions SCIPchgCoefLinear, SCIPaddCoefLinear and SCIPdelCoefLinear -- Add SCIP function SCIPgetSolTime and wrapper getSolTime -- Add convenience methods relax and getVarDict -- Add SCIP functions hasPrimalRay, getPrimalRay, getPrimalRayVal +- Added SCIP functions SCIPconsGetNVars, SCIPconsGetVars +- Added SCIP functions SCIPchgCoefLinear, SCIPaddCoefLinear and SCIPdelCoefLinear +- Added SCIP function SCIPgetSolTime and wrapper getSolTime +- Added convenience methods relax and getVarDict +- Added SCIP functions hasPrimalRay, getPrimalRay, getPrimalRayVal ### Fixed -- +- Fixed mistake with outdated values for several enums - Fixed typo in documentation of chgRhs - Pricer plugin fundamental callbacks now raise an error if not implemented - Brachrule plugin fundamental callbacks now raise an error if not implemented @@ -16,6 +16,7 @@ - Changed getSols so that it prints solutions in terms of the original variables - Fixed error message in _checkStage ### Changed +- Made it so SCIP macros are used directly, instead of being manually inputted. - Improved error message when using < or > instead of <= or >= ### Removed - Removed double declaration of SCIPfindEventhdlr From 6d836e6628b616b33d349d917e294a859fab8216 Mon Sep 17 00:00:00 2001 From: Joao-Dionisio Date: Wed, 29 Nov 2023 23:31:02 +0000 Subject: [PATCH 05/11] Add NODEDELETE to scip.pxi --- src/pyscipopt/scip.pxi | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pyscipopt/scip.pxi b/src/pyscipopt/scip.pxi index 302bc7261..c0e1247f4 100644 --- a/src/pyscipopt/scip.pxi +++ b/src/pyscipopt/scip.pxi @@ -188,6 +188,7 @@ cdef class PY_SCIP_EVENTTYPE: NODEFEASIBLE = SCIP_EVENTTYPE_NODEFEASIBLE NODEINFEASIBLE = SCIP_EVENTTYPE_NODEINFEASIBLE NODEBRANCHED = SCIP_EVENTTYPE_NODEBRANCHED + NODEDELETE = SCIP_EVENTTYPE_NODEDELETE FIRSTLPSOLVED = SCIP_EVENTTYPE_FIRSTLPSOLVED LPSOLVED = SCIP_EVENTTYPE_LPSOLVED LPEVENT = SCIP_EVENTTYPE_LPEVENT From ec96c7ac832d8e31315ebdf0ae71226c21b08fbc Mon Sep 17 00:00:00 2001 From: Joao-Dionisio Date: Sun, 3 Dec 2023 20:12:57 +0000 Subject: [PATCH 06/11] Add test prototype for events --- tests/test_event.py | 68 ++++++++++++++++++++++++--------------------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/tests/test_event.py b/tests/test_event.py index 72c518073..733d7aa3a 100644 --- a/tests/test_event.py +++ b/tests/test_event.py @@ -1,6 +1,6 @@ -import pytest +import pytest, random -from pyscipopt import Model, Eventhdlr, SCIP_RESULT, SCIP_EVENTTYPE, SCIP_PARAMSETTING +from pyscipopt import Model, Eventhdlr, SCIP_RESULT, SCIP_EVENTTYPE, SCIP_PARAMSETTING, quicksum calls = [] @@ -8,43 +8,49 @@ class MyEvent(Eventhdlr): def eventinit(self): calls.append('eventinit') - self.model.catchEvent(SCIP_EVENTTYPE.FIRSTLPSOLVED, self) + #self.model.catchEvent(SCIP_EVENTTYPE.FIRSTLPSOLVED, self) + self.model.catchEvent(self.event_type, self) def eventexit(self): - calls.append('eventexit') - self.model.dropEvent(SCIP_EVENTTYPE.FIRSTLPSOLVED, self) + self.model.dropEvent(self.event_type, self) def eventexec(self, event): calls.append('eventexec') - assert event.getType() == SCIP_EVENTTYPE.FIRSTLPSOLVED - assert event.getNode().getNumber() == 1 - assert event.getNode().getParent() is None + print(event.getType(),self.event_type) + if self.event_type == SCIP_EVENTTYPE.LPEVENT: + assert event.getType() in [SCIP_EVENTTYPE.FIRSTLPSOLVED, SCIP_EVENTTYPE.LPSOLVED] + else: + assert event.getType() == self.event_type + #assert event.getNode().getNumber() == 1 + #assert event.getNode().getParent() is None def test_event(): - # create solver instance - s = Model() - s.hideOutput() - s.setPresolve(SCIP_PARAMSETTING.OFF) - eventhdlr = MyEvent() - s.includeEventhdlr(eventhdlr, "TestFirstLPevent", "python event handler to catch FIRSTLPEVENT") - - # add some variables - x = s.addVar("x", obj=1.0) - y = s.addVar("y", obj=2.0) - - # add some constraint - s.addCons(x + 2*y >= 5) - # solve problem - s.optimize() - - # print solution - assert round(s.getVal(x)) == 5.0 - assert round(s.getVal(y)) == 0.0 + + all_events = [SCIP_EVENTTYPE.DISABLED,SCIP_EVENTTYPE.VARADDED,SCIP_EVENTTYPE.VARDELETED,SCIP_EVENTTYPE.VARFIXED,SCIP_EVENTTYPE.VARUNLOCKED,SCIP_EVENTTYPE.OBJCHANGED,SCIP_EVENTTYPE.GLBCHANGED,SCIP_EVENTTYPE.GUBCHANGED,SCIP_EVENTTYPE.LBTIGHTENED,SCIP_EVENTTYPE.LBRELAXED,SCIP_EVENTTYPE.UBTIGHTENED,SCIP_EVENTTYPE.UBRELAXED,SCIP_EVENTTYPE.GHOLEADDED,SCIP_EVENTTYPE.GHOLEREMOVED,SCIP_EVENTTYPE.LHOLEADDED,SCIP_EVENTTYPE.LHOLEREMOVED,SCIP_EVENTTYPE.IMPLADDED,SCIP_EVENTTYPE.PRESOLVEROUND,SCIP_EVENTTYPE.NODEFOCUSED,SCIP_EVENTTYPE.NODEFEASIBLE,SCIP_EVENTTYPE.NODEINFEASIBLE,SCIP_EVENTTYPE.NODEBRANCHED,SCIP_EVENTTYPE.FIRSTLPSOLVED,SCIP_EVENTTYPE.LPSOLVED,SCIP_EVENTTYPE.POORSOLFOUND,SCIP_EVENTTYPE.BESTSOLFOUND,SCIP_EVENTTYPE.ROWADDEDSEPA,SCIP_EVENTTYPE.ROWDELETEDSEPA,SCIP_EVENTTYPE.ROWADDEDLP,SCIP_EVENTTYPE.ROWDELETEDLP,SCIP_EVENTTYPE.ROWCOEFCHANGED,SCIP_EVENTTYPE.ROWCONSTCHANGED,SCIP_EVENTTYPE.ROWSIDECHANGED,SCIP_EVENTTYPE.SYNC,SCIP_EVENTTYPE.LPEVENT] + + all_event_hdlrs = [] + for event in all_events: + # create solver instance + s = Model() + s.hideOutput() + s.setPresolve(SCIP_PARAMSETTING.OFF) + all_event_hdlrs.append(MyEvent()) + all_event_hdlrs[-1].event_type = event + s.includeEventhdlr(all_event_hdlrs[-1], str(event), "python event handler to catch %s" % str(event)) + + x = {} + # add some variables + for i in range(100): + x[i] = s.addVar("x", obj=random.random(), vtype="I") + + # add some constraints + for j in range(1,20): + s.addCons(quicksum(x[i] for i in range(100) if i%j==0) >= random.randint(10,100)) + + # solve problem + s.optimize() del s - assert 'eventinit' in calls - assert 'eventexit' in calls - assert 'eventexec' in calls - assert len(calls) == 3 +test_event() \ No newline at end of file From e919e2910c680bc153b4cfbc3d207b5ce036b9cf Mon Sep 17 00:00:00 2001 From: Joao-Dionisio Date: Sun, 3 Dec 2023 20:28:02 +0000 Subject: [PATCH 07/11] Add more SCIP events --- src/pyscipopt/scip.pxd | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/pyscipopt/scip.pxd b/src/pyscipopt/scip.pxd index 36a0b2668..0f08d26c8 100644 --- a/src/pyscipopt/scip.pxd +++ b/src/pyscipopt/scip.pxd @@ -249,7 +249,24 @@ cdef extern from "scip/scip.h": SCIP_EVENTTYPE SCIP_EVENTTYPE_ROWCONSTCHANGED SCIP_EVENTTYPE SCIP_EVENTTYPE_ROWSIDECHANGED SCIP_EVENTTYPE SCIP_EVENTTYPE_SYNC - SCIP_EVENTTYPE SCIP_EVENTTYPE_LPEVENT + SCIP_EVENTTYPE SCIP_EVENTTYPE_GBDCHANGED + SCIP_EVENTTYPE SCIP_EVENTTYPE_LBCHANGED + SCIP_EVENTTYPE SCIP_EVENTTYPE_UBCHANGED + SCIP_EVENTTYPE SCIP_EVENTTYPE_BOUNDTIGHTENED + SCIP_EVENTTYPE SCIP_EVENTTYPE_BOUNDRELAXED + SCIP_EVENTTYPE SCIP_EVENTTYPE_BOUNDCHANGED + SCIP_EVENTTYPE SCIP_EVENTTYPE_LHOLECHANGED + SCIP_EVENTTYPE SCIP_EVENTTYPE_HOLECHANGED + SCIP_EVENTTYPE SCIP_EVENTTYPE_DOMCHANGED + SCIP_EVENTTYPE SCIP_EVENTTYPE_VARCHANGED + SCIP_EVENTTYPE SCIP_EVENTTYPE_VAREVENT + SCIP_EVENTTYPE SCIP_EVENTTYPE_NODESOLVED + SCIP_EVENTTYPE SCIP_EVENTTYPE_NODEEVENT + SCIP_EVENTTYPE SCIP_EVENTTYPE_LPEVENT + SCIP_EVENTTYPE SCIP_EVENTTYPE_SOLFOUND + SCIP_EVENTTYPE SCIP_EVENTTYPE_SOLEVENT + SCIP_EVENTTYPE SCIP_EVENTTYPE_ROWCHANGED + SCIP_EVENTTYPE SCIP_EVENTTYPE_ROWEVENT ctypedef int SCIP_LPSOLQUALITY From 763041f2a068a4d69598242787105839a62c3f5e Mon Sep 17 00:00:00 2001 From: Joao-Dionisio Date: Sun, 3 Dec 2023 22:17:15 +0000 Subject: [PATCH 08/11] Add all event types as of SCIP 8 --- src/pyscipopt/scip.pxi | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/pyscipopt/scip.pxi b/src/pyscipopt/scip.pxi index 64ed81cf0..ba2496361 100644 --- a/src/pyscipopt/scip.pxi +++ b/src/pyscipopt/scip.pxi @@ -202,7 +202,24 @@ cdef class PY_SCIP_EVENTTYPE: ROWCONSTCHANGED = SCIP_EVENTTYPE_ROWCONSTCHANGED ROWSIDECHANGED = SCIP_EVENTTYPE_ROWSIDECHANGED SYNC = SCIP_EVENTTYPE_SYNC - NODESOLVED = SCIP_EVENTTYPE_NODEFEASIBLE | SCIP_EVENTTYPE_NODEINFEASIBLE | SCIP_EVENTTYPE_NODEBRANCHED + GBDCHANGED = SCIP_EVENTTYPE_GBDCHANGED + LBCHANGED = SCIP_EVENTTYPE_LBCHANGED + UBCHANGED = SCIP_EVENTTYPE_UBCHANGED + BOUNDTIGHTENED = SCIP_EVENTTYPE_BOUNDTIGHTENED + BOUNDRELAXED = SCIP_EVENTTYPE_BOUNDRELAXED + BOUNDCHANGED = SCIP_EVENTTYPE_BOUNDCHANGED + GHOLECHANGED = SCIP_EVENTTYPE_GHOLECHANGED + LHOLECHANGED = SCIP_EVENTTYPE_LHOLECHANGED + HOLECHANGED = SCIP_EVENTTYPE_HOLECHANGED + DOMCHANGED = SCIP_EVENTTYPE_DOMCHANGED + VARCHANGED = SCIP_EVENTTYPE_VARCHANGED + VAREVENT = SCIP_EVENTTYPE_VAREVENT + NODESOLVED = SCIP_EVENTTYPE_NODESOLVED + NODEEVENT = SCIP_EVENTTYPE_NODEEVENT + SOLFOUND = SCIP_EVENTTYPE_SOLFOUND + SOLEVENT = SCIP_EVENTTYPE_SOLEVENT + ROWCHANGED = SCIP_EVENTTYPE_ROWCHANGED + ROWEVENT = SCIP_EVENTTYPE_ROWEVENT cdef class PY_SCIP_LPSOLSTAT: NOTSOLVED = SCIP_LPSOLSTAT_NOTSOLVED From 08372e9366744e5e93f92ea4e5a917ddaf67a820 Mon Sep 17 00:00:00 2001 From: Joao-Dionisio Date: Sun, 3 Dec 2023 22:18:35 +0000 Subject: [PATCH 09/11] Add test for event identification --- src/pyscipopt/scip.pxd | 1 + tests/test_event.py | 62 ++++++++++++++++++++++++++++++------------ 2 files changed, 46 insertions(+), 17 deletions(-) diff --git a/src/pyscipopt/scip.pxd b/src/pyscipopt/scip.pxd index 0f08d26c8..c5826b4ad 100644 --- a/src/pyscipopt/scip.pxd +++ b/src/pyscipopt/scip.pxd @@ -255,6 +255,7 @@ cdef extern from "scip/scip.h": SCIP_EVENTTYPE SCIP_EVENTTYPE_BOUNDTIGHTENED SCIP_EVENTTYPE SCIP_EVENTTYPE_BOUNDRELAXED SCIP_EVENTTYPE SCIP_EVENTTYPE_BOUNDCHANGED + SCIP_EVENTTYPE SCIP_EVENTTYPE_GHOLECHANGED SCIP_EVENTTYPE SCIP_EVENTTYPE_LHOLECHANGED SCIP_EVENTTYPE SCIP_EVENTTYPE_HOLECHANGED SCIP_EVENTTYPE SCIP_EVENTTYPE_DOMCHANGED diff --git a/tests/test_event.py b/tests/test_event.py index 733d7aa3a..92653eab4 100644 --- a/tests/test_event.py +++ b/tests/test_event.py @@ -8,30 +8,65 @@ class MyEvent(Eventhdlr): def eventinit(self): calls.append('eventinit') - #self.model.catchEvent(SCIP_EVENTTYPE.FIRSTLPSOLVED, self) self.model.catchEvent(self.event_type, self) - def eventexit(self): - self.model.dropEvent(self.event_type, self) + #def eventexit(self): + # self.model.dropEvent(self.event_type, self) def eventexec(self, event): calls.append('eventexec') - print(event.getType(),self.event_type) if self.event_type == SCIP_EVENTTYPE.LPEVENT: assert event.getType() in [SCIP_EVENTTYPE.FIRSTLPSOLVED, SCIP_EVENTTYPE.LPSOLVED] + elif self.event_type == SCIP_EVENTTYPE.GBDCHANGED: + assert event.getType() in [SCIP_EVENTTYPE.GLBCHANGED, SCIP_EVENTTYPE.GUBCHANGED] + elif self.event_type == SCIP_EVENTTYPE.LBCHANGED: + assert event.getType() in [SCIP_EVENTTYPE.LBTIGHTENED, SCIP_EVENTTYPE.LBRELAXED] + elif self.event_type == SCIP_EVENTTYPE.UBCHANGED: + assert event.getType() in [SCIP_EVENTTYPE.UBTIGHTENED, SCIP_EVENTTYPE.UBRELAXED] + elif self.event_type == SCIP_EVENTTYPE.BOUNDTIGHTENED: + assert event.getType() in [SCIP_EVENTTYPE.LBTIGHTENED, SCIP_EVENTTYPE.UBTIGHTENED] + elif self.event_type == SCIP_EVENTTYPE.BOUNDRELAXED: + assert event.getType() in [SCIP_EVENTTYPE.LBRELAXED, SCIP_EVENTTYPE.UBRELAXED] + elif self.event_type == SCIP_EVENTTYPE.BOUNDCHANGED: + assert event.getType() in [SCIP_EVENTTYPE.LBCHANGED, SCIP_EVENTTYPE.UBCHANGED] + elif self.event_type == SCIP_EVENTTYPE.GHOLECHANGED: + assert event.getType() in [SCIP_EVENTTYPE.GHOLEADDED, SCIP_EVENTTYPE.GHOLEREMOVED] + elif self.event_type == SCIP_EVENTTYPE.LHOLECHANGED: + assert event.getType() in [SCIP_EVENTTYPE.LHOLEADDED, SCIP_EVENTTYPE.LHOLEREMOVED] + elif self.event_type == SCIP_EVENTTYPE.HOLECHANGED: + assert event.getType() in [SCIP_EVENTTYPE.GHOLECHANGED, SCIP_EVENTTYPE.LHOLECHANGED] + elif self.event_type == SCIP_EVENTTYPE.DOMCHANGED: + assert event.getType() in [SCIP_EVENTTYPE.BOUNDCHANGED, SCIP_EVENTTYPE.HOLECHANGED] + elif self.event_type == SCIP_EVENTTYPE.VARCHANGED: + assert event.getType() in [SCIP_EVENTTYPE.VARFIXED, SCIP_EVENTTYPE.VARUNLOCKED, SCIP_EVENTTYPE.OBJCHANGED, SCIP_EVENTTYPE.GBDCHANGED, SCIP_EVENTTYPE.DOMCHANGED, SCIP_EVENTTYPE.IMPLADDED, SCIP_EVENTTYPE.VARDELETED, SCIP_EVENTTYPE.TYPECHANGED] + elif self.event_type == SCIP_EVENTTYPE.VAREVENT: + assert event.getType() in [SCIP_EVENTTYPE.VARADDED, SCIP_EVENTTYPE.VARCHANGED, SCIP_EVENTTYPE.TYPECHANGED] + elif self.event_type == SCIP_EVENTTYPE.NODESOLVED: + assert event.getType() in [SCIP_EVENTTYPE.NODEFEASIBLE, SCIP_EVENTTYPE.NODEINFEASIBLE, SCIP_EVENTTYPE.NODEBRANCHED] + elif self.event_type == SCIP_EVENTTYPE.NODEEVENT: + assert event.getType() in [SCIP_EVENTTYPE.NODEFOCUSED, SCIP_EVENTTYPE.NODEFEASIBLE, SCIP_EVENTTYPE.NODEINFEASIBLE, SCIP_EVENTTYPE.NODEBRANCHED] + elif self.event_type == SCIP_EVENTTYPE.LPEVENT: + assert event.getType() in [SCIP_EVENTTYPE.FIRSTLPSOLVED, SCIP_EVENTTYPE.LPSOLVED] + elif self.event_type == SCIP_EVENTTYPE.SOLFOUND: + assert event.getType() in [SCIP_EVENTTYPE.POORSOLFOUND, SCIP_EVENTTYPE.BESTSOLFOUND] + elif self.event_type == SCIP_EVENTTYPE.ROWCHANGED: + assert event.getType() in [SCIP_EVENTTYPE.ROWCOEFCHANGED, SCIP_EVENTTYPE.ROWCONSTCHANGED, SCIP_EVENTTYPE.ROWSIDECHANGED] + elif self.event_type == SCIP_EVENTTYPE.ROWEVENT: + assert event.getType() in [SCIP_EVENTTYPE.ROWADDEDSEPA, SCIP_EVENTTYPE.ROWDELETEDSEPA, SCIP_EVENTTYPE.ROWADDEDLP, SCIP_EVENTTYPE.ROWDELETEDLP, SCIP_EVENTTYPE.ROWCHANGED] else: assert event.getType() == self.event_type - #assert event.getNode().getNumber() == 1 - #assert event.getNode().getParent() is None def test_event(): - all_events = [SCIP_EVENTTYPE.DISABLED,SCIP_EVENTTYPE.VARADDED,SCIP_EVENTTYPE.VARDELETED,SCIP_EVENTTYPE.VARFIXED,SCIP_EVENTTYPE.VARUNLOCKED,SCIP_EVENTTYPE.OBJCHANGED,SCIP_EVENTTYPE.GLBCHANGED,SCIP_EVENTTYPE.GUBCHANGED,SCIP_EVENTTYPE.LBTIGHTENED,SCIP_EVENTTYPE.LBRELAXED,SCIP_EVENTTYPE.UBTIGHTENED,SCIP_EVENTTYPE.UBRELAXED,SCIP_EVENTTYPE.GHOLEADDED,SCIP_EVENTTYPE.GHOLEREMOVED,SCIP_EVENTTYPE.LHOLEADDED,SCIP_EVENTTYPE.LHOLEREMOVED,SCIP_EVENTTYPE.IMPLADDED,SCIP_EVENTTYPE.PRESOLVEROUND,SCIP_EVENTTYPE.NODEFOCUSED,SCIP_EVENTTYPE.NODEFEASIBLE,SCIP_EVENTTYPE.NODEINFEASIBLE,SCIP_EVENTTYPE.NODEBRANCHED,SCIP_EVENTTYPE.FIRSTLPSOLVED,SCIP_EVENTTYPE.LPSOLVED,SCIP_EVENTTYPE.POORSOLFOUND,SCIP_EVENTTYPE.BESTSOLFOUND,SCIP_EVENTTYPE.ROWADDEDSEPA,SCIP_EVENTTYPE.ROWDELETEDSEPA,SCIP_EVENTTYPE.ROWADDEDLP,SCIP_EVENTTYPE.ROWDELETEDLP,SCIP_EVENTTYPE.ROWCOEFCHANGED,SCIP_EVENTTYPE.ROWCONSTCHANGED,SCIP_EVENTTYPE.ROWSIDECHANGED,SCIP_EVENTTYPE.SYNC,SCIP_EVENTTYPE.LPEVENT] - + all_events = [SCIP_EVENTTYPE.DISABLED,SCIP_EVENTTYPE.VARADDED,SCIP_EVENTTYPE.VARDELETED,SCIP_EVENTTYPE.VARFIXED,SCIP_EVENTTYPE.VARUNLOCKED,SCIP_EVENTTYPE.OBJCHANGED,SCIP_EVENTTYPE.GLBCHANGED,SCIP_EVENTTYPE.GUBCHANGED,SCIP_EVENTTYPE.LBTIGHTENED,SCIP_EVENTTYPE.LBRELAXED,SCIP_EVENTTYPE.UBTIGHTENED,SCIP_EVENTTYPE.UBRELAXED,SCIP_EVENTTYPE.GHOLEADDED,SCIP_EVENTTYPE.GHOLEREMOVED,SCIP_EVENTTYPE.LHOLEADDED,SCIP_EVENTTYPE.LHOLEREMOVED,SCIP_EVENTTYPE.IMPLADDED,SCIP_EVENTTYPE.PRESOLVEROUND,SCIP_EVENTTYPE.NODEFOCUSED,SCIP_EVENTTYPE.NODEFEASIBLE,SCIP_EVENTTYPE.NODEINFEASIBLE,SCIP_EVENTTYPE.NODEBRANCHED,SCIP_EVENTTYPE.NODEDELETE,SCIP_EVENTTYPE.FIRSTLPSOLVED,SCIP_EVENTTYPE.LPSOLVED,SCIP_EVENTTYPE.POORSOLFOUND,SCIP_EVENTTYPE.BESTSOLFOUND,SCIP_EVENTTYPE.ROWADDEDSEPA,SCIP_EVENTTYPE.ROWDELETEDSEPA,SCIP_EVENTTYPE.ROWADDEDLP,SCIP_EVENTTYPE.ROWDELETEDLP,SCIP_EVENTTYPE.ROWCOEFCHANGED,SCIP_EVENTTYPE.ROWCONSTCHANGED,SCIP_EVENTTYPE.ROWSIDECHANGED,SCIP_EVENTTYPE.SYNC,SCIP_EVENTTYPE.GBDCHANGED,SCIP_EVENTTYPE.LBCHANGED,SCIP_EVENTTYPE.UBCHANGED,SCIP_EVENTTYPE.BOUNDTIGHTENED,SCIP_EVENTTYPE.BOUNDRELAXED,SCIP_EVENTTYPE.BOUNDCHANGED,SCIP_EVENTTYPE.LHOLECHANGED,SCIP_EVENTTYPE.HOLECHANGED,SCIP_EVENTTYPE.DOMCHANGED,SCIP_EVENTTYPE.VARCHANGED,SCIP_EVENTTYPE.VAREVENT,SCIP_EVENTTYPE.NODESOLVED,SCIP_EVENTTYPE.NODEEVENT,SCIP_EVENTTYPE.LPEVENT,SCIP_EVENTTYPE.SOLFOUND,SCIP_EVENTTYPE.SOLEVENT,SCIP_EVENTTYPE.ROWCHANGED,SCIP_EVENTTYPE.ROWEVENT] + + + for i in [20]: + print(SCIP_EVENTTYPE.NODEINFEASIBLE) + all_event_hdlrs = [] for event in all_events: - # create solver instance s = Model() s.hideOutput() s.setPresolve(SCIP_PARAMSETTING.OFF) @@ -40,17 +75,10 @@ def test_event(): s.includeEventhdlr(all_event_hdlrs[-1], str(event), "python event handler to catch %s" % str(event)) x = {} - # add some variables for i in range(100): x[i] = s.addVar("x", obj=random.random(), vtype="I") - # add some constraints for j in range(1,20): s.addCons(quicksum(x[i] for i in range(100) if i%j==0) >= random.randint(10,100)) - # solve problem - s.optimize() - - del s - -test_event() \ No newline at end of file + s.optimize() \ No newline at end of file From 8bb4f83c54726f0e37e353d979ba5689f8f1637b Mon Sep 17 00:00:00 2001 From: Joao-Dionisio Date: Sun, 3 Dec 2023 22:19:46 +0000 Subject: [PATCH 10/11] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f4410e9e..845c21d61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased ### Added +- Added all event types and tests for checking them - Added SCIP functions SCIPconsGetNVars, SCIPconsGetVars - Added SCIP functions SCIPchgCoefLinear, SCIPaddCoefLinear and SCIPdelCoefLinear - Added SCIP function SCIPgetSolTime and wrapper getSolTime From c0ec88d0eeef7771c7be39276ee438c2df0d1ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Dion=C3=ADsio?= <57299939+Joao-Dionisio@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:49:00 +0000 Subject: [PATCH 11/11] Remove commented code --- src/pyscipopt/scip.pxd | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/pyscipopt/scip.pxd b/src/pyscipopt/scip.pxd index c5826b4ad..12815dbc4 100644 --- a/src/pyscipopt/scip.pxd +++ b/src/pyscipopt/scip.pxd @@ -456,9 +456,6 @@ cdef extern from "scip/scip.h": ctypedef struct SCIP_HASHMAP: pass - #ctypedef struct SCIP_BOUNDTYPE: - # pass - ctypedef struct SCIP_BDCHGIDX: pass