Skip to content

Commit 1099b2f

Browse files
committed
Add two missing methods. Will not test
1 parent 91f1923 commit 1099b2f

File tree

2 files changed

+34
-5
lines changed

2 files changed

+34
-5
lines changed

src/pyscipopt/scip.pxd

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,16 +1653,13 @@ cdef extern from "scip/cons_and.h":
16531653
SCIP_Bool dynamic,
16541654
SCIP_Bool removable,
16551655
SCIP_Bool stickingatnode)
1656-
16571656
int SCIPgetNVarsAnd(SCIP* scip, SCIP_CONS* cons)
1658-
16591657
SCIP_VAR** SCIPgetVarsAnd(SCIP* scip, SCIP_CONS* cons)
1660-
16611658
SCIP_VAR* SCIPgetResultantAnd(SCIP* scip, SCIP_CONS* cons)
1662-
16631659
SCIP_Bool SCIPisAndConsSorted(SCIP* scip, SCIP_CONS* cons)
1664-
16651660
SCIP_RETCODE SCIPsortAndCons(SCIP* scip, SCIP_CONS* cons)
1661+
SCIP_RETCODE SCIPchgAndConsCheckFlagWhenUpgr(SCIP* scip, SCIP_CONS* cons, SCIP_Bool flag)
1662+
SCIP_RETCODE SCIPchgAndConsRemovableFlagWhenUpgr(SCIP* scip, SCIP_CONS* cons, SCIP_Bool flag)
16661663

16671664
cdef extern from "scip/cons_or.h":
16681665
SCIP_RETCODE SCIPcreateConsOr(SCIP* scip,

src/pyscipopt/scip.pxi

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6112,6 +6112,38 @@ cdef class Model:
61126112
cdef SCIP_Bool success
61136113

61146114
PY_SCIP_CALL(SCIPsortAndCons(self._scip, and_cons.scip_cons))
6115+
6116+
def chgAndConsCheckFlagWhenUpgr(self, Constraint cons, flag):
6117+
"""
6118+
when 'upgrading' the given AND-constraint, should the check flag for the upgraded
6119+
constraint be set to TRUE, even if the check flag of this AND-constraint is set to FALSE?
6120+
6121+
Parameters
6122+
----------
6123+
cons : Constraint
6124+
The AND constraint to change.
6125+
flag : bool
6126+
The new value for the check flag.
6127+
6128+
"""
6129+
6130+
PY_SCIP_CALL(SCIPchgAndConsCheckFlagWhenUpgr(self._scip, cons.scip_cons, flag))
6131+
6132+
def chgAndConsRemovableFlagWhenUpgr(self, Constraint cons, flag):
6133+
"""
6134+
when 'upgrading' the given AND-constraint, should the removable flag for the upgraded
6135+
constraint be set to TRUE, even if the removable flag of this AND-constraint is set to FALSE?
6136+
6137+
Parameters
6138+
----------
6139+
cons : Constraint
6140+
The AND constraint to change.
6141+
flag : bool
6142+
The new value for the removable flag.
6143+
6144+
"""
6145+
6146+
PY_SCIP_CALL(SCIPchgAndConsRemovableFlagWhenUpgr(self._scip, cons.scip_cons, flag))
61156147

61166148
def printCons(self, Constraint constraint):
61176149
"""

0 commit comments

Comments
 (0)