81#define CONSHDLR_NAME "linking"
82#define CONSHDLR_DESC "linking constraint x = sum_{i=1}^{n} c_i*y_i, y1+...+yn = 1, x real, y's binary"
84#define EVENTHDLR_NAME "linking"
85#define EVENTHDLR_DESC "event handler for linking constraints"
87#define CONSHDLR_SEPAPRIORITY 750000
88#define CONSHDLR_ENFOPRIORITY -2050000
89#define CONSHDLR_CHECKPRIORITY -750000
90#define CONSHDLR_SEPAFREQ 1
91#define CONSHDLR_PROPFREQ 1
92#define CONSHDLR_EAGERFREQ 100
93#define CONSHDLR_MAXPREROUNDS -1
94#define CONSHDLR_DELAYSEPA FALSE
95#define CONSHDLR_DELAYPROP FALSE
96#define CONSHDLR_NEEDSCONS TRUE
98#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP
99#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_MEDIUM
102#define HASHSIZE_BINVARSCONS 500
103#define DEFAULT_LINEARIZE FALSE
125 unsigned int cliqueadded:1;
126 unsigned int sorted:1;
130struct SCIP_ConshdlrData
157 if( consdata->sorted )
161 SCIPsortRealPtr(consdata->vals, (
void**)consdata->binvars, consdata->nbinvars);
163 consdata->sorted =
TRUE;
201 (*conshdlrdata)->varmap =
NULL;
204 (*conshdlrdata)->eventhdlr = eventhdlr;
220 if( (*conshdlrdata)->varmap !=
NULL )
242 linkvar = consdata->linkvar;
243 binvars = consdata->binvars;
284 var = consdata->binvars[pos];
293 consdata->nfixedzeros++;
295 consdata->nfixedones++;
316 var = consdata->binvars[pos];
324 consdata->nfixedzeros--;
326 consdata->nfixedones--;
349 for(
i = 0;
i < consdata->nbinvars; ++
i )
375 for(
i = 0;
i < consdata->nbinvars; ++
i )
411 for(
b = 0;
b < consdata->nbinvars; ++
b )
443 assert(consdata->nbinvars == 0);
453 linkvar = consdata->linkvar;
476 consdata->binvars[0] = binvar;
477 consdata->vals[0] = lb;
491 consdata->binvars[
b] = binvar;
492 consdata->vals[
b] = lb +
b;
498 assert(consdata->nfixedzeros == 0);
499 assert(consdata->nfixedones == 0);
549 (*consdata)->linkvar = linkvar;
551 (*consdata)->sizebinvars =
nbinvars;
552 (*consdata)->row1 =
NULL;
553 (*consdata)->row2 =
NULL;
554 (*consdata)->nlrow1 =
NULL;
555 (*consdata)->nlrow2 =
NULL;
556 (*consdata)->cliqueadded =
FALSE;
559 (*consdata)->sorted =
FALSE;
560 (*consdata)->firstnonfixed = 0;
561 (*consdata)->lastnonfixed =
nbinvars - 1;
562 (*consdata)->nfixedzeros = 0;
563 (*consdata)->nfixedones = 0;
567 (*consdata)->binvars =
NULL;
568 (*consdata)->vals =
NULL;
622 assert((*consdata)->nbinvars == 0 || (*consdata)->binvars !=
NULL);
625 if( (*consdata)->row1 !=
NULL )
634 if( (*consdata)->nlrow1 !=
NULL )
643 for( v = 0; v < (*consdata)->nbinvars; ++v )
651 if( (*consdata)->sizebinvars > 0 )
659 assert((*consdata)->nfixedzeros == 0);
660 assert((*consdata)->nfixedones == 0);
730 SCIP_Bool infeasible;
737 linkvar = consdata->linkvar;
738 coef = consdata->vals[pos];
794 SCIP_Bool infeasible;
816 if( consdata->nfixedones > 0 || consdata->nfixedzeros >=
nbinvars-1 )
819 linkvar = consdata->linkvar;
822 binvars = consdata->binvars;
823 vals = consdata->vals;
832 for(
b = 0;
b < consdata->firstnonfixed; ++
b )
836 for(
b = consdata->lastnonfixed + 1;
b <
nbinvars; ++
b )
840 for(
b = consdata->firstnonfixed;
b <
nbinvars; ++
b )
849 SCIPdebugMsg(
scip,
"fix variable <%s> to zero due to the lower bound of the linking variable <%s> [%g,%g]\n",
865 consdata->firstnonfixed++;
872 for(
b = consdata->lastnonfixed;
b >= 0; --
b )
881 SCIPdebugMsg(
scip,
"fix variable <%s> to zero due to the upper bound of the linking variable <%s> [%g,%g]\n",
897 consdata->lastnonfixed--;
903 if( consdata->firstnonfixed > consdata->lastnonfixed )
916 if( consdata->firstnonfixed == consdata->lastnonfixed )
920 var = binvars[consdata->firstnonfixed];
922 SCIPdebugMsg(
scip,
"fix variable <%s> to one due to the fixed linking variable <%s> [%g,%g]\n",
958 vars = &consdata->binvars[consdata->firstnonfixed];
959 nvars = consdata->lastnonfixed - consdata->firstnonfixed + 1;
995 var = consdata->binvars[pos];
1019 if( pos != consdata->nbinvars - 1 )
1021 consdata->binvars[pos] = consdata->binvars[consdata->nbinvars-1];
1022 consdata->vals[pos] = consdata->vals[consdata->nbinvars-1];
1023 consdata->sorted =
FALSE;
1026 consdata->nbinvars--;
1048 assert(consdata->sorted);
1056 for(
b =
nbinvars - 1;
b > consdata->lastnonfixed; --
b )
1061 for(
b = consdata->firstnonfixed - 1;
b >= 0; --
b )
1066 for(
b = consdata->nbinvars - 1;
b >= 0; --
b )
1075 consdata->firstnonfixed = 0;
1076 consdata->lastnonfixed = consdata->nbinvars - 1;
1095 SCIP_Bool infeasible;
1096 SCIP_Bool tightened;
1101 if( consdata->nfixedones > 1 || consdata->nfixedzeros >= consdata->nbinvars-1 )
1107 assert(consdata->sorted);
1109 linkvar = consdata->linkvar;
1110 binvars = consdata->binvars;
1111 vals = consdata->vals;
1116 for(
b = 0;
b < consdata->firstnonfixed; ++
b )
1124 for(
b = consdata->firstnonfixed;
b <
nbinvars; ++
b )
1129 consdata->firstnonfixed++;
1140 SCIPdebugMsg(
scip,
"conflict at <%s> due to bounds and fixed binvars: [lb,ub] = [%g,%g]; b= %d; coef = %g \n",
1150 for(
b = 0;
b < consdata->firstnonfixed; ++
b )
1168 for(
b = consdata->lastnonfixed + 1;
b <
nbinvars; ++
b )
1173 for(
b = consdata->lastnonfixed;
b >= 0; --
b )
1178 consdata->lastnonfixed--;
1189 SCIPdebugMsg(
scip,
"conflict at <%s> due to bounds and fixed binvars: [lb,ub] = [%g,%g]; b = %d; coef = %g,\n",
1199 for(
b = consdata->lastnonfixed + 1;
b <
nbinvars; ++
b )
1230 SCIP_Bool infeasible;
1231 SCIP_Bool tightened;
1243 assert(consdata->nbinvars == 0 || consdata->binvars !=
NULL);
1244 assert(0 <= consdata->nfixedzeros && consdata->nfixedzeros <= consdata->nbinvars);
1245 assert(0 <= consdata->nfixedones && consdata->nfixedones <= consdata->nbinvars);
1251 assert(consdata->nbinvars > 1);
1256 if( consdata->nfixedones == 1 )
1262 if( consdata->nfixedzeros < consdata->nbinvars - 1 ||
1273 SCIPdebugMsg(
scip,
" -> fixing all other variables to zero due to the set partitioning condition <%s>\n",
1280 vars = consdata->binvars;
1281 nvars = consdata->nbinvars;
1286 for( v = 0; v <
nvars && consdata->nfixedones == 1 && !(*cutoff); ++v )
1334 else if( consdata->nfixedones >= 2 )
1351 vars = consdata->binvars;
1352 nvars = consdata->nbinvars;
1359 for( v = 0; v <
nvars && n < 2; ++v )
1375 else if( consdata->nfixedzeros == consdata->nbinvars )
1382 assert(consdata->nfixedones == 0);
1399 vars = consdata->binvars;
1400 nvars = consdata->nbinvars;
1405 for( v = 0; v <
nvars; ++v )
1417 else if( consdata->nfixedzeros == consdata->nbinvars - 1 )
1424 assert(consdata->nfixedones == 0);
1434 vars = consdata->binvars;
1435 nvars = consdata->nbinvars;
1436 for( v = 0; v <
nvars && !(*cutoff); ++v )
1462 assert(consdata->nfixedzeros == consdata->nbinvars - 1);
1463 assert(consdata->nfixedones == 1);
1476 assert(consdata->nfixedzeros + consdata->nfixedones <= consdata->nbinvars);
1494 SCIP_Real linkvarval;
1509 assert(consdata->binvars !=
NULL || consdata->nbinvars == 0);
1512 assert(consdata->nbinvars > 1);
1515 binvars = consdata->binvars;
1516 vals = consdata->vals;
1572 SCIP_Bool infeasible;
1573 SCIP_Bool redundant;
1584 for(
c = 0;
c < nconss; ++
c )
1589 linkvar = consdata->linkvar;
1615 offset = consdata->offset;
1616 binvars = consdata->binvars;
1672 assert(consdata->nbinvars > 1);
1686 for(
b = 0;
b < consdata->nbinvars; ++
b )
1693 assert( consdata->nbinvars > 0 );
1721 assert(consdata->nbinvars > 1);
1723 if( consdata->row1 ==
NULL )
1768 if( consdata->nlrow1 ==
NULL )
1789 for(
i = 0;
i < consdata->nbinvars; ++
i )
1834 assert(consdata->nbinvars > 1);
1907 SCIP_Bool* infeasible,
1981 SCIPdebugMsg(
scip,
"Enforcing %d linking constraints for %s solution\n", nconss,
sol ==
NULL ?
"LP" :
"relaxation");
2002 else if( nchgbds > 0 )
2064 for(
c = 0;
c < nconss; ++
c )
2073 if( consdata->nbinvars <= 1 )
2078 else if( conshdlrdata->linearize )
2096 for(
c = 0;
c < nconss; ++
c )
2112 for(
c = 0;
c < nconss; ++
c )
2118 if( consdata->row1 !=
NULL )
2126 if( consdata->nlrow1 !=
NULL )
2222 *infeasible =
FALSE;
2224 for(
c = 0;
c < nconss && !(*infeasible); ++
c )
2231 if( consdata->nbinvars <= 1 )
2270 else if( nchgbds > 0 )
2310 else if( nchgbds > 0 )
2346 SCIP_Bool infeasible;
2377 else if( nchgbds > 0 )
2381 else if( infeasible )
2427 for(
b = 0;
b < consdata->nbinvars; ++
b )
2438 for(
b = 0;
b < consdata->nbinvars; ++
b )
2502 else if( nchgbds > 0 )
2526 SCIP_Bool infeasible;
2573 assert(consdata->nbinvars > 1);
2576 if( consdata->nfixedones >= 2 )
2586 if( consdata->nfixedones == 1 )
2598 for( v = 0; v < consdata->nbinvars; ++v )
2600 var = consdata->binvars[v];
2651 if( consdata->nfixedzeros == consdata->nbinvars )
2656 assert(consdata->nfixedones == 0);
2663 if( consdata->nfixedzeros == consdata->nbinvars - 1 )
2674 assert(consdata->nfixedones == 0);
2682 for( v = 0; v < consdata->nbinvars &&
SCIPvarGetUbGlobal(consdata->binvars[v]) < 0.5; ++v );
2684 var = consdata->binvars[v];
2724 if( consdata->nfixedzeros == consdata->nbinvars - 2 )
2729 SCIP_Bool redundant;
2740 for( v = 0; v < consdata->nbinvars &&
var2 ==
NULL; ++v )
2742 var = consdata->binvars[v];
2761 SCIPdebugMsg(
scip,
"linking constraint <%s>: infeasible aggregation <%s> + <%s> == 1\n",
2780 if( !
cutoff && consdata->nbinvars == 1 )
2786 linkvar = consdata->linkvar;
2787 binvar = consdata->binvars[0];
2788 val = consdata->vals[0];
2790 SCIPdebugMsg(
scip,
"linking constraint <%s>: fix <%s> to %16.9g as only one binary variable remains",
2820 if( !consdata->cliqueadded && consdata->nbinvars >= 2 )
2846 if( !consdata->cliqueadded && consdata->nbinvars >= 3 )
2860 consdata->cliqueadded =
TRUE;
2892 linkvar = consdata->linkvar;
2897 if( inferinfo == -1 )
2911 for( v = 0; v < consdata->nbinvars; ++v )
2927 for( v = 0; v < consdata->nbinvars; ++v )
2929 if( consdata->binvars[v] !=
infervar )
2938 else if( inferinfo == -2 )
2950 else if( inferinfo == -3 )
2962 else if( inferinfo == -4 )
2974 binvars = consdata->binvars;
2976 vals = consdata->vals;
2990 else if( inferinfo == -5 )
3003 binvars = consdata->binvars;
3005 vals = consdata->vals;
3019 else if( inferinfo == -6 )
3068 for(
b = 0;
b < consdata->nbinvars; ++
b )
3133 if( consdata->nbinvars <= 1 )
3138 else if( conshdlrdata->linearize )
3169 const char* consname;
3225 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
3260 if( linkvar ==
NULL )
3281 str += *(
str+1) ==
'=' ? 2 : 1;
3292 if(
strncmp(
str,
"no binary variables yet", 24) != 0 )
3326 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
3351 vars[consdata->nbinvars] = consdata->linkvar;
3367 (*nvars) = consdata->nbinvars + 1;
3396 consdata->nfixedones++;
3399 consdata->nfixedones--;
3400 consdata->firstnonfixed = 0;
3401 consdata->lastnonfixed = consdata->nbinvars - 1;
3404 consdata->nfixedzeros++;
3407 consdata->firstnonfixed = 0;
3408 consdata->lastnonfixed = consdata->nbinvars - 1;
3409 consdata->nfixedzeros--;
3415 assert(0 <= consdata->nfixedzeros && consdata->nfixedzeros <= consdata->nbinvars);
3416 assert(0 <= consdata->nfixedones && consdata->nfixedones <= consdata->nbinvars);
3481 "constraints/" CONSHDLR_NAME "/linearize",
"this constraint will not propagate or separate, linear and setppc are used?",
3511 SCIP_Bool modifiable,
3517 SCIP_Bool removable,
3519 SCIP_Bool stickingatnode
3535 if( conshdlr ==
NULL )
3541 SCIPdebugMsg(
scip,
"create linking constraint for variable <%s> with %d binary variables (SCIP stage %d)\n",
3552 if( conshdlrdata->varmap ==
NULL )
3565 initial, separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
3639 if( conshdlrdata->varmap !=
NULL )
3665 return consdata->linkvar;
3690 if( consdata->binvars ==
NULL )
3706 if( binvars !=
NULL )
3707 (*binvars) = consdata->binvars;
3709 (*nbinvars) = consdata->nbinvars;
3734 return consdata->nbinvars;
3758 return consdata->vals;
3783 if( binvars !=
NULL )
3784 *binvars = consdata->binvars;
3786 *vals = consdata->vals;
static SCIP_RETCODE aggregateVariables(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, int *nfixedvars, int *naggrvars)
Constraint handler for linear constraints in their most general form, .
static SCIP_RETCODE consdataLinearize(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata)
static SCIP_RETCODE consdataPrint(SCIP *scip, SCIP_CONSDATA *consdata, FILE *file)
#define CONSHDLR_NEEDSCONS
#define CONSHDLR_SEPAFREQ
static SCIP_RETCODE analyzeConflict(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *linkvar, SCIP_VAR *binvar, SCIP_Bool lblinkvar, SCIP_Bool ublinkvar)
static SCIP_RETCODE enforcePseudo(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, SCIP_Bool *infeasible, int *nchgbds, SCIP_Bool *solvelp)
#define CONSHDLR_CHECKPRIORITY
static SCIP_RETCODE addCuts(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff)
static SCIP_RETCODE catchAllEvents(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr)
static SCIP_RETCODE consFixLinkvar(SCIP *scip, SCIP_CONS *cons, int pos, SCIP_Bool *cutoff)
static SCIP_RETCODE dropEvent(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, int pos)
static SCIP_RETCODE dropAllEvents(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr)
static SCIP_RETCODE removeFixedBinvars(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_CONS *cons)
#define CONSHDLR_PROP_TIMING
static void conshdlrdataFree(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata)
static SCIP_RETCODE processBinvarFixings(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, int *nchgbds, SCIP_Bool *addcut, SCIP_Bool *mustcheck)
static void * getHashmapKey(SCIP_VAR *var)
#define CONSHDLR_MAXPREROUNDS
static SCIP_RETCODE lockRounding(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **binvars, int nbinvars)
static SCIP_Bool checkCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol)
#define CONSHDLR_SEPAPRIORITY
#define DEFAULT_LINEARIZE
static SCIP_RETCODE catchEvent(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, int pos)
static SCIP_RETCODE processRealBoundChg(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *cutoff, int *nchgbds, SCIP_Bool *mustcheck)
static SCIP_RETCODE consdataCreate(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_CONSDATA **consdata, SCIP_VAR *linkvar, SCIP_VAR **binvars, SCIP_Real *vals, int nbinvars)
static SCIP_RETCODE consdataCreateBinvars(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_EVENTHDLR *eventhdlr, SCIP_Bool linearize)
static SCIP_RETCODE tightenedLinkvar(SCIP *scip, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_Bool *cutoff, int *nchgbds)
#define CONSHDLR_PROPFREQ
static SCIP_RETCODE createRows(SCIP *scip, SCIP_CONS *cons)
#define CONSHDLR_PRESOLTIMING
static SCIP_RETCODE delCoefPos(SCIP *scip, SCIP_EVENTHDLR *eventhdlr, SCIP_CONS *cons, int pos)
static SCIP_RETCODE enforceConstraint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int nusefulconss, SCIP_SOL *sol, SCIP_RESULT *result)
static SCIP_RETCODE consdataFree(SCIP *scip, SCIP_CONSDATA **consdata)
static void consdataSort(SCIP_CONSDATA *consdata)
static SCIP_RETCODE addNlrow(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE separateCons(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool *cutoff, SCIP_Bool *separated, int *nchgbds)
#define CONSHDLR_EAGERFREQ
static SCIP_RETCODE conshdlrdataCreate(SCIP *scip, SCIP_CONSHDLRDATA **conshdlrdata, SCIP_EVENTHDLR *eventhdlr)
#define CONSHDLR_ENFOPRIORITY
#define CONSHDLR_DELAYSEPA
#define HASHSIZE_BINVARSCONS
#define CONSHDLR_DELAYPROP
constraint handler for linking binary variables to a linking (continuous or integer) variable
Constraint handler for the set partitioning / packing / covering constraints .
int SCIPgetNBinvarsLinking(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPgetBinvarsLinking(SCIP *scip, SCIP_CONS *cons, SCIP_VAR ***binvars, int *nbinvars)
SCIP_Bool SCIPexistsConsLinking(SCIP *scip, SCIP_VAR *linkvar)
SCIP_VAR * SCIPgetLinkvarLinking(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPaddCoefLinear(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *var, SCIP_Real val)
SCIP_CONS * SCIPgetConsLinking(SCIP *scip, SCIP_VAR *linkvar)
SCIP_RETCODE SCIPcreateConsLinking(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *linkvar, SCIP_VAR **binvars, SCIP_Real *vals, int nbinvars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPcreateConsLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPcreateConsSetpart(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPcreateConsBasicLinking(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *linkvar, SCIP_VAR **binvars, SCIP_Real *vals, int nbinvars)
SCIP_Real * SCIPgetValsLinking(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPgetBinvarsDataLinking(SCIP_CONS *cons, SCIP_VAR ***binvars, SCIP_Real **vals, int *nbinvars)
SCIP_RETCODE SCIPincludeConshdlrLinking(SCIP *scip)
SCIP_RETCODE SCIPgetVarCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_VAR *sourcevar, SCIP_VAR **targetvar, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, SCIP_Bool *success)
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapRemove(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPdelConsLocal(SCIP *scip, SCIP_CONS *cons)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
SCIP_Real SCIPrelDiff(SCIP_Real val1, SCIP_Real val2)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
SCIP_RETCODE SCIPaddConflictUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
SCIP_RETCODE SCIPaddConflictBinvar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrActive(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
SCIP_RETCODE SCIPsetConshdlrEnable(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrInitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrSepa(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), int sepafreq, int sepapriority, SCIP_Bool delaysepa)
SCIP_RETCODE SCIPsetConshdlrProp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING proptiming)
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
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)
SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetVars(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)),)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrInitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrDeactive(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrExitsol(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrInitlp(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_RETCODE SCIPenableCons(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateCons(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_CONSHDLR *conshdlr, SCIP_CONSDATA *consdata, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsEnabled(SCIP_CONS *cons)
SCIP_RETCODE SCIPdisableCons(SCIP *scip, SCIP_CONS *cons)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPresetConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsAdded(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_RETCODE SCIPincConsAge(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_RETCODE SCIPcatchVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_RETCODE SCIPdropVarEvent(SCIP *scip, SCIP_VAR *var, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_Bool SCIPhasCurrentNodeLP(SCIP *scip)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPreallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBufferArrayNull(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
SCIP_RETCODE SCIPdelNlRow(SCIP *scip, SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPaddNlRow(SCIP *scip, SCIP_NLROW *nlrow)
SCIP_Bool SCIPisNLPConstructed(SCIP *scip)
SCIP_RETCODE SCIPaddLinearCoefToNlRow(SCIP *scip, SCIP_NLROW *nlrow, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPreleaseNlRow(SCIP *scip, SCIP_NLROW **nlrow)
SCIP_Bool SCIPnlrowIsInNLP(SCIP_NLROW *nlrow)
SCIP_RETCODE SCIPcreateNlRow(SCIP *scip, SCIP_NLROW **nlrow, const char *name, SCIP_Real constant, int nlinvars, SCIP_VAR **linvars, SCIP_Real *lincoefs, SCIP_EXPR *expr, SCIP_Real lhs, SCIP_Real rhs, SCIP_EXPRCURV curvature)
SCIP_Bool SCIPinProbing(SCIP *scip)
SCIP_RETCODE SCIPaddVarsToRowSameCoef(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real val)
SCIP_RETCODE SCIPcreateEmptyRowCons(SCIP *scip, SCIP_ROW **row, SCIP_CONS *cons, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_Real SCIPgetRowLPFeasibility(SCIP *scip, SCIP_ROW *row)
SCIP_Bool SCIProwIsInLP(SCIP_ROW *row)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
void SCIPupdateSolLPConsViolation(SCIP *scip, SCIP_SOL *sol, SCIP_Real absviol, SCIP_Real relviol)
SCIP_Bool SCIPisFeasGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeastol(SCIP *scip)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
int SCIPconvertRealToInt(SCIP *scip, SCIP_Real real)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPinRepropagation(SCIP *scip)
int SCIPgetDepth(SCIP *scip)
SCIP_RETCODE SCIPlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_RETCODE SCIPaddClique(SCIP *scip, SCIP_VAR **vars, SCIP_Bool *values, int nvars, SCIP_Bool isequation, SCIP_Bool *infeasible, int *nbdchgs)
SCIP_RETCODE SCIPgetTransformedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_Real SCIPvarGetAggrConstant(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)
SCIP_RETCODE SCIPaggregateVars(SCIP *scip, SCIP_VAR *varx, SCIP_VAR *vary, SCIP_Real scalarx, SCIP_Real scalary, SCIP_Real rhs, SCIP_Bool *infeasible, SCIP_Bool *redundant, SCIP_Bool *aggregated)
SCIP_RETCODE SCIPinferVarUbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_Real SCIPvarGetAggrScalar(SCIP_VAR *var)
SCIP_VAR * SCIPvarGetProbvar(SCIP_VAR *var)
SCIP_RETCODE SCIPparseVarName(SCIP *scip, const char *str, SCIP_VAR **var, char **endptr)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
int SCIPvarGetIndex(SCIP_VAR *var)
SCIP_RETCODE SCIPaddVarLocksType(SCIP *scip, SCIP_VAR *var, SCIP_LOCKTYPE locktype, int nlocksdown, int nlocksup)
SCIP_RETCODE SCIPunlockVarCons(SCIP *scip, SCIP_VAR *var, SCIP_CONS *cons, SCIP_Bool lockdown, SCIP_Bool lockup)
SCIP_Real SCIPgetVarUbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_RETCODE SCIPparseVarsLinearsum(SCIP *scip, const char *str, SCIP_VAR **vars, SCIP_Real *vals, int *nvars, int varssize, int *requiredsize, char **endptr, SCIP_Bool *success)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPcreateVar(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype, SCIP_Bool initial, SCIP_Bool removable, SCIP_DECL_VARDELORIG((*vardelorig)), SCIP_DECL_VARTRANS((*vartrans)), SCIP_DECL_VARDELTRANS((*vardeltrans)), SCIP_DECL_VARCOPY((*varcopy)), SCIP_VARDATA *vardata)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
SCIP_RETCODE SCIPinferVarLbCons(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_CONS *infercons, int inferinfo, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_Real SCIPgetVarLbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
SCIP_RETCODE SCIPinferBinvarCons(SCIP *scip, SCIP_VAR *var, SCIP_Bool fixedval, SCIP_CONS *infercons, int inferinfo, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_RETCODE SCIPwriteVarName(SCIP *scip, FILE *file, SCIP_VAR *var, SCIP_Bool type)
SCIP_RETCODE SCIPwriteVarsLinearsum(SCIP *scip, FILE *file, SCIP_VAR **vars, SCIP_Real *vals, int nvars, SCIP_Bool type)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
SCIP_VAR * SCIPvarGetAggrVar(SCIP_VAR *var)
void SCIPsortRealPtr(SCIP_Real *realarray, void **ptrarray, int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_RETCODE SCIPskipSpace(char **s)
assert(minobj< SCIPgetCutoffbound(scip))
static SCIP_Bool propagate
memory allocation routines
#define BMScopyMemoryArray(ptr, source, num)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
public methods for managing constraints
public methods for managing events
public methods for LP management
public methods for message output
public data structures and miscellaneous methods
methods for sorting joint arrays of various types
public methods for problem variables
public methods for conflict handler plugins and conflict analysis
public methods for constraint handler plugins and constraints
public methods for problem copies
public methods for cuts and aggregation rows
public methods for event handler plugins and event handlers
public methods for the LP relaxation, rows and columns
public methods for memory management
public methods for message handling
public methods for nonlinear relaxation
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for the probing mode
public methods for solutions
public methods for the branch-and-bound tree
public methods for SCIP variables
@ SCIP_CONFTYPE_PROPAGATION
#define SCIP_DECL_CONSENFOLP(x)
#define SCIP_DECL_CONSINITPRE(x)
#define SCIP_DECL_CONSDELETE(x)
#define SCIP_DECL_CONSGETVARS(x)
#define SCIP_DECL_CONSINITSOL(x)
#define SCIP_DECL_CONSPRINT(x)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
#define SCIP_DECL_CONSSEPALP(x)
#define SCIP_DECL_CONSENFORELAX(x)
#define SCIP_DECL_CONSPROP(x)
#define SCIP_DECL_CONSGETNVARS(x)
#define SCIP_DECL_CONSRESPROP(x)
#define SCIP_DECL_CONSACTIVE(x)
#define SCIP_DECL_CONSENFOPS(x)
#define SCIP_DECL_CONSPARSE(x)
#define SCIP_DECL_CONSTRANS(x)
#define SCIP_DECL_CONSDEACTIVE(x)
#define SCIP_DECL_CONSPRESOL(x)
#define SCIP_DECL_CONSENABLE(x)
#define SCIP_DECL_CONSINITLP(x)
#define SCIP_DECL_CONSLOCK(x)
#define SCIP_DECL_CONSCOPY(x)
struct SCIP_ConsData SCIP_CONSDATA
#define SCIP_DECL_CONSCHECK(x)
#define SCIP_DECL_CONSHDLRCOPY(x)
#define SCIP_DECL_CONSEXITSOL(x)
#define SCIP_DECL_CONSFREE(x)
#define SCIP_DECL_CONSSEPASOL(x)
#define SCIP_EVENTTYPE_BOUNDCHANGED
struct SCIP_EventData SCIP_EVENTDATA
#define SCIP_EVENTTYPE_UBTIGHTENED
#define SCIP_DECL_EVENTEXEC(x)
#define SCIP_EVENTTYPE_LBRELAXED
#define SCIP_EVENTTYPE_LBTIGHTENED
#define SCIP_EVENTTYPE_UBRELAXED
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_STAGE_TRANSFORMING
@ SCIP_VARTYPE_CONTINUOUS
@ SCIP_VARSTATUS_MULTAGGR
@ SCIP_VARSTATUS_AGGREGATED