72 #define CONSHDLR_NAME "orbitope" 73 #define CONSHDLR_DESC "symmetry breaking constraint handler relying on (partitioning/packing) orbitopes" 74 #define CONSHDLR_SEPAPRIORITY +40100 75 #define CONSHDLR_ENFOPRIORITY -1005200 76 #define CONSHDLR_CHECKPRIORITY -1005200 77 #define CONSHDLR_SEPAFREQ 5 78 #define CONSHDLR_PROPFREQ 5 79 #define CONSHDLR_EAGERFREQ -1 81 #define CONSHDLR_MAXPREROUNDS -1 82 #define CONSHDLR_DELAYSEPA FALSE 83 #define CONSHDLR_DELAYPROP FALSE 84 #define CONSHDLR_NEEDSCONS TRUE 86 #define CONSHDLR_PROP_TIMING SCIP_PROPTIMING_BEFORELP 87 #define CONSHDLR_PRESOLTIMING SCIP_PRESOLTIMING_MEDIUM 89 #define DEFAULT_PPORBITOPE TRUE 90 #define DEFAULT_SEPAFULLORBITOPE FALSE 91 #define DEFAULT_CHECKALWAYSFEAS TRUE 99 struct SCIP_ConshdlrData
138 assert( consdata != NULL );
139 assert( *consdata != NULL );
141 p = (*consdata)->nspcons;
142 q = (*consdata)->nblocks;
143 for (i = 0; i < p; ++i)
180 assert(consdata != NULL);
189 for (i = 0; i < nspcons; ++i)
197 (*consdata)->tmpvals = NULL;
198 (*consdata)->tmpvars = NULL;
199 (*consdata)->nspcons = nspcons;
200 (*consdata)->nblocks = nblocks;
201 (*consdata)->orbitopetype = orbitopetype;
202 (*consdata)->resolveprop = resolveprop;
203 (*consdata)->istrianglefixed =
FALSE;
211 for (i = 0; i < nspcons; ++i)
216 for (j = 0; j < nblocks; ++j)
249 assert( scip != NULL );
250 assert( vars != NULL );
251 assert( vars != NULL );
252 assert( *nrows > 0 );
254 assert( type != NULL );
259 if ( setppcconshdlr == NULL )
265 if ( nsetppcconss == 0 )
267 assert( setppcconss != NULL );
278 for (i = 0; i < nprobvars; ++i)
281 for (i = 0; i < *nrows && success; ++i)
283 for (j = 0; j < ncols; ++j)
296 goto FREEUPGRADESTRUCTURES;
302 for (i = 0; i < *nrows && success; ++i)
306 for (c = 0; c < nsetppcconss && success; ++c)
321 assert( nsetppcvars > 0 );
324 if ( nsetppcvars != ncols )
326 assert( nsetppcvars == ncols );
329 assert( setppcvars != NULL );
332 for (j = 0; j < nsetppcvars; ++j)
342 if ( rowidxvar[idx] == i )
348 if ( nfound == ncols )
350 assert( ! covered[i] );
359 if ( ncovered == *nrows )
362 goto FREEUPGRADESTRUCTURES;
366 for (i = 0; i < *nrows; ++i)
374 for (c = 0; c < nsetppcconss; ++c)
387 assert( nsetppcvars > 0 );
390 if ( nsetppcvars < ncols )
392 assert( nsetppcvars >= ncols );
395 assert( setppcvars != NULL );
398 for (j = 0; j < nsetppcvars && nfound < ncols; ++j)
408 if ( rowidxvar[idx] == i )
412 if ( nfound == ncols )
414 assert( ! covered[i] );
423 if ( ncovered == *nrows )
425 else if ( ncovered >= 3 )
432 for (i = r; i < *nrows - 1; ++i)
445 FREEUPGRADESTRUCTURES:
464 assert( consdata != NULL );
465 assert( consdata->nspcons > 0 );
466 assert( consdata->nblocks > 0 );
467 assert( consdata->vars != NULL );
469 for (j = 0; j < consdata->nblocks; ++j)
473 for (i = 0; i < consdata->nspcons; ++i)
475 for (j = 0; j < consdata->nblocks; ++j)
484 for (j = 0; j < consdata->nblocks; ++j)
510 for (k = 0; k < p; ++k)
513 for (l = 0; l < q; ++l)
518 for (l = j; l < q; ++l)
520 assert( M[i][l] == 0 );
529 assert( cases[p1][p2] != -1 );
530 assert( p1 >= 0 && p1 < i );
531 assert( p2 >= 0 && p2 < j );
534 if ( cases[p1][p2] == 1 )
539 assert( cases[p1][p2] == 2 || cases[p1][p2] == 3 );
540 assert( M[p1][p2] == 0 );
542 if ( cases[p1][p2] == 3 )
548 assert( cases[p1][p2] == 3 );
551 for (l = 0; l < q; ++l)
555 for (k = 0; k < p; ++k)
557 for (l = 0; l < q; ++l)
575 SCIPerrorMessage(
"unexpected matrix entry <%d>: should be -1, 0 or +1\n", M[k][l]);
583 for (l = 0; l < q; ++l)
587 for (k = 0; k < p; ++k)
607 assert( scip != NULL );
608 assert( consdata != NULL );
609 assert( consdata->nspcons > 0 );
610 assert( consdata->nblocks > 0 );
611 assert( consdata->vars != NULL );
612 assert( consdata->vals != NULL );
614 for (i = 0; i < consdata->nspcons; ++i)
616 for (j = 0; j < consdata->nblocks; ++j)
617 consdata->vals[i][j] =
SCIPgetSolVal(scip, sol, consdata->vars[i][j]);
648 assert( weights != NULL );
649 assert( cases != NULL );
650 assert( vals != NULL );
654 for (i = 0; i < nspcons; ++i)
656 for (j = 0; j < nblocks; ++j)
660 weights[i][j] = -1.0;
668 minvalue = vals[0][0];
669 weights[0][0] = minvalue;
674 if ( nspcons < nblocks )
677 for (j = 1; j < diagsize; ++j)
680 if (
SCIPisLT(scip, vals[j][j], minvalue) )
682 minvalue = vals[j][j];
687 weights[j][j] = minvalue;
691 for (i = 1; i < nspcons; ++i)
693 weights[i][0] = weights[i-1][0] + vals[i][0];
698 for (i = 2; i < nspcons; ++i)
700 for (j = 1; j < nblocks && j < i; ++j)
705 assert( cases[i-1][j] != -1 );
706 assert( cases[i-1][j-1] != -1 );
708 weightleft = weights[i-1][j-1];
709 weightright = vals[i][j] + weights[i-1][j];
712 if (
SCIPisLT(scip, weightleft, weightright) )
714 weights[i][j] = weightleft;
719 weights[i][j] = weightright;
746 assert( scip != NULL );
747 assert( cons != NULL );
748 assert( infeasible != NULL );
749 assert( nfixedvars != NULL );
752 assert( consdata != NULL );
753 assert( consdata->nspcons > 0 );
754 assert( consdata->nblocks > 0 );
755 assert( consdata->vars != NULL );
760 if ( consdata->istrianglefixed )
763 nspcons = consdata->nspcons;
764 nblocks = consdata->nblocks;
765 vars = consdata->vars;
770 if ( nspcons < nblocks )
774 for (i = 0; i < diagsize; ++i)
776 for (j = i+1; j < nblocks; ++j)
783 SCIPdebugMsg(scip,
"The problem is infeasible: some variable in the upper right triangle is fixed to 1.\n");
794 if ( *nfixedvars > 0 )
796 SCIPdebugMsg(scip,
"<%s>: %s fixed upper right triangle to 0 (fixed vars: %d).\n",
SCIPconsGetName(cons), fixedglobal ?
"globally" :
"locally", *nfixedvars);
804 consdata->istrianglefixed =
TRUE;
834 assert( scip != NULL );
835 assert( conshdlr != NULL );
836 assert( cons != NULL );
837 assert( infeasible != NULL);
838 assert( nfixedvars != NULL );
839 assert( ncuts != NULL );
841 assert( consdata != NULL );
842 assert( consdata->nspcons > 0 );
843 assert( consdata->nblocks > 0 );
844 assert( consdata->vars != NULL );
845 assert( consdata->vals != NULL );
846 assert( consdata->tmpvars != NULL );
847 assert( consdata->tmpvals != NULL );
848 assert( consdata->weights != NULL );
849 assert( consdata->cases != NULL );
855 nspcons = consdata->nspcons;
856 nblocks = consdata->nblocks;
857 vars = consdata->vars;
858 vals = consdata->vals;
859 tmpvars = consdata->tmpvars;
860 tmpvals = consdata->tmpvals;
861 weights = consdata->weights;
862 cases = consdata->cases;
865 if ( ! consdata->istrianglefixed )
870 if ( *nfixedvars > 0 )
878 for (i = 1; i < nspcons && ! (*infeasible); ++i)
884 lastcolumn = nblocks - 1;
885 if ( lastcolumn > i )
890 for (j = lastcolumn; j > 0; --j)
912 for (l = j; l <= lastcolumn; ++l)
914 tmpvars[nvars] = vars[i][l];
915 tmpvals[nvars] = 1.0;
922 assert( cases[p1][p2] != -1 );
923 assert( p1 >= 0 && p1 < i );
924 assert( p2 >= 0 && p2 < j );
927 if (cases[p1][p2] == 1)
932 assert( cases[p1][p2] == 2 || cases[p1][p2] == 3 );
933 tmpvars[nvars] = vars[p1][p2];
934 tmpvals[nvars] = -1.0;
936 weight += vals[p1][p2];
937 if ( cases[p1][p2] == 3 )
943 assert( cases[p1][p2] == 3 );
959 SCIP_CALL( printSCI(scip, nspcons, nblocks, cases, i, j) );
962 assert(
SCIPisSumEQ(scip, weights[i-1][j-1], weight) );
992 assert( scip != NULL );
993 assert( cons != NULL );
994 assert( infeasible != NULL );
995 assert( nfixedvars != NULL );
1003 assert( consdata != NULL );
1004 assert( consdata->nspcons > 0 );
1005 assert( consdata->nblocks > 0 );
1006 assert( consdata->vars != NULL );
1008 nspcons = consdata->nspcons;
1009 nblocks = consdata->nblocks;
1010 vars = consdata->vars;
1011 orbitopetype = consdata->orbitopetype;
1016 if ( ! consdata->istrianglefixed )
1020 *nfixedvars += nfixed;
1030 printMatrix(scip, consdata);
1042 lastoneprevrow = -1;
1048 for (i = 1; i < nspcons; ++i)
1051 int firstnonzeroinrow;
1056 lastcolumn = nblocks - 1;
1057 if ( lastcolumn > i )
1061 firstnonzeroinrow = -1;
1062 for (j = 0; j <= lastcolumn; ++j)
1069 firstnonzeroinrow = j;
1078 firstnonzeroinrow = j;
1086 SCIPdebugMsg(scip,
" -> Infeasible node: all variables in row %d are fixed to 0.\n", i);
1091 firstnonzeros[i] = firstnonzeroinrow;
1093 assert( -1 <= firstnonzeroinrow && firstnonzeroinrow <= lastcolumn );
1097 assert( lastoneprevrow <= lastcolumn );
1101 assert( lastoneprevrow + 1 >= 0 );
1102 if ( lastoneprevrow == nblocks-1 ||
SCIPvarGetUbLocal(vars[i][lastoneprevrow+1]) < 0.5 )
1103 lastoneinrow = lastoneprevrow;
1106 lastoneinrow = lastoneprevrow + 1;
1107 frontiersteps[nsteps++] = i;
1113 assert( lastoneinrow <= lastcolumn );
1114 lastones[i] = lastoneinrow;
1117 if ( firstnonzeroinrow > lastoneinrow )
1124 SCIPdebugMsg(scip,
" -> Infeasible node: row %d, leftmost nonzero at %d, rightmost 1 at %d\n",
1125 i, firstnonzeroinrow, lastoneinrow);
1129 SCIPdebugMsg(scip,
" -> Infeasible node: row %d, 1 at %d, rightmost position for 1 at %d\n",
1130 i, firstnonzeroinrow, lastoneinrow);
1145 for (j = 0; j <= lastcolumn; ++j)
1158 if ( lastones[0] == -1 )
1170 for (k = 1; k < i; ++k)
1173 l = lastones[k] + 1;
1176 if ( l <= nblocks-1 && l <= k && lastones[k-1] == lastones[k] )
1190 for (j = lastoneinrow+1; j <= lastcolumn; ++j)
1198 SCIPdebugMsg(scip,
" -> Fixing entry (%d,%d) to 0.\n", i, j);
1203 inferInfo = i * nblocks + lastoneinrow + 1;
1212 SCIPdebugMsg(scip,
" -> Infeasible node: row %d, 1 in column %d beyond rightmost position %d\n", i, j, lastoneinrow);
1235 for (k = 1; k < i; ++k)
1238 l = lastones[k] + 1;
1241 if ( l <= nblocks-1 && l <= k && lastones[k-1] == lastones[k] )
1257 lastoneprevrow = lastoneinrow;
1261 for (j = 0; j < nsteps; ++j)
1266 s = frontiersteps[j];
1267 lastoneinrow = lastones[s];
1269 assert( 0 <= lastoneinrow && lastoneinrow < nblocks );
1275 betaprev = lastoneinrow - 1;
1278 for (i = s+1; i < nspcons; ++i)
1282 assert( betaprev + 1 >= 0 );
1286 beta = betaprev + 1;
1287 assert( -1 <= beta && beta < nblocks );
1289 if ( firstnonzeros[i] > beta )
1299 SCIPdebugMsg(scip,
" -> Fixing entry (%d,%d) to 1.\n", s, lastoneinrow);
1304 inferInfo = nblocks * nspcons + i * nblocks + firstnonzeros[i];
1307 assert( !(*infeasible) );
1349 assert( scip != NULL );
1350 assert( cons != NULL );
1351 assert( vars != NULL );
1352 assert( 0 <= firstcol && firstcol < lastcol );
1353 assert( infeasible != NULL );
1354 assert( nfixedvars != NULL );
1355 assert( nrows > 0 );
1356 assert( ncols > 0 );
1359 if ( *infeasible || currow >= nrows )
1363 lastone = firstcol - 1;
1366 for (j = firstcol; j < lastcol; ++j)
1368 assert( vars[currow][j] != NULL );
1373 for (l = lastone + 1; l < j; ++l)
1379 inferinfo = currow * ncols + j;
1391 for (i = 0; i <= currow; ++i)
1394 for (s = 0; s <= l; ++s)
1415 for (l = j + 1; l < lastcol; ++l)
1420 inferinfo = currow * ncols + j;
1434 for (i = 0; i <= currow; ++i)
1437 for (s = 0; s <= l; ++s)
1458 if ( lastone > firstcol )
1463 if ( firstzero >= 0 && firstzero < lastcol - 1 )
1483 assert( scip != NULL );
1484 assert( cons != NULL );
1485 assert( infeasible != NULL );
1486 assert( nfixedvars != NULL );
1489 *infeasible =
FALSE;
1496 assert( consdata != NULL );
1497 assert( consdata->nspcons > 0 );
1498 assert( consdata->nblocks > 0 );
1499 assert( consdata->vars != NULL );
1502 SCIP_CALL(
propagateFullOrbitope(scip, cons, consdata->vars, 0, consdata->nblocks, 0, consdata->nspcons, consdata->nblocks, nfixedvars, infeasible) );
1520 assert( scip != NULL );
1521 assert( cons != NULL );
1522 assert( infeasible != NULL );
1523 assert( nfixedvars != NULL );
1526 assert( consdata != NULL );
1528 orbitopetype = consdata->orbitopetype;
1586 assert( scip != NULL );
1587 assert( cons != NULL );
1588 assert( result != NULL );
1591 assert( consdata != NULL );
1592 assert( consdata->nspcons > 0 );
1593 assert( consdata->nblocks > 0 );
1594 assert( consdata->vars != NULL );
1595 assert( consdata->vals != NULL );
1596 assert( consdata->weights != NULL );
1597 assert( consdata->cases != NULL );
1598 assert( consdata->istrianglefixed );
1601 if ( ! consdata->resolveprop )
1604 nspcons = consdata->nspcons;
1605 nblocks = consdata->nblocks;
1606 vars = consdata->vars;
1607 vals = consdata->vals;
1608 weights = consdata->weights;
1609 orbitopetype = consdata->orbitopetype;
1610 cases = consdata->cases;
1612 SCIPdebugMsg(scip,
"Propagation resolution method of orbitope constraint using orbitopal fixing\n");
1615 for (i = 0; i < nspcons; ++i)
1620 lastcolumn = nblocks - 1;
1621 if ( lastcolumn > i )
1623 for (j = 0; j <= lastcolumn; ++j)
1641 printMatrix(scip, consdata);
1645 assert( consdata->istrianglefixed );
1649 assert( inferinfo >= 0 && inferinfo < 2 * nspcons * nblocks );
1650 if ( inferinfo < nspcons * nblocks )
1659 i = (int) (inferinfo / nblocks);
1660 j = inferinfo % nblocks;
1661 assert( 0 <= i && i < nspcons );
1662 assert( 0 <= j && j < nblocks );
1665 assert( weights[i-1][j-1] < 0.5 );
1667 SCIPdebugMsg(scip,
" -> reason for x[%d][%d] = ... = x[%d][%d] = 0 was the following SC:\n", i, j, i, MIN(i,nblocks));
1676 assert( cases[p1][p2] != -1 );
1677 assert( p1 >= 0 && p1 < i );
1678 assert( p2 >= 0 && p2 < j );
1681 if ( cases[p1][p2] == 1 )
1686 assert( cases[p1][p2] == 2 || cases[p1][p2] == 3 );
1696 if ( cases[p1][p2] == 3 )
1702 assert( cases[p1][p2] == 3 );
1723 inferinfo -= nspcons * nblocks;
1724 i = (int) inferinfo / nblocks;
1725 j = inferinfo % nblocks;
1726 assert( 0 <= i && i < nspcons );
1727 assert( 0 <= j && j < nblocks );
1732 if ( weights[i-1][j-1] > 0.5 && weights[i-1][j-1] < 1.5 )
1734 SCIPdebugMsg(scip,
" -> reason for x[%d][%d] = 1 was the following SC:\n", i, j);
1747 assert( cases[p1][p2] != -1 );
1748 assert( p1 >= 0 && p1 < i );
1749 assert( p2 >= 0 && p2 < j );
1752 if ( cases[p1][p2] == 1 )
1757 assert( cases[p1][p2] == 2 || cases[p1][p2] == 3 );
1772 assert( pos1 == -1 && pos2 == -1 );
1777 if ( cases[p1][p2] == 3 )
1783 assert( cases[p1][p2] == 3 );
1784 assert( pos1 >= 0 && pos2 >= 0 );
1795 for (k = 0; k < j; ++k)
1816 lastcolumn = nblocks - 1;
1817 if ( lastcolumn > i )
1821 for (k = j; k <= lastcolumn; ++k)
1827 SCIPdebugMsg(scip,
" and variable x[%d][%d] fixed to 1.\n", i, k);
1860 assert( scip != NULL );
1861 assert( cons != NULL );
1862 assert( infervar != NULL );
1863 assert( bdchgidx != NULL );
1864 assert( result != NULL );
1869 assert( consdata != NULL );
1870 assert( consdata->nspcons > 0 );
1871 assert( consdata->nblocks > 0 );
1873 vars = consdata->vars;
1874 ncols = consdata->nblocks;
1876 infercol = inferinfo % ncols;
1877 inferrow = (int) inferinfo / ncols;
1879 assert( inferrow < consdata->nspcons );
1884 SCIPdebugMsg(scip,
" -> reason for fixing variable with index %d to 1 was the fixing of the upperleft %dx%d-matrix and x[%d][%d] = 1.\n",
1885 SCIPvarGetIndex(infervar), inferrow - 1, infercol, inferrow, infercol);
1887 for (i = 0; i < inferrow; ++i)
1889 for (j = 0; j <= infercol; ++j)
1904 for (k = infercol + 1; k < ncols; ++k)
1908 SCIPdebugMsg(scip,
" -> reason for fixing variable with index %d to 0 was the fixing of the upper left %dx%d-matrix and x[%d][%d] = 0.\n",
1911 for (i = 0; i < inferrow; ++i)
1913 for (j = 0; j <= k; ++j)
1950 assert( cons != NULL );
1954 assert( scip != NULL );
1955 assert( consdata != NULL );
1956 assert( consdata->nspcons > 0 );
1957 assert( consdata->nblocks > 0 );
1958 assert( consdata->vals != NULL );
1959 assert( consdata->weights != NULL );
1960 assert( consdata->cases != NULL );
1963 if ( ! consdata->istrianglefixed )
1974 if ( nfixedvars > 0 )
1981 nspcons = consdata->nspcons;
1982 nblocks = consdata->nblocks;
1983 vals = consdata->vals;
1984 weights = consdata->weights;
1985 cases = consdata->cases;
1992 assert( consdata->istrianglefixed );
1996 for (i = 1; i < nspcons; ++i)
2001 lastcolumn = nblocks - 1;
2004 if ( lastcolumn > i )
2008 for (j = lastcolumn; j > 0; --j)
2014 if (
SCIPisGT(scip, bar - weights[i-1][j-1], 0.0) )
2048 assert( cons != 0 );
2051 assert( consdata != NULL );
2052 assert( consdata->nspcons > 0 );
2053 assert( consdata->nblocks > 0 );
2054 assert( consdata->vars != NULL );
2055 assert( consdata->vals != NULL );
2056 assert( consdata->weights != NULL );
2057 assert( consdata->cases != NULL );
2059 nspcons = consdata->nspcons;
2060 nblocks = consdata->nblocks;
2061 vars = consdata->vars;
2062 vals = consdata->vals;
2063 weights = consdata->weights;
2064 cases = consdata->cases;
2072 if ( ! consdata->istrianglefixed )
2079 if ( nspcons < nblocks )
2083 for (i = 0; i < diagsize; ++i)
2085 for (j = i+1; j < nblocks; ++j)
2090 SCIPinfoMessage(scip, NULL,
"variable x[%d][%d] = %f on upper right nonzero.\n", i, j, vals[i][j]);
2101 for (i = 1; i < nspcons; ++i)
2106 lastcolumn = nblocks - 1;
2109 if ( lastcolumn > i )
2113 for (j = lastcolumn; j > 0; --j)
2119 if (
SCIPisGT(scip, bar - weights[i-1][j-1], 0.0) )
2133 for (l = j; l < nblocks; ++l)
2143 assert( cases[p1][p2] != -1 );
2144 assert( p1 >= 0 && p1 < i );
2145 assert( p2 >= 0 && p2 < j );
2148 if (cases[p1][p2] == 1)
2153 assert( cases[p1][p2] == 2 || cases[p1][p2] == 3 );
2155 if ( cases[p1][p2] == 3 )
2161 assert( cases[p1][p2] == 3 );
2192 assert( scip != NULL );
2193 assert( cons != NULL );
2194 assert( feasible != NULL );
2198 assert( consdata != NULL );
2199 assert( consdata->vars != NULL );
2200 assert( consdata->nspcons > 0 );
2201 assert( consdata->nblocks > 0 );
2203 vars = consdata->vars;
2204 nrows = consdata->nspcons;
2205 ncols = consdata->nblocks;
2213 for (j = 1; j < ncols && *feasible; ++j)
2215 for (i = 0; i < nrows; ++i)
2217 vars1[i] = vars[i][j - 1];
2218 vars2[i] = vars[i][j];
2248 assert( scip != NULL );
2249 assert( conshdlr != NULL );
2251 assert( result != NULL );
2254 for (c = 0; c < nconss && ! infeasible; c++)
2258 int nconsfixedvars = 0;
2268 assert( conss[c] != NULL );
2272 assert( consdata != NULL );
2278 orbitopetype = consdata->orbitopetype;
2283 SCIP_CALL(
separateSCIs(scip, conshdlr, conss[c], consdata, &infeasible, &nconsfixedvars, &nconscuts) );
2285 else if ( conshdlrdata->sepafullorbitope )
2287 assert( consdata->nspcons > 0 );
2288 assert( consdata->vars != NULL );
2290 nrows = consdata->nspcons;
2291 vars = consdata->vars;
2297 for (j = 1; j < consdata->nblocks && ! infeasible; ++j)
2299 for (i = 0; i < nrows; ++i)
2301 vars1[i] = vars[i][j - 1];
2302 vars2[i] = vars[i][j];
2311 nfixedvars += nconsfixedvars;
2315 if ( c >= nusefulconss && (ncuts > 0 || nfixedvars > 0) )
2324 else if ( nfixedvars > 0 )
2326 SCIPdebugMsg(scip,
"Fixed %d variables.\n", nfixedvars);
2329 else if ( ncuts > 0 )
2336 SCIPdebugMsg(scip,
"No violated inequality found during separation.\n");
2350 assert(scip != NULL);
2351 assert(conshdlr != NULL);
2368 assert( scip != 0 );
2369 assert( conshdlr != 0 );
2373 assert( conshdlrdata != NULL );
2384 assert(conshdlr != NULL);
2399 assert(conshdlr != NULL);
2402 assert(sourcecons != NULL);
2403 assert(targetcons != NULL);
2406 assert(sourcedata != NULL);
2410 sourcedata->orbitopetype, sourcedata->resolveprop) );
2426 assert( scip != NULL );
2427 assert( result != NULL );
2449 assert( scip != NULL );
2450 assert( result != NULL );
2467 assert( scip != NULL );
2468 assert( result != NULL );
2488 assert( result != NULL );
2489 assert( scip != NULL );
2508 assert( scip != NULL );
2509 assert( conshdlr != NULL );
2511 assert( result != NULL );
2514 if ( objinfeasible || solinfeasible )
2518 for (c = 0; c < nconss; ++c)
2527 assert( cons != 0 );
2530 assert( consdata != NULL );
2532 orbitopetype = consdata->orbitopetype;
2564 assert( scip != NULL );
2565 assert( conshdlr != NULL );
2567 assert( result != NULL );
2572 assert( conshdlrdata != NULL );
2574 if ( conshdlrdata->checkalwaysfeas )
2578 for( c = 0; c < nconss && (*result ==
SCIP_FEASIBLE || completely); ++c )
2580 assert( conss[c] != 0 );
2583 assert( consdata != NULL );
2585 orbitopetype = consdata->orbitopetype;
2613 assert( scip != NULL );
2614 assert( conshdlr != NULL );
2616 assert( result != NULL );
2621 for (c = 0; c < nusefulconss && !infeasible; ++c)
2623 assert( conss[c] != 0 );
2634 SCIPdebugMsg(scip,
"Propagation via orbitopal fixing proved node to be infeasible.\n");
2636 else if ( nfixedvars > 0 )
2639 SCIPdebugMsg(scip,
"Propagated %d variables via orbitopal fixing.\n", nfixedvars);
2641 else if ( nusefulconss > 0 )
2644 SCIPdebugMsg(scip,
"Propagation via orbitopal fixing did not find anything.\n");
2659 assert( scip != NULL );
2660 assert( conshdlr != NULL );
2662 assert( result != NULL );
2665 noldfixedvars = *nfixedvars;
2668 for (c = 0; c < nconss && !infeasible; ++c)
2672 assert( conss[c] != 0 );
2677 *nfixedvars += nfixed;
2683 SCIPdebugMsg(scip,
"Presolving detected infeasibility.\n");
2685 else if ( *nfixedvars > noldfixedvars )
2689 else if ( nconss > 0 )
2692 SCIPdebugMsg(scip,
"Presolving via orbitopal fixing did not find anything.\n");
2706 assert( scip != NULL );
2707 assert( cons != NULL );
2708 assert( infervar != NULL );
2709 assert( bdchgidx != NULL );
2710 assert( result != NULL );
2713 assert( consdata != NULL );
2715 orbitopetype = consdata->orbitopetype;
2742 assert( scip != NULL );
2743 assert( conshdlr != NULL );
2745 assert( cons != NULL );
2748 assert( consdata != NULL );
2749 assert( consdata->nspcons > 0 );
2750 assert( consdata->nblocks > 0 );
2751 assert( consdata->vars != NULL );
2753 SCIPdebugMsg(scip,
"Locking method for orbitope constraint handler\n");
2755 nspcons = consdata->nspcons;
2756 nblocks = consdata->nblocks;
2757 vars = consdata->vars;
2760 for (i = 0; i < nspcons; ++i)
2762 for (j = 0; j < nblocks; ++j)
2782 assert( scip != NULL );
2783 assert( conshdlr != NULL );
2785 assert( cons != NULL );
2788 assert( consdata != NULL );
2789 assert( consdata->nspcons > 0 );
2790 assert( consdata->nblocks > 0 );
2791 assert( consdata->vars != NULL );
2793 nspcons = consdata->nspcons;
2794 nblocks = consdata->nblocks;
2795 vars = consdata->vars;
2796 orbitopetype = consdata->orbitopetype;
2798 SCIPdebugMsg(scip,
"Printing method for orbitope constraint handler\n");
2800 switch ( orbitopetype )
2815 for (i = 0; i < nspcons; ++i)
2817 for (j = 0; j < nblocks; ++j)
2823 if ( i < nspcons-1 )
2845 assert( scip != NULL );
2846 assert( cons != NULL );
2847 assert( sourcescip != NULL );
2848 assert( sourceconshdlr != NULL );
2850 assert( sourcecons != NULL );
2851 assert( varmap != NULL );
2852 assert( valid != NULL );
2856 SCIPdebugMsg(scip,
"Copying method for orbitope constraint handler.\n");
2859 assert( sourcedata != NULL );
2860 assert( sourcedata->nspcons > 0 );
2861 assert( sourcedata->nblocks > 0 );
2862 assert( sourcedata->vars != NULL );
2864 nspcons = sourcedata->nspcons;
2865 nblocks = sourcedata->nblocks;
2866 sourcevars = sourcedata->vars;
2869 for (i = 0; i < nspcons && *valid; ++i)
2873 for (j = 0; j < nblocks && *valid; ++j)
2875 SCIP_CALL(
SCIPgetVarCopy(sourcescip, scip, sourcevars[i][j], &(vars[i][j]), varmap, consmap, global, valid) );
2876 assert( !(*valid) || vars[i][j] != NULL );
2888 vars, sourcedata->orbitopetype, nspcons, nblocks, sourcedata->resolveprop,
2889 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
2893 assert( 0 <= i && i <= nspcons );
2894 for (k = 0; k < i; ++k)
2918 assert( success != NULL );
2924 while ( *s !=
'\0' && isspace((
unsigned char)*s) )
2927 if ( strncmp(s,
"partOrbitope(", 13) == 0 )
2929 else if ( strncmp(s,
"packOrbitope(", 13) == 0 )
2933 if ( strncmp(s,
"fullOrbitope(", 13) != 0 )
2957 while ( *s !=
'\0' && ! isspace((
unsigned char)*s) && *s !=
',' && *s !=
'.' && *s !=
')' )
2958 varname[k++] = *s++;
2969 vars[nspcons][j++] = var;
2981 if ( nblocks > maxnblocks )
2987 maxnblocks = newsize;
2990 assert( nblocks <= maxnblocks );
2993 while ( *s !=
'\0' && ( isspace((
unsigned char)*s) || *s ==
',' ) )
3002 if ( nspcons >= maxnspcons )
3008 maxnspcons = newsize;
3010 assert(nspcons < maxnspcons);
3016 while ( *s !=
')' );
3020 initial, separate, enforce, check, propagate, local, modifiable, dynamic, removable, stickingatnode) );
3022 for (k = 0; k < nspcons; ++k)
3036 assert( cons != NULL );
3037 assert( success != NULL );
3038 assert( vars != NULL );
3041 assert( consdata != NULL );
3043 if ( varssize < consdata->nblocks * consdata->nspcons )
3051 for (i = 0; i < consdata->nspcons; ++i)
3053 for (j = 0; j < consdata->nblocks; ++j)
3054 vars[cnt++] = consdata->vars[i][j];
3069 assert( cons != NULL );
3072 assert( consdata != NULL );
3074 (*nvars) = consdata->nblocks * consdata->nspcons;
3100 consEnfolpOrbitope, consEnfopsOrbitope, consCheckOrbitope, consLockOrbitope,
3102 assert(conshdlr != NULL);
3122 "Strengthen orbitope constraints to packing/partioning orbitopes?",
3126 "Whether we separate inequalities for full orbitopes?",
3130 "Whether check routine returns always SCIP_FEASIBLE.",
3187 if ( conshdlr == NULL )
3193 assert( nspcons > 0 );
3194 assert( nblocks > 0 );
3202 for (i = 0; i < nspcons; ++i)
3206 for (j = 0; j < nblocks; ++j)
3212 assert(var != NULL);
3253 SCIP_CALL(
SCIPcreateCons(scip, cons, name, conshdlr, consdata, initial, separate, enforce, check, propagate,
3254 local, modifiable, dynamic, removable, stickingatnode) );
enum SCIP_Result SCIP_RESULT
SCIP_RETCODE SCIPcreateConsOrbitope(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR ***vars, SCIP_ORBITOPETYPE orbitopetype, int nspcons, int nblocks, SCIP_Bool resolveprop, 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)
enum SCIP_BoundType SCIP_BOUNDTYPE
SCIP_Bool SCIPisFeasZero(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPsetConshdlrDelete(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSDELETE((*consdelete)))
static SCIP_DECL_CONSPARSE(consParseOrbitope)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
SCIP_Real SCIPgetVarUbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
SCIP_STAGE SCIPgetStage(SCIP *scip)
static SCIP_RETCODE fixTriangle(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *infeasible, int *nfixedvars)
#define CONSHDLR_SEPAFREQ
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetConshdlrTrans(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSTRANS((*constrans)))
#define CONSHDLR_DELAYPROP
static SCIP_RETCODE checkPackingPartitioningOrbitopeSolution(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_RESULT *result, SCIP_Bool printreason)
SCIP_Real SCIPgetVarLbAtIndex(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
static SCIP_DECL_CONSENFORELAX(consEnforelaxOrbitope)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
int SCIPgetNVarsSetppc(SCIP *scip, SCIP_CONS *cons)
#define SCIPallocClearBufferArray(scip, ptr, num)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPsetConshdlrGetVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETVARS((*consgetvars)))
static void copyValues(SCIP *scip, SCIP_CONSDATA *consdata, SCIP_SOL *sol)
SCIP_RETCODE SCIPsetConshdlrEnforelax(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSENFORELAX((*consenforelax)))
static SCIP_RETCODE propagateFullOrbitopeCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *infeasible, int *nfixedvars)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPaddConflictBinvar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPgetTransformedVar(SCIP *scip, SCIP_VAR *var, SCIP_VAR **transvar)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
#define CONSHDLR_SEPAPRIORITY
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
static SCIP_DECL_CONSPRESOL(consPresolOrbitope)
int SCIPgetSubscipDepth(SCIP *scip)
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)
constraint handler for orbisack constraints
SCIP_Real SCIPinfinity(SCIP *scip)
int SCIPsnprintf(char *t, int len, const char *s,...)
static SCIP_DECL_CONSENFOPS(consEnfopsOrbitope)
enum SCIP_Retcode SCIP_RETCODE
static SCIP_DECL_CONSGETVARS(consGetVarsOrbitope)
SCIP_RETCODE SCIPaddConflictUb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
SCIP_RETCODE SCIPaddVarLocks(SCIP *scip, SCIP_VAR *var, int nlocksdown, int nlocksup)
SCIP_Bool SCIPconsIsStickingAtNode(SCIP_CONS *cons)
int SCIPvarGetProbindex(SCIP_VAR *var)
static SCIP_RETCODE resolvePropagationFullOrbitopes(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, int inferinfo, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_RESULT *result)
SCIP_RETCODE SCIPinitConflictAnalysis(SCIP *scip, SCIP_CONFTYPE conftype, SCIP_Bool iscutoffinvolved)
#define SCIPfreeBlockMemory(scip, ptr)
SCIP_RETCODE SCIPsetConshdlrSepa(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSSEPALP((*conssepalp)), SCIP_DECL_CONSSEPASOL((*conssepasol)), int sepafreq, int sepapriority, SCIP_Bool delaysepa)
#define DEFAULT_CHECKALWAYSFEAS
static SCIP_DECL_CONSFREE(consFreeOrbitope)
static SCIP_RETCODE propagateFullOrbitope(SCIP *scip, SCIP_CONS *cons, SCIP_VAR ***vars, int firstcol, int lastcol, int currow, int nrows, int ncols, int *nfixedvars, SCIP_Bool *infeasible)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
#define CONSHDLR_PROPFREQ
#define CONSHDLR_PROP_TIMING
#define SCIPfreeBufferArray(scip, ptr)
Constraint handler for the set partitioning / packing / covering constraints .
#define SCIPallocBlockMemory(scip, ptr)
SCIP_Bool SCIPisTransformed(SCIP *scip)
int SCIPgetNLPBranchCands(SCIP *scip)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
static SCIP_DECL_CONSPRINT(consPrintOrbitope)
SCIP_RETCODE SCIPseparateCoversOrbisack(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_VAR **vars1, SCIP_VAR **vars2, int nrows, SCIP_Bool *infeasible, int *ngen)
SCIP_RETCODE SCIPsetConshdlrParse(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPARSE((*consparse)))
SCIP_RETCODE SCIPincludeConshdlrOrbitope(SCIP *scip)
#define CONSHDLR_ENFOPRIORITY
void SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
static SCIP_DECL_CONSENFOLP(consEnfolpOrbitope)
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_RETCODE SCIPaddConflictLb(SCIP *scip, SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx)
static void computeSCTable(SCIP *scip, int nspcons, int nblocks, SCIP_Real **weights, int **cases, SCIP_Real **vals)
#define CONSHDLR_CHECKPRIORITY
static SCIP_RETCODE enfopsPackingPartitioningOrbitopeSolution(SCIP *scip, SCIP_CONS *cons, SCIP_RESULT *result)
SCIP_VAR * SCIPvarGetNegatedVar(SCIP_VAR *var)
SCIP_Bool SCIPisConflictAnalysisApplicable(SCIP *scip)
constraint handler for (partitioning/packing/full) orbitope constraints w.r.t. the full symmetric gro...
SCIP_VAR * SCIPfindVar(SCIP *scip, const char *name)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
#define DEFAULT_PPORBITOPE
SCIP_RETCODE SCIPsetConshdlrCopy(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSHDLRCOPY((*conshdlrcopy)), SCIP_DECL_CONSCOPY((*conscopy)))
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_RETCODE resolvePropagation(SCIP *scip, SCIP_CONS *cons, SCIP_VAR *infervar, int inferinfo, SCIP_BOUNDTYPE boundtype, SCIP_BDCHGIDX *bdchgidx, SCIP_RESULT *result)
#define CONSHDLR_NEEDSCONS
SCIP_Bool SCIPisEfficacious(SCIP *scip, SCIP_Real efficacy)
SCIP_Real SCIPvarGetUbAtIndex(SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPmarkDoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPsetConshdlrFree(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSFREE((*consfree)))
SCIP_CONSHDLRDATA * SCIPconshdlrGetData(SCIP_CONSHDLR *conshdlr)
static SCIP_RETCODE separateSCIs(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS *cons, SCIP_CONSDATA *consdata, SCIP_Bool *infeasible, int *nfixedvars, int *ncuts)
static SCIP_DECL_CONSCOPY(consCopyOrbitope)
enum SCIP_OrbitopeType SCIP_ORBITOPETYPE
SCIP_Bool SCIPisSumEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_DECL_CONSPROP(consPropOrbitope)
SCIP_RETCODE SCIPanalyzeConflictCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *success)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_Bool SCIPconsIsLocal(SCIP_CONS *cons)
static SCIP_DECL_CONSSEPASOL(consSepasolOrbitope)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
SCIP_RETCODE SCIPsetConshdlrResprop(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSRESPROP((*consresprop)))
struct SCIP_ConsData SCIP_CONSDATA
static SCIP_RETCODE propagatePackingPartitioningCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *infeasible, int *nfixedvars)
int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
#define SCIPallocBufferArray(scip, ptr, num)
static SCIP_DECL_CONSHDLRCOPY(conshdlrCopyOrbitope)
static SCIP_RETCODE consdataCreate(SCIP *scip, SCIP_CONSDATA **consdata, SCIP_VAR ***vars, int nspcons, int nblocks, SCIP_ORBITOPETYPE orbitopetype, SCIP_Bool resolveprop)
SCIP_RETCODE SCIPcreateEmptyRowCons(SCIP *scip, SCIP_ROW **row, SCIP_CONSHDLR *conshdlr, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
SCIP_SETPPCTYPE SCIPgetTypeSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPvarGetLbAtIndex(SCIP_VAR *var, SCIP_BDCHGIDX *bdchgidx, SCIP_Bool after)
static SCIP_DECL_CONSDELETE(consDeleteOrbitope)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
#define CONSHDLR_PRESOLTIMING
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
SCIP_RETCODE SCIPfixVar(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval, SCIP_Bool *infeasible, SCIP_Bool *fixed)
SCIP_RETCODE SCIPsetConshdlrPrint(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRINT((*consprint)))
static SCIP_DECL_CONSLOCK(consLockOrbitope)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
#define DEFAULT_SEPAFULLORBITOPE
SCIP_Bool SCIPinProbing(SCIP *scip)
SCIP_VAR ** SCIPgetVarsSetppc(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVars(SCIP *scip)
static SCIP_RETCODE propagateCons(SCIP *scip, SCIP_CONS *cons, SCIP_Bool *infeasible, int *nfixedvars)
static SCIP_DECL_CONSTRANS(consTransOrbitope)
static SCIP_DECL_CONSCHECK(consCheckOrbitope)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
static SCIP_RETCODE separateConstraints(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_CONS **conss, int nconss, int nusefulconss, SCIP_SOL *sol, SCIP_RESULT *result)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
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_CONSDATA * SCIPconsGetData(SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsBasicOrbitope(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR ***vars, SCIP_ORBITOPETYPE orbitopetype, int nspcons, int nblocks, SCIP_Bool resolveprop)
SCIP_Bool SCIPallowDualReds(SCIP *scip)
#define CONSHDLR_MAXPREROUNDS
SCIP_RETCODE SCIPsetConshdlrPresol(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPRESOL((*conspresol)), int maxprerounds, SCIP_PRESOLTIMING presoltiming)
static SCIP_RETCODE strenghtenOrbitopeConstraint(SCIP *scip, SCIP_VAR ***vars, int *nrows, int ncols, SCIP_ORBITOPETYPE *type)
static SCIP_RETCODE checkFullOrbitopeSolution(SCIP *scip, SCIP_CONS *cons, SCIP_SOL *sol, SCIP_Bool printreason, SCIP_Bool *feasible)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_RETCODE SCIPaddVarsToRow(SCIP *scip, SCIP_ROW *row, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
SCIP_RETCODE SCIPsetConshdlrGetNVars(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSGETNVARS((*consgetnvars)))
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
static SCIP_RETCODE consdataFree(SCIP *scip, SCIP_CONSDATA **consdata)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
int SCIPvarGetIndex(SCIP_VAR *var)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
struct SCIP_ConshdlrData SCIP_CONSHDLRDATA
static SCIP_DECL_CONSRESPROP(consRespropOrbitope)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
static SCIP_DECL_CONSGETNVARS(consGetNVarsOrbitope)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
#define CONSHDLR_EAGERFREQ
SCIP_RETCODE SCIPinferBinvarCons(SCIP *scip, SCIP_VAR *var, SCIP_Bool fixedval, SCIP_CONS *infercons, int inferinfo, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_RETCODE SCIPcheckSolutionOrbisack(SCIP *scip, SCIP_SOL *sol, SCIP_VAR **vars1, SCIP_VAR **vars2, int nrows, SCIP_Bool printreason, SCIP_Bool *feasible)
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)
#define CONSHDLR_DELAYSEPA
SCIP_Bool SCIPvarIsActive(SCIP_VAR *var)
static SCIP_DECL_CONSSEPALP(consSepalpOrbitope)
SCIP_Bool SCIPvarIsNegated(SCIP_VAR *var)
#define SCIPreallocBufferArray(scip, ptr, num)
SCIP_RETCODE SCIPsetConshdlrProp(SCIP *scip, SCIP_CONSHDLR *conshdlr, SCIP_DECL_CONSPROP((*consprop)), int propfreq, SCIP_Bool delayprop, SCIP_PROPTIMING proptiming)