support scip 2.1.0

This commit is contained in:
lperron@google.com
2011-11-01 09:34:36 +00:00
parent df9d63cbc0
commit 21e7b72595
2 changed files with 9 additions and 1 deletions

View File

@@ -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

View File

@@ -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;
}