86#define CONSHDLR_NAME "symresack"
87#define CONSHDLR_DESC "symmetry breaking constraint handler relying on symresacks"
88#define CONSHDLR_SEPAPRIORITY +40100
89#define CONSHDLR_ENFOPRIORITY -1005200
90#define CONSHDLR_CHECKPRIORITY -1005200
91#define CONSHDLR_SEPAFREQ 5
92#define CONSHDLR_PROPFREQ 5
93#define CONSHDLR_EAGERFREQ -1
95#define CONSHDLR_MAXPREROUNDS -1
96#define CONSHDLR_DELAYSEPA FALSE
97#define CONSHDLR_DELAYPROP FALSE
98#define CONSHDLR_NEEDSCONS TRUE
100#define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP
101#define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_EXHAUSTIVE
103#define DEFAULT_PPSYMRESACK TRUE
104#define DEFAULT_CHECKMONOTONICITY TRUE
105#define DEFAULT_FORCECONSCOPY FALSE
114#define ISFIXED(scip, x, bdchgidx) (SCIPgetVarUbAtIndex(scip, x, bdchgidx, FALSE) - SCIPgetVarLbAtIndex(scip, x, bdchgidx, FALSE) < 0.5)
123struct SCIP_ConshdlrData
147 int** cycledecomposition;
170 nvars = (*consdata)->nvars;
177 assert( (*consdata)->ncycles == 0 );
178 assert( (*consdata)->cycledecomposition ==
NULL );
185 if ( (*consdata)->ndescentpoints > 0 )
192 if ( (*consdata)->ppupgrade )
194 for (
i = 0;
i < (*consdata)->ncycles; ++
i)
234 int** cycledecomposition;
243 int ndescentpoints = 0;
280 else if ( checkmonotonicity )
291 assert( checkmonotonicity );
328 descentpoints[
c++] = j;
331 cycledecomposition[curcycle][++cyclelength] = j;
336 cycledecomposition[curcycle][0] = cyclelength;
339 if ( maxcyclelength < cyclelength )
340 maxcyclelength = cyclelength;
346 if ( setppcconshdlr ==
NULL )
361 for (
i = 0;
i <
ncycles && *upgrade && ! terminated; ++
i)
366 for (j = 0; j < cycledecomposition[
i][0]; ++ j)
368 var =
vars[cycledecomposition[
i][j + 1]];
379 cyclelength = cycledecomposition[
i][0];
385 for (
c = 0;
c < nsetppcconss; ++
c)
402 if ( nsetppcvars == 0 )
404 assert( nsetppcvars > 0 );
410 for (j = 0; j < nsetppcvars && nfound < cyclelength; ++j)
419 for (k = 0; k < cyclelength; ++k)
421 if (
varidx == indicesincycle[k] )
428 assert( nfound <= cyclelength );
430 if ( nfound == cyclelength )
435 if (
c >= nsetppcconss )
441 (*consdata)->ncycles =
ncycles;
442 (*consdata)->cycledecomposition = cycledecomposition;
443 (*consdata)->ndescentpoints = ndescentpoints;
444 (*consdata)->descentpoints = descentpoints;
485 int* indexcorrection;
488 int naffectedvariables;
500 (*consdata)->debugcnt = 0;
503 (*consdata)->ndescentpoints = 0;
504 (*consdata)->descentpoints =
NULL;
505 (*consdata)->ismodelcons = ismodelcons;
509 indexcorrection[0] = -1;
510 for (
i = 0;
i < inputnvars; ++
i)
515 indexcorrection[
i] = 0;
517 indexcorrection[
i] = indexcorrection[
i - 1] + 1;
522 indexcorrection[
i] = indexcorrection[
i - 1];
525 naffectedvariables = indexcorrection[inputnvars - 1] + 1;
527 (*consdata)->nvars = naffectedvariables;
530 if ( naffectedvariables == 0 )
534 (*consdata)->vars =
NULL;
535 (*consdata)->perm =
NULL;
536 (*consdata)->invperm =
NULL;
537 (*consdata)->ppupgrade =
FALSE;
538 (*consdata)->ncycles = 0;
539 (*consdata)->cycledecomposition =
NULL;
546 for (
i = 0;
i < inputnvars; ++
i)
550 if ( indexcorrection[
i] > -1 )
552 vars[j] = inputvars[
i];
553 perm[j++] = indexcorrection[inputperm[
i]];
558 if ( indexcorrection[
i] > indexcorrection[
i - 1] )
560 vars[j] = inputvars[
i];
561 perm[j++] = indexcorrection[inputperm[
i]];
567 (*consdata)->vars =
vars;
568 (*consdata)->perm = perm;
571 for (
i = 0;
i < naffectedvariables; ++
i)
574 invperm[perm[
i]] =
i;
576 (*consdata)->invperm = invperm;
581 if ( conshdlrdata->checkppsymresack )
586 (*consdata)->ppupgrade = upgrade;
593 for (
i = 0;
i < naffectedvariables; ++
i)
641 nvars = consdata->nvars;
648 vars = consdata->vars;
651 assert( consdata->invperm[0] != 0 );
668 if ( consdata->ppupgrade && ! *infeasible )
670 if ( checkmonotonicity )
674 int** cycledecomposition;
678 int firstelemincycle;
681 cycledecomposition = consdata->cycledecomposition;
691 assert( cycledecomposition[
i][0] > 0 );
693 nvarsincycle = cycledecomposition[
i][0];
694 varsincons[0] =
vars[cycledecomposition[
i][nvarsincycle]];
695 firstelemincycle = cycledecomposition[
i][1];
697 assert( firstelemincycle == consdata->perm[cycledecomposition[
i][nvarsincycle]] );
702 for (j = 0; j <
i; ++j)
704 nvarsincycle = cycledecomposition[j][0];
705 for (k = 1; k <= nvarsincycle; ++k)
707 if ( cycledecomposition[j][k] < firstelemincycle )
709 varsincons[nvarsincons] =
vars[cycledecomposition[j][k]];
710 coeffs[nvarsincons++] = -1.0;
739 int* imgdescentpoints;
744 int newlastascent = 0;
747 descentpoints = consdata->descentpoints;
748 ndescentpoints = consdata->ndescentpoints;
749 perm = consdata->perm;
752 assert( ndescentpoints > 0 );
760 for (j = 0; j < ndescentpoints; ++j)
761 imgdescentpoints[j] = perm[descentpoints[j]];
772 for (j = 0; j < ndescentpoints; ++j)
774 varsincons[0] =
vars[descentpoints[j]];
775 for (
i = lastascent;
i < imgdescentpoints[j]; ++
i)
779 coeffs[nvarsincons] = -1.0;
780 varsincons[nvarsincons++] =
vars[
i];
784 lastascent = newlastascent;
826 int numfixentriesinit,
851 numfixentries = numfixentriesinit;
862 var2 =
vars[invperm[
i]];
868 var1fix = tempfixings[
i];
884 var2fix = tempfixings[invperm[
i]];
906 *infeasibleentry =
i;
912 tempfixings[invperm[
i]] =
FIXED0;
914 tempfixentries[numfixentries++] = invperm[
i];
921 tempfixentries[numfixentries++] =
i;
927 for (
i = numfixentriesinit;
i < numfixentries; ++
i)
929 tempfixings[tempfixentries[
i]] =
NOINIT;
930 tempfixentries[
i] = 0;
958 int peekinfeasibleentry;
975 nvars = consdata->nvars;
983 vars = consdata->vars;
984 invperm = consdata->invperm;
994 var2 =
vars[invperm[
i]];
1027 SCIPdebugMsg(
scip,
" -> node is feasible (could set pair to (1,0) and every earlier pair is constant).\n");
1040 SCIPdebugMsg(
scip,
" -> First entry is not fixed. Check if 0 is feasible.\n");
1042 tempfixentries[0] =
i;
1044 &peekinfeasible, &peekinfeasibleentry) );
1046 if ( peekinfeasible )
1049 SCIPdebugMsg(
scip,
" -> First entry is not fixed. 0 is not feasible. Fixing to 1.\n");
1051 FALSE, infeasible, &tightened) );
1059 tempfixentries[0] = 0;
1067 SCIPdebugMsg(
scip,
" -> Second entry is not fixed. Check if 1 is feasible.\n");
1068 tempfixings[invperm[
i]] =
FIXED1;
1069 tempfixentries[0] = invperm[
i];
1071 &peekinfeasible, &peekinfeasibleentry) );
1073 if ( peekinfeasible )
1076 SCIPdebugMsg(
scip,
" -> Second entry is not fixed. 1 is not feasible. Fixing to 0.\n");
1078 FALSE, infeasible, &tightened) );
1085 tempfixings[invperm[
i]] =
NOINIT;
1086 tempfixentries[0] = 0;
1101 SCIPdebugMsg(
scip,
" -> node infeasible (pair was fixed to (0,1) but there was no pair of type (1,0) before) ---> lexicographical order violated, infeasible.\n");
1108 for (
r = 0;
r <=
i; ++
r)
1188 *infeasible =
FALSE;
1194 ++consdata->debugcnt;
1202 if ( coeffs[
i] == 1 || coeffs[
i] == -1 )
1264 componentends[
i] =
i;
1265 componentobj[
i] = objective[
i];
1267 helperobj += objective[
i];
1271 for (crit = 0; crit <
nvars; ++crit)
1273 critinv = invperm[crit];
1276 assert( crit != critinv );
1279 if ( componentends[crit] == critinv )
1285 tmpobj += componentobj[crit];
1287 tmpobj -= componentobj[critinv];
1290 *maxsoluval = tmpobj;
1295 tmpnewcompobj = componentobj[crit] + componentobj[critinv];
1297 helperobj -= componentobj[crit];
1299 helperobj -= componentobj[critinv];
1301 helperobj += tmpnewcompobj;
1304 componentobj[componentends[crit]] = tmpnewcompobj;
1305 componentobj[componentends[critinv]] = tmpnewcompobj;
1308 if ( componentends[crit] == crit )
1310 componentends[crit] = componentends[critinv];
1311 componentends[componentends[critinv]] = crit;
1315 componentends[componentends[crit]] = componentends[critinv];
1316 componentends[componentends[critinv]] = componentends[crit];
1351 int* entrycomponent;
1372 entrycomponent[
i] =
i;
1373 componentobjective[
i] = objective[
i];
1375 for (
i = 0;
i < crit; ++
i)
1381 if ( entrycomponent[
i] <
i )
1395 if ( entrycomponent[
c] !=
c )
1398 entrycomponent[
c] =
i;
1399 componentobjective[
i] += objective[
c];
1409 if ( entrycomponent[
c] !=
c )
1412 entrycomponent[
c] =
i;
1413 componentobjective[
i] += objective[
c];
1427 if ( entrycomponent[
i] == entrycomponent[crit] )
1429 else if ( entrycomponent[
i] == entrycomponent[invperm[crit]] )
1431 else if (
SCIPisGT(
scip, componentobjective[entrycomponent[
i]], 0.0) )
1468 *infeasible =
FALSE;
1475 if ( consdata->nvars < 2 )
1484 nvars = consdata->nvars;
1485 perm = consdata->perm;
1486 invperm = consdata->invperm;
1491 constobjective = 1.0;
1495 sepaobjective[
i] = - vals[
i];
1498 sepaobjective[
i] = 1.0 - vals[
i];
1499 constobjective += vals[
i] - 1.0;
1509 SCIPdebugMsg(
scip,
"Critical row %d found; Computing maximally violated cover.\n", maxcrit);
1513 maxsoluobj += constobjective;
1523 maxsolu[
i] = -maxsolu[
i];
1526 if ( maxsolu[
i] == 0 )
1528 maxsolu[
i] = 1 - maxsolu[
i];
1535 if ( ! *infeasible )
1567 if ( consdata->nvars < 2 )
1575 nvars = consdata->nvars;
1576 vars = consdata->vars;
1577 invperm = consdata->invperm;
1608 else if ( val1 > val2 )
1678 if ( conshdlr ==
NULL )
1681 SCIPdebugMsg(
scip,
"Cannot check whether symresack constraint can be upgraded to orbisack constraint. ");
1697 if ( perm[perm[
i]] !=
i )
1705 vars1[nrows] = inputvars[
i];
1706 vars2[nrows++] = inputvars[perm[
i]];
1715 else if ( *upgrade )
1718 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
1775 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
1780 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
1807 nvars = consdata->nvars;
1808 vars = consdata->vars;
1823 if ( consdata->perm[
i] >
i )
1834 if ( consdata->perm[
i] >
i )
1931 assert( sourcedata->nvars == 0 || sourcedata->vars !=
NULL );
1932 assert( sourcedata->nvars == 0 || sourcedata->perm !=
NULL );
1933 assert( sourcedata->nvars == 0 || sourcedata->invperm !=
NULL );
1935 if ( sourcedata->ppupgrade )
1937 assert( sourcedata->nvars > 0 );
1938 assert( sourcedata->ncycles != 0 );
1939 assert( sourcedata->cycledecomposition !=
NULL );
1940 for (
i = 0;
i < sourcedata->ncycles; ++
i)
1942 assert( sourcedata->cycledecomposition[
i] !=
NULL );
1943 assert( sourcedata->cycledecomposition[
i][0] != 0 );
1952 nvars = sourcedata->nvars;
1956 consdata->vars =
NULL;
1957 consdata->nvars =
nvars;
1958 consdata->perm =
NULL;
1959 consdata->invperm =
NULL;
1960 consdata->ppupgrade = sourcedata->ppupgrade;
1961 consdata->ismodelcons = sourcedata->ismodelcons;
1963 consdata->debugcnt = 0;
1965 consdata->ncycles = 0;
1966 consdata->cycledecomposition =
NULL;
1967 consdata->ndescentpoints = 0;
1968 consdata->descentpoints =
NULL;
1982 if ( sourcedata->ppupgrade )
1984 consdata->ncycles = sourcedata->ncycles;
1986 for (
i = 0;
i < sourcedata->ncycles; ++
i)
1991 consdata->ndescentpoints = sourcedata->ndescentpoints;
2001 for (
i = 0;
i < sourcedata->nvars; ++
i)
2028 *infeasible =
FALSE;
2039 for (
c = 0;
c < nconss; ++
c)
2071 conshdlrdata->maxnvars = 0;
2074 for (
c = 0;
c < nconss; ++
c)
2084 if ( consdata->nvars > conshdlrdata->maxnvars )
2085 conshdlrdata->maxnvars = consdata->nvars;
2122 maxnvars = conshdlrdata->maxnvars;
2128 for (
c = 0;
c < nconss; ++
c)
2139 if ( consdata->nvars == 0 )
2143 assert( consdata->nvars <= maxnvars );
2193 maxnvars = conshdlrdata->maxnvars;
2199 for (
c = 0;
c < nconss; ++
c)
2210 if ( consdata->nvars == 0 )
2214 assert( consdata->nvars <= maxnvars );
2256 SCIPdebugMsg(
scip,
"Enforcing method for symresack constraints (lp solutions) ...\n");
2272 maxnvars = conshdlrdata->maxnvars;
2278 for (
c = 0;
c < nconss; ++
c)
2291 if ( !consdata->ismodelcons )
2294 if ( consdata->nvars == 0 )
2298 assert( consdata->nvars <= maxnvars );
2335 SCIPdebugMsg(
scip,
"Enforcing method for symresack constraints (pseudo solutions) ...\n");
2339 if ( objinfeasible || solinfeasible )
2343 for (
c = 0;
c < nconss; ++
c)
2349 if ( !consdata->ismodelcons )
2379 SCIPdebugMsg(
scip,
"Enforcing method for symresack constraints (relaxation solutions) ...\n");
2395 maxnvars = conshdlrdata->maxnvars;
2401 for (
c = 0;
c < nconss; ++
c)
2414 if ( !consdata->ismodelcons )
2417 if ( consdata->nvars == 0 )
2421 assert( consdata->nvars <= maxnvars );
2459 for (
c = 0;
c < nconss; ++
c)
2465 if ( !consdata->ismodelcons )
2496 SCIPdebugMsg(
scip,
"Propagation method of symresack constraint handler.\n");
2499 for (
c = 0;
c < nconss; ++
c)
2514 success = success || ( ngen > 0 );
2543 oldndelconss = *ndelconss;
2545 SCIPdebugMsg(
scip,
"Presolving method of symresack constraint handler. Propagating symresack inequalities.\n");
2549 for (
c = 0;
c < nconss; ++
c)
2561 if ( consdata->nvars == 0 )
2579 *nfixedvars += ngen;
2586 if ( *ndelconss > oldndelconss || success )
2615 SCIPdebugMsg(
scip,
"Propagation resolution method of symresack constraint handler.\n");
2623 if ( consdata->nvars < 2 )
2629 vars = consdata->vars;
2630 nvars = consdata->nvars;
2631 perm = consdata->perm;
2632 invperm = consdata->invperm;
2637 varrow = inferinfo %
nvars;
2638 infrow = inferinfo /
nvars;
2644 assert(
vars[varrow] == infervar ||
vars[invperm[varrow]] == infervar );
2647 for (
i = 0;
i < varrow; ++
i)
2672 if ( invperm[
i] >
i )
2690 for (
i = varrow + 1;
i <= infrow; ++
i)
2707 if ( ( invperm[
i] >
i || invperm[
i] == varrow ) &&
ISFIXED(
scip,
vars[invperm[
i]], bdchgidx) )
2726 if ( invperm[varrow] > varrow )
2738 if ( varrow < perm[varrow] )
2763 for (
c = 0;
c < nconss; ++
c)
2806 if ( consdata->nvars < 2 )
2812 nvars = consdata->nvars;
2813 vars = consdata->vars;
2814 perm = consdata->perm;
2864 assert( sourcedata->nvars > 0 );
2870 if ( !sourcedata->ismodelcons && !conshdlrdata->forceconscopy )
2877 sourcevars = sourcedata->vars;
2878 nvars = sourcedata->nvars;
2896 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
2917 int nfoundpermidx = 0;
2928 if( strncmp(s,
"symresack(", 10) != 0 )
2930 SCIPerrorMessage(
"Syntax error - expected \"symresack(\", but got '%s'", s);
2978 endptr = strchr(endptr,
']');
2980 if( endptr ==
NULL )
2995 if(
nvars > maxnvars )
3033 if( nfoundpermidx >
nvars )
3040 perm[nfoundpermidx-1] = val;
3051 if( nfoundpermidx !=
nvars )
3053 SCIPerrorMessage(
"length of permutation is not equal to number of given variables.\n");
3067 if( *success && cnt < 2 )
3108 if ( consdata->nvars < 2 )
3114 vars = consdata->vars;
3115 nvars = consdata->nvars;
3116 perm = consdata->perm;
3148 if ( varssize < consdata->
nvars )
3155 for (
i = 0;
i < consdata->nvars; ++
i)
3156 vars[cnt++] = consdata->vars[
i];
3177 (*nvars) = consdata->nvars;
3197 consEnfolpSymresack, consEnfopsSymresack, consCheckSymresack, consLockSymresack,
3221 "Upgrade symresack constraints to packing/partioning symresacks?",
3226 "Check whether permutation is monotone when upgrading to packing/partioning symresacks?",
3230 "Whether symresack constraints should be forced to be copied to sub SCIPs.",
3289 if ( conshdlr ==
NULL )
3299 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial,
separate && (! consdata->ppupgrade), enforce, check,
propagate,
3300 local, modifiable, dynamic, removable, stickingatnode) );
#define CONSHDLR_NEEDSCONS
#define CONSHDLR_SEPAFREQ
#define CONSHDLR_CHECKPRIORITY
#define CONSHDLR_PROP_TIMING
#define CONSHDLR_MAXPREROUNDS
#define CONSHDLR_SEPAPRIORITY
#define CONSHDLR_PROPFREQ
#define CONSHDLR_PRESOLTIMING
#define CONSHDLR_EAGERFREQ
#define CONSHDLR_ENFOPRIORITY
#define CONSHDLR_DELAYSEPA
#define CONSHDLR_DELAYPROP
#define DEFAULT_FORCECONSCOPY
constraint handler for orbisack constraints
Constraint handler for the set partitioning / packing / covering constraints .
#define ISFIXED(scip, x, bdchgidx)
static SCIP_RETCODE replaceAggregatedVarsSymresack(SCIP *scip, SCIP_CONS *cons)
#define DEFAULT_CHECKMONOTONICITY
static SCIP_RETCODE consdataCreate(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONSDATA **consdata, SCIP_VAR *const *inputvars, int inputnvars, int *inputperm, SCIP_Bool ismodelcons)
static SCIP_RETCODE propVariables(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *infeasible, int *ngen)
static SCIP_RETCODE initLP(SCIP *scip, SCIP_CONS *cons, SCIP_Bool checkmonotonicity, SCIP_Bool *infeasible)
static SCIP_RETCODE checkSymresackSolution(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_RESULT *result, SCIP_Bool printreason)
static SCIP_RETCODE checkFeasible(SCIP *scip, SCIP_VAR **vars, int *invperm, int nvars, int start, int *tempfixings, int *tempfixentries, int numfixentriesinit, SCIP_Bool *infeasible, int *infeasibleentry)
static SCIP_RETCODE maximizeObjectiveSymresackCriticalEntry(SCIP *scip, int nvars, SCIP_Real *objective, int *perm, int *invperm, int crit, int *maxsolu)
static SCIP_RETCODE separateSymresackCovers(SCIP *scip, SCIP_CONS *cons, const SCIP_CONSDATA *consdata, SCIP_Real *vals, int *ngen, SCIP_Bool *infeasible)
static SCIP_RETCODE addSymresackInequality(SCIP *scip, SCIP_CONS *cons, int nvars, SCIP_VAR **vars, int *coeffs, SCIP_Real rhs, SCIP_Bool *infeasible)
static SCIP_RETCODE packingUpgrade(SCIP *scip, SCIP_CONSDATA **consdata, int *perm, SCIP_VAR **vars, int nvars, SCIP_Bool checkmonotonicity, SCIP_Bool *upgrade)
static SCIP_RETCODE consdataFree(SCIP *scip, SCIP_CONSDATA **consdata)
#define DEFAULT_PPSYMRESACK
static SCIP_RETCODE maximizeObjectiveSymresackStrict(SCIP *scip, int nvars, SCIP_Real *objective, int *perm, int *invperm, int *maxcrit, SCIP_Real *maxsoluval)
static SCIP_RETCODE orbisackUpgrade(SCIP *scip, SCIP_CONS **cons, const char *name, int *perm, SCIP_VAR **inputvars, int nvars, SCIP_Bool *upgrade, SCIP_Bool ismodelcons, 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)
constraint handler for symresack constraints
#define SCIP_DEFAULT_INFINITY
#define SCIP_STRINGEQ(name, reference, retcode)
SCIP_RETCODE SCIPcreateSymbreakCons(SCIP *scip, SCIP_CONS **cons, const char *name, int *perm, SCIP_VAR **vars, int nvars, SCIP_Bool ismodelcons, 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)
int SCIPgetNVarsSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR ** SCIPgetVarsSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_SETPPCTYPE SCIPgetTypeSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsOrbisack(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR *const *vars1, SCIP_VAR *const *vars2, int nrows, SCIP_Bool ispporbisack, SCIP_Bool isparttype, SCIP_Bool ismodelcons, 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 SCIPcreateConsBasicSymresack(SCIP *scip, SCIP_CONS **cons, const char *name, int *perm, SCIP_VAR **vars, int nvars, SCIP_Bool ismodelcons)
SCIP_RETCODE SCIPcreateConsSymresack(SCIP *scip, SCIP_CONS **cons, const char *name, int *perm, SCIP_VAR **vars, int nvars, SCIP_Bool ismodelcons, 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_SETPPCTYPE_PARTITIONING
@ SCIP_SETPPCTYPE_COVERING
@ SCIP_SETPPCTYPE_PACKING
SCIP_RETCODE SCIPincludeConshdlrSymresack(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_RETCODE SCIPdelCons(SCIP *scip, SCIP_CONS *cons)
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
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)
int SCIPgetNLPBranchCands(SCIP *scip)
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 SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
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,)
int SCIPconshdlrGetNConss(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_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_RETCODE SCIPsetConshdlrExitpre(SCIP *scip, SCIP_CONSHDLR *conshdlr,)
SCIP_CONS ** SCIPconshdlrGetConss(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_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsEnforced(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)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
SCIP_Bool SCIPisEfficacious(SCIP *scip, SCIP_Real efficacy)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
#define SCIPfreeCleanBufferArray(scip, ptr)
#define SCIPallocCleanBufferArray(scip, ptr, num)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
#define SCIPallocClearBufferArray(scip, ptr, num)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPreallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPfreeBufferArrayNull(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
SCIP_RETCODE SCIPcacheRowExtensions(SCIP *scip, SCIP_ROW *row)
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 SCIPflushRowExtensions(SCIP *scip, SCIP_ROW *row)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_RETCODE SCIPaddVarsToRow(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
SCIP_RETCODE SCIPgetSolVals(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
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 SCIPgetTransformedVars(SCIP *scip, int nvars, SCIP_VAR **vars, SCIP_VAR **transvars)
SCIP_VARSTATUS SCIPvarGetStatus(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
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_RETCODE SCIPparseVarName(SCIP *scip, const char *str, SCIP_VAR **var, char **endptr)
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)
int SCIPvarGetProbindex(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsNegated(SCIP_VAR *var)
SCIP_RETCODE SCIPmarkDoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
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 SCIPwriteVarName(SCIP *scip, FILE *file, SCIP_VAR *var, SCIP_Bool type)
SCIP_RETCODE SCIPgetBinvarRepresentative(SCIP *scip, SCIP_VAR *var, SCIP_VAR **repvar, SCIP_Bool *negated)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
void SCIPsortIntInt(int *intarray1, int *intarray2, int len)
SCIP_Bool SCIPstrToIntValue(const char *str, int *value, char **endptr)
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
public methods for managing constraints
public methods for message output
public data structures and miscellaneous methods
public methods for problem variables
public methods for branching rule plugins and branching
public methods for conflict handler plugins and conflict analysis
public methods for constraint handler plugins and constraints
public methods for cuts and aggregation rows
public methods for the LP relaxation, rows and columns
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for solutions
public methods for SCIP variables
static SCIP_RETCODE separate(SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, SCIP_RESULT *result)
Main separation function.
@ SCIP_CONFTYPE_PROPAGATION
#define SCIP_DECL_CONSENFOLP(x)
#define SCIP_DECL_CONSDELETE(x)
struct SCIP_Cons SCIP_CONS
#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_CONSENFOPS(x)
#define SCIP_DECL_CONSPARSE(x)
#define SCIP_DECL_CONSTRANS(x)
#define SCIP_DECL_CONSPRESOL(x)
#define SCIP_DECL_CONSINITLP(x)
#define SCIP_DECL_CONSEXITPRE(x)
#define SCIP_DECL_CONSLOCK(x)
struct SCIP_Conshdlr SCIP_CONSHDLR
#define SCIP_DECL_CONSCOPY(x)
struct SCIP_ConsData SCIP_CONSDATA
#define SCIP_DECL_CONSCHECK(x)
#define SCIP_DECL_CONSHDLRCOPY(x)
#define SCIP_DECL_CONSFREE(x)
#define SCIP_DECL_CONSSEPASOL(x)
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_VARSTATUS_MULTAGGR