30 #define CONSHDLR_NAME "integral" 31 #define CONSHDLR_DESC "integrality constraint" 32 #define CONSHDLR_ENFOPRIORITY 0 33 #define CONSHDLR_CHECKPRIORITY 0 34 #define CONSHDLR_EAGERFREQ -1 36 #define CONSHDLR_NEEDSCONS FALSE 47 assert(conshdlr != NULL);
58 #define consCopyIntegral NULL 60 #define consEnfopsIntegral NULL 66 assert(conshdlr != NULL);
69 assert(conss == NULL);
71 assert(result != NULL);
106 assert(conshdlr != NULL);
108 assert(
scip != NULL);
109 assert(conss == NULL);
111 assert(result != NULL);
119 for( i = 0; i < nbinvars + nintvars; ++i )
121 assert(vars[i] != NULL);
172 assert(conshdlr != NULL);
174 assert(
scip != NULL);
176 SCIPdebugMsg(
scip,
"Check method of integrality constraint (checkintegrality=%u)\n", checkintegrality);
182 ninteger = nbin + nint;
184 if( checkintegrality )
186 for( v = 0; v < ninteger; ++v )
210 for( v = 0; v < ninteger; ++v )
218 nallinteger = ninteger + nimpl;
219 for( v = ninteger; v < nallinteger; ++v )
228 SCIPinfoMessage(
scip, NULL,
"violation: integrality condition of implicit integral variable <%s> = %.15g\n",
262 assert(
scip != NULL);
264 assert(diveset != NULL);
266 assert(conshdlr != NULL);
268 assert(
scip != NULL);
270 SCIPdebugMsg(
scip,
"integral constraint handler: determine diving bound changes\n");
274 ninteger = nbin + nint + nimpl;
281 for( v = 0; v < ninteger; ++v )
292 if( score > bestscore )
301 assert(!(*success) || bestcandidx >= 0);
334 assert(conshdlr != NULL);
SCIP_Real SCIPfeastol(SCIP *scip)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_DECL_CONSLOCK(consLockIntegral)
SCIP_RETCODE SCIPgetSolVarsData(SCIP *scip, SCIP_SOL *sol, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
static SCIP_DECL_CONSHDLRCOPY(conshdlrCopyIntegral)
#define CONSHDLR_EAGERFREQ
SCIP_RETCODE SCIPincludeConshdlrBasic(SCIP *scip, SCIP_CONSHDLR **conshdlrptr, const char *name, const char *desc, int enfopriority, int chckpriority, int eagerfreq, SCIP_Bool needscons, SCIP_DECL_CONSENFOLP((*consenfolp)), SCIP_DECL_CONSENFOPS((*consenfops)), SCIP_DECL_CONSCHECK((*conscheck)), SCIP_DECL_CONSLOCK((*conslock)), SCIP_CONSHDLRDATA *conshdlrdata)
enum SCIP_Retcode SCIP_RETCODE
SCIP_RETCODE SCIPaddDiveBoundChange(SCIP *scip, SCIP_VAR *var, SCIP_BRANCHDIR dir, SCIP_Real value, SCIP_Bool preferred)
int SCIPgetNLPBranchCands(SCIP *scip)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
#define consEnfopsIntegral
SCIP_RETCODE SCIPsetConshdlrGetDiveBdChgs(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETDIVEBDCHGS((*consgetdivebdchgs)))
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
#define CONSHDLR_ENFOPRIORITY
const char * SCIPvarGetName(SCIP_VAR *var)
void SCIPupdateSolIntegralityViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol)
static SCIP_DECL_CONSGETDIVEBDCHGS(consGetDiveBdChgsIntegral)
static SCIP_DECL_CONSENFORELAX(consEnforelaxIntegral)
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
#define CONSHDLR_NEEDSCONS
static SCIP_DECL_CONSCHECK(consCheckIntegral)
SCIP_RETCODE SCIPaddExternBranchCand(SCIP *scip, SCIP_VAR *var, SCIP_Real score, SCIP_Real solval)
static SCIP_DECL_CONSENFOLP(consEnfolpIntegral)
constraint handler for the integrality constraint
SCIP_RETCODE SCIPbranchLP(SCIP *scip, SCIP_RESULT *result)
SCIP_RETCODE SCIPbranchExtern(SCIP *scip, SCIP_RESULT *result)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPgetDivesetScore(SCIP *scip, SCIP_DIVESET *diveset, SCIP_DIVETYPE divetype, SCIP_VAR *divecand, SCIP_Real divecandsol, SCIP_Real divecandfrac, SCIP_Real *candscore, SCIP_Bool *roundup)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
#define SCIP_DIVETYPE_INTEGRALITY
#define CONSHDLR_CHECKPRIORITY
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPincludeConshdlrIntegral(SCIP *scip)