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;
499 (*consdata)->debugcnt = 0;
502 (*consdata)->ndescentpoints = 0;
503 (*consdata)->descentpoints =
NULL;
504 (*consdata)->ismodelcons = ismodelcons;
508 indexcorrection[0] = -1;
509 for (
i = 0;
i < inputnvars; ++
i)
514 indexcorrection[
i] = 0;
516 indexcorrection[
i] = indexcorrection[
i - 1] + 1;
521 indexcorrection[
i] = indexcorrection[
i - 1];
524 naffectedvariables = indexcorrection[inputnvars - 1] + 1;
526 (*consdata)->nvars = naffectedvariables;
529 if ( naffectedvariables == 0 )
533 (*consdata)->vars =
NULL;
534 (*consdata)->perm =
NULL;
535 (*consdata)->invperm =
NULL;
536 (*consdata)->ppupgrade =
FALSE;
537 (*consdata)->ncycles = 0;
538 (*consdata)->cycledecomposition =
NULL;
545 for (
i = 0;
i < inputnvars; ++
i)
549 if ( indexcorrection[
i] > -1 )
551 vars[j] = inputvars[
i];
552 perm[j++] = indexcorrection[inputperm[
i]];
557 if ( indexcorrection[
i] > indexcorrection[
i - 1] )
559 vars[j] = inputvars[
i];
560 perm[j++] = indexcorrection[inputperm[
i]];
566 (*consdata)->vars =
vars;
567 (*consdata)->perm = perm;
570 for (
i = 0;
i < naffectedvariables; ++
i)
573 invperm[perm[
i]] =
i;
575 (*consdata)->invperm = invperm;
580 if ( conshdlrdata->checkppsymresack )
585 (*consdata)->ppupgrade = upgrade;
592 for (
i = 0;
i < naffectedvariables; ++
i)
640 nvars = consdata->nvars;
647 vars = consdata->vars;
650 assert( consdata->invperm[0] != 0 );
667 if ( consdata->ppupgrade && ! *infeasible )
669 if ( checkmonotonicity )
673 int** cycledecomposition;
677 int firstelemincycle;
680 cycledecomposition = consdata->cycledecomposition;
690 assert( cycledecomposition[
i][0] > 0 );
692 nvarsincycle = cycledecomposition[
i][0];
693 varsincons[0] =
vars[cycledecomposition[
i][nvarsincycle]];
694 firstelemincycle = cycledecomposition[
i][1];
696 assert( firstelemincycle == consdata->perm[cycledecomposition[
i][nvarsincycle]] );
701 for (j = 0; j <
i; ++j)
703 nvarsincycle = cycledecomposition[j][0];
704 for (k = 1; k <= nvarsincycle; ++k)
706 if ( cycledecomposition[j][k] < firstelemincycle )
708 varsincons[nvarsincons] =
vars[cycledecomposition[j][k]];
709 coeffs[nvarsincons++] = -1.0;
738 int* imgdescentpoints;
743 int newlastascent = 0;
746 descentpoints = consdata->descentpoints;
747 ndescentpoints = consdata->ndescentpoints;
748 perm = consdata->perm;
751 assert( ndescentpoints > 0 );
759 for (j = 0; j < ndescentpoints; ++j)
760 imgdescentpoints[j] = perm[descentpoints[j]];
771 for (j = 0; j < ndescentpoints; ++j)
773 varsincons[0] =
vars[descentpoints[j]];
774 for (
i = lastascent;
i < imgdescentpoints[j]; ++
i)
778 coeffs[nvarsincons] = -1.0;
779 varsincons[nvarsincons++] =
vars[
i];
783 lastascent = newlastascent;
825 int numfixentriesinit,
850 numfixentries = numfixentriesinit;
861 var2 =
vars[invperm[
i]];
867 var1fix = tempfixings[
i];
883 var2fix = tempfixings[invperm[
i]];
905 *infeasibleentry =
i;
911 tempfixings[invperm[
i]] =
FIXED0;
913 tempfixentries[numfixentries++] = invperm[
i];
920 tempfixentries[numfixentries++] =
i;
926 for (
i = numfixentriesinit;
i < numfixentries; ++
i)
928 tempfixings[tempfixentries[
i]] =
NOINIT;
929 tempfixentries[
i] = 0;
957 int peekinfeasibleentry;
974 nvars = consdata->nvars;
982 vars = consdata->vars;
983 invperm = consdata->invperm;
993 var2 =
vars[invperm[
i]];
1026 SCIPdebugMsg(
scip,
" -> node is feasible (could set pair to (1,0) and every earlier pair is constant).\n");
1039 SCIPdebugMsg(
scip,
" -> First entry is not fixed. Check if 0 is feasible.\n");
1041 tempfixentries[0] =
i;
1043 &peekinfeasible, &peekinfeasibleentry) );
1045 if ( peekinfeasible )
1048 SCIPdebugMsg(
scip,
" -> First entry is not fixed. 0 is not feasible. Fixing to 1.\n");
1050 FALSE, infeasible, &tightened) );
1058 tempfixentries[0] = 0;
1066 SCIPdebugMsg(
scip,
" -> Second entry is not fixed. Check if 1 is feasible.\n");
1067 tempfixings[invperm[
i]] =
FIXED1;
1068 tempfixentries[0] = invperm[
i];
1070 &peekinfeasible, &peekinfeasibleentry) );
1072 if ( peekinfeasible )
1075 SCIPdebugMsg(
scip,
" -> Second entry is not fixed. 1 is not feasible. Fixing to 0.\n");
1077 FALSE, infeasible, &tightened) );
1084 tempfixings[invperm[
i]] =
NOINIT;
1085 tempfixentries[0] = 0;
1100 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");
1107 for (
r = 0;
r <=
i; ++
r)
1187 *infeasible =
FALSE;
1193 ++consdata->debugcnt;
1201 if ( coeffs[
i] == 1 || coeffs[
i] == -1 )
1263 componentends[
i] =
i;
1264 componentobj[
i] = objective[
i];
1266 helperobj += objective[
i];
1270 for (crit = 0; crit <
nvars; ++crit)
1272 critinv = invperm[crit];
1275 assert( crit != critinv );
1278 if ( componentends[crit] == critinv )
1284 tmpobj += componentobj[crit];
1286 tmpobj -= componentobj[critinv];
1289 *maxsoluval = tmpobj;
1294 tmpnewcompobj = componentobj[crit] + componentobj[critinv];
1296 helperobj -= componentobj[crit];
1298 helperobj -= componentobj[critinv];
1300 helperobj += tmpnewcompobj;
1303 componentobj[componentends[crit]] = tmpnewcompobj;
1304 componentobj[componentends[critinv]] = tmpnewcompobj;
1307 if ( componentends[crit] == crit )
1309 componentends[crit] = componentends[critinv];
1310 componentends[componentends[critinv]] = crit;
1314 componentends[componentends[crit]] = componentends[critinv];
1315 componentends[componentends[critinv]] = componentends[crit];
1350 int* entrycomponent;
1371 entrycomponent[
i] =
i;
1372 componentobjective[
i] = objective[
i];
1374 for (
i = 0;
i < crit; ++
i)
1380 if ( entrycomponent[
i] <
i )
1394 if ( entrycomponent[
c] !=
c )
1397 entrycomponent[
c] =
i;
1398 componentobjective[
i] += objective[
c];
1408 if ( entrycomponent[
c] !=
c )
1411 entrycomponent[
c] =
i;
1412 componentobjective[
i] += objective[
c];
1426 if ( entrycomponent[
i] == entrycomponent[crit] )
1428 else if ( entrycomponent[
i] == entrycomponent[invperm[crit]] )
1430 else if (
SCIPisGT(
scip, componentobjective[entrycomponent[
i]], 0.0) )
1467 *infeasible =
FALSE;
1474 if ( consdata->nvars < 2 )
1483 nvars = consdata->nvars;
1484 perm = consdata->perm;
1485 invperm = consdata->invperm;
1490 constobjective = 1.0;
1494 sepaobjective[
i] = - vals[
i];
1497 sepaobjective[
i] = 1.0 - vals[
i];
1498 constobjective += vals[
i] - 1.0;
1508 SCIPdebugMsg(
scip,
"Critical row %d found; Computing maximally violated cover.\n", maxcrit);
1512 maxsoluobj += constobjective;
1522 maxsolu[
i] = -maxsolu[
i];
1525 if ( maxsolu[
i] == 0 )
1527 maxsolu[
i] = 1 - maxsolu[
i];
1534 if ( ! *infeasible )
1566 if ( consdata->nvars < 2 )
1574 nvars = consdata->nvars;
1575 vars = consdata->vars;
1576 invperm = consdata->invperm;
1607 else if ( val1 > val2 )
1677 if ( conshdlr ==
NULL )
1680 SCIPdebugMsg(
scip,
"Cannot check whether symresack constraint can be upgraded to orbisack constraint. ");
1696 if ( perm[perm[
i]] !=
i )
1704 vars1[nrows] = inputvars[
i];
1705 vars2[nrows++] = inputvars[perm[
i]];
1714 else if ( *upgrade )
1717 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
1774 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
1779 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
1806 nvars = consdata->nvars;
1807 vars = consdata->vars;
1909 assert( sourcedata->nvars == 0 || sourcedata->vars !=
NULL );
1910 assert( sourcedata->nvars == 0 || sourcedata->perm !=
NULL );
1911 assert( sourcedata->nvars == 0 || sourcedata->invperm !=
NULL );
1913 if ( sourcedata->ppupgrade )
1915 assert( sourcedata->nvars > 0 );
1916 assert( sourcedata->ncycles != 0 );
1917 assert( sourcedata->cycledecomposition !=
NULL );
1918 for (
i = 0;
i < sourcedata->ncycles; ++
i)
1920 assert( sourcedata->cycledecomposition[
i] !=
NULL );
1921 assert( sourcedata->cycledecomposition[
i][0] != 0 );
1930 nvars = sourcedata->nvars;
1934 consdata->vars =
NULL;
1935 consdata->nvars =
nvars;
1936 consdata->perm =
NULL;
1937 consdata->invperm =
NULL;
1938 consdata->ppupgrade = sourcedata->ppupgrade;
1939 consdata->ismodelcons = sourcedata->ismodelcons;
1941 consdata->debugcnt = 0;
1943 consdata->ncycles = 0;
1944 consdata->cycledecomposition =
NULL;
1945 consdata->ndescentpoints = 0;
1946 consdata->descentpoints =
NULL;
1960 if ( sourcedata->ppupgrade )
1962 consdata->ncycles = sourcedata->ncycles;
1964 for (
i = 0;
i < sourcedata->ncycles; ++
i)
1969 consdata->ndescentpoints = sourcedata->ndescentpoints;
1979 for (
i = 0;
i < sourcedata->nvars; ++
i)
2006 *infeasible =
FALSE;
2016 for (
c = 0;
c < nconss; ++
c)
2047 conshdlrdata->maxnvars = 0;
2050 for (
c = 0;
c < nconss; ++
c)
2060 if ( consdata->nvars > conshdlrdata->maxnvars )
2061 conshdlrdata->maxnvars = consdata->nvars;
2097 maxnvars = conshdlrdata->maxnvars;
2103 for (
c = 0;
c < nconss; ++
c)
2114 if ( consdata->nvars == 0 )
2118 assert( consdata->nvars <= maxnvars );
2167 maxnvars = conshdlrdata->maxnvars;
2173 for (
c = 0;
c < nconss; ++
c)
2184 if ( consdata->nvars == 0 )
2188 assert( consdata->nvars <= maxnvars );
2229 SCIPdebugMsg(
scip,
"Enforcing method for symresack constraints (lp solutions) ...\n");
2245 maxnvars = conshdlrdata->maxnvars;
2251 for (
c = 0;
c < nconss; ++
c)
2264 if ( !consdata->ismodelcons )
2267 if ( consdata->nvars == 0 )
2271 assert( consdata->nvars <= maxnvars );
2307 SCIPdebugMsg(
scip,
"Enforcing method for symresack constraints (pseudo solutions) ...\n");
2311 if ( objinfeasible || solinfeasible )
2315 for (
c = 0;
c < nconss; ++
c)
2321 if ( !consdata->ismodelcons )
2350 SCIPdebugMsg(
scip,
"Enforcing method for symresack constraints (relaxation solutions) ...\n");
2366 maxnvars = conshdlrdata->maxnvars;
2372 for (
c = 0;
c < nconss; ++
c)
2385 if ( !consdata->ismodelcons )
2388 if ( consdata->nvars == 0 )
2392 assert( consdata->nvars <= maxnvars );
2429 for (
c = 0;
c < nconss; ++
c)
2435 if ( !consdata->ismodelcons )
2465 SCIPdebugMsg(
scip,
"Propagation method of symresack constraint handler.\n");
2468 for (
c = 0;
c < nconss; ++
c)
2483 success = success || ( ngen > 0 );
2511 oldndelconss = *ndelconss;
2513 SCIPdebugMsg(
scip,
"Presolving method of symresack constraint handler. Propagating symresack inequalities.\n");
2517 for (
c = 0;
c < nconss; ++
c)
2529 if ( consdata->nvars == 0 )
2547 *nfixedvars += ngen;
2554 if ( *ndelconss > oldndelconss || success )
2582 SCIPdebugMsg(
scip,
"Propagation resolution method of symresack constraint handler.\n");
2590 if ( consdata->nvars < 2 )
2596 vars = consdata->vars;
2597 nvars = consdata->nvars;
2598 perm = consdata->perm;
2599 invperm = consdata->invperm;
2604 varrow = inferinfo %
nvars;
2605 infrow = inferinfo /
nvars;
2611 assert(
vars[varrow] == infervar ||
vars[invperm[varrow]] == infervar );
2614 for (
i = 0;
i < varrow; ++
i)
2639 if ( invperm[
i] >
i )
2657 for (
i = varrow + 1;
i <= infrow; ++
i)
2674 if ( ( invperm[
i] >
i || invperm[
i] == varrow ) &&
ISFIXED(
scip,
vars[invperm[
i]], bdchgidx) )
2693 if ( invperm[varrow] > varrow )
2705 if ( varrow < perm[varrow] )
2729 for (
c = 0;
c < nconss; ++
c)
2771 if ( consdata->nvars < 2 )
2777 nvars = consdata->nvars;
2778 vars = consdata->vars;
2779 perm = consdata->perm;
2828 assert( sourcedata->nvars > 0 );
2834 if ( !sourcedata->ismodelcons && !conshdlrdata->forceconscopy )
2841 sourcevars = sourcedata->vars;
2842 nvars = sourcedata->nvars;
2860 initial,
separate, enforce, check,
propagate, local, modifiable, dynamic, removable, stickingatnode) );
2881 int nfoundpermidx = 0;
2892 if( strncmp(s,
"symresack(", 10) != 0 )
2894 SCIPerrorMessage(
"Syntax error - expected \"symresack(\", but got '%s'", s);
2942 endptr = strchr(endptr,
']');
2944 if( endptr ==
NULL )
2959 if(
nvars > maxnvars )
2997 if( nfoundpermidx >
nvars )
3004 perm[nfoundpermidx-1] = val;
3015 if( nfoundpermidx !=
nvars )
3017 SCIPerrorMessage(
"length of permutation is not equal to number of given variables.\n");
3031 if( *success && cnt < 2 )
3071 if ( consdata->nvars < 2 )
3077 vars = consdata->vars;
3078 nvars = consdata->nvars;
3079 perm = consdata->perm;
3111 if ( varssize < consdata->
nvars )
3118 for (
i = 0;
i < consdata->nvars; ++
i)
3119 vars[cnt++] = consdata->vars[
i];
3140 (*nvars) = consdata->nvars;
3160 consEnfolpSymresack, consEnfopsSymresack, consCheckSymresack, consLockSymresack,
3184 "Upgrade symresack constraints to packing/partioning symresacks?",
3189 "Check whether permutation is monotone when upgrading to packing/partioning symresacks?",
3193 "Whether symresack constraints should be forced to be copied to sub SCIPs.",
3252 if ( conshdlr ==
NULL )
3262 SCIP_CALL(
SCIPcreateCons(
scip, cons, name, conshdlr, consdata, initial,
separate && (! consdata->ppupgrade), enforce, check,
propagate,
3263 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
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_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_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