29 #define PRESOL_NAME "trivial" 30 #define PRESOL_DESC "round fractional bounds on integers, fix variables with equal bounds" 31 #define PRESOL_PRIORITY +9000000 32 #define PRESOL_MAXROUNDS -1 33 #define PRESOL_TIMING SCIP_PRESOLTIMING_FAST 36 #define MAXDNOM 10000LL 49 assert(presol !=
NULL);
67 assert(result !=
NULL);
78 for( v = nvars-1; v >= 0; --v )
100 if( newlb > newub + 0.5 )
103 "problem infeasible: integral variable <%s> has bounds [%.17f,%.17f] rounded to [%.17f,%.17f]\n",
110 if( newlb > newub - 0.5 )
128 SCIPdebugMsg(
scip,
"rounding lower bound of integral variable <%s>: [%.17f,%.17f] -> [%.17f,%.17f]\n",
135 SCIPdebugMsg(
scip,
"rounding upper bound of integral variable <%s>: [%.17f,%.17f] -> [%.17f,%.17f]\n",
148 "problem infeasible: continuous variable <%s> has bounds [%.17f,%.17f]\n",
159 #ifdef FIXSIMPLEVALUE 162 fixval = (lb + ub)/2;
196 assert(presolptr !=
NULL);
SCIP_RETCODE SCIPincludePresolBasic(SCIP *scip, SCIP_PRESOL **presolptr, const char *name, const char *desc, int priority, int maxrounds, SCIP_PRESOLTIMING timing, SCIP_DECL_PRESOLEXEC((*presolexec)), SCIP_PRESOLDATA *presoldata)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
enum SCIP_Retcode SCIP_RETCODE
SCIP_Real SCIPselectSimpleValue(SCIP_Real lb, SCIP_Real ub, SCIP_Longint maxdnom)
SCIP_RETCODE SCIPchgVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
trivial presolver: round fractional bounds on integer variables, fix variables with equal bounds ...
SCIP_Real SCIPepsilon(SCIP *scip)
SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Bool SCIPisFeasGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPincludePresolTrivial(SCIP *scip)
const char * SCIPpresolGetName(SCIP_PRESOL *presol)
static SCIP_DECL_PRESOLCOPY(presolCopyTrivial)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
static SCIP_DECL_PRESOLEXEC(presolExecTrivial)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPsetPresolCopy(SCIP *scip, SCIP_PRESOL *presol, SCIP_DECL_PRESOLCOPY((*presolcopy)))
SCIP_VAR ** SCIPgetVars(SCIP *scip)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)