support scip 2.1.0
This commit is contained in:
@@ -118,7 +118,7 @@ ifdef UNIX_CBC_DIR
|
||||
CBC_LNK = -L$(UNIX_CBC_DIR)/lib$(UNIX_CBC_COIN) -lCbcSolver -lCbc -lCgl -lOsi -lOsiCbc -lOsiClp
|
||||
endif
|
||||
ifdef UNIX_SCIP_DIR
|
||||
SCIP_ARCH = darwin.x86.gnu.opt
|
||||
SCIP_ARCH = darwin.x86_64.gnu.opt
|
||||
SCIP_LNK = -L$(UNIX_SCIP_DIR)/lib -lscip.$(SCIP_ARCH) -lnlpi.$(SCIP_ARCH) -llpispx.$(SCIP_ARCH) -lsoplex.$(SCIP_ARCH) -lreadline
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -244,9 +244,17 @@ void SCIPInterface::SetVariableInteger(int var_index, bool integer) {
|
||||
if (var_index != kNoIndex) {
|
||||
// Not cached if the variable has been extracted.
|
||||
ORTOOLS_SCIP_CALL(SCIPfreeTransform(scip_));
|
||||
#if (SCIP_VERSION >= 210)
|
||||
SCIP_Bool infeasible = false;
|
||||
ORTOOLS_SCIP_CALL(SCIPchgVarType(
|
||||
scip_, scip_variables_[var_index],
|
||||
integer ? SCIP_VARTYPE_INTEGER : SCIP_VARTYPE_CONTINUOUS,
|
||||
&infeasible));
|
||||
#else
|
||||
ORTOOLS_SCIP_CALL(SCIPchgVarType(
|
||||
scip_, scip_variables_[var_index],
|
||||
integer ? SCIP_VARTYPE_INTEGER : SCIP_VARTYPE_CONTINUOUS));
|
||||
#endif
|
||||
} else {
|
||||
sync_status_ = MUST_RELOAD;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user