114#define SYMHDLR_NAME "orbitopalreduction"
117#define EVENTHDLR_NAME "symmetry_orbitopal_eventhdlr"
118#define EVENTHDLR_DESC "event handler for maintaining the branch-and-bound tree"
119#define DEFAULT_COLUMNORDERING SCIP_COLUMNORDERING_MEDIAN
145struct SCIP_OrbitopalReductionData
171 assert( orbireddata->conshdlr_nonlinear_checked );
254 assert( col1 < orbidata->ncols );
256 assert( col2 < orbidata->ncols );
259 for (
i = 0;
i < orbidata->
nrows; ++
i)
261 var1 = orbidata->
vars[
i * orbidata->
ncols + col1];
262 var2 = orbidata->
vars[
i * orbidata->
ncols + col2];
303 int* origequalcolids;
304 int norigequalcolids;
305 int middlecolumn = 0;
306 int positionorigcolidincolorder;
307 int positionswaporigcolidincolorder;
325 ncols = orbidata->
ncols;
335 thiscolswap->
from = 0;
342 if ( origcolid == INT_MAX )
344 thiscolswap->
from = 0;
349 assert( origcolid < ncols );
353 swaporigcolid = origcolid;
359 middlecolumn = ncols / 2;
364 for (
c = 0;
c < ncols; ++
c)
367 if (
c == origcolid )
377 if ( colorderinv[
c] >= colorderinv[swaporigcolid] )
382 if ( colorderinv[
c] <= colorderinv[swaporigcolid] )
387 if (
ABS(colorderinv[
c] - middlecolumn) >=
388 ABS(colorderinv[swaporigcolid] - middlecolumn) )
408 norigequalcolids = 0;
412#ifdef SCIP_MORE_DEBUG
413 SCIPdebugMessage(
"Detect columns identical to original column %d: ", origcolid);
415 for (
c = 0;
c < ncols; ++
c)
418 if (
c == origcolid )
420 origequalcolids[norigequalcolids++] =
c;
421#ifdef SCIP_MORE_DEBUG
424 assert( norigequalcolids <= ncols );
433 origequalcolids[norigequalcolids++] =
c;
434#ifdef SCIP_MORE_DEBUG
437 assert( norigequalcolids <= ncols );
439#ifdef SCIP_MORE_DEBUG
444 assert( norigequalcolids >= 1 );
451 SCIPsortInd(origequalcolids, SCIPsortArgsortInt, colorderinv, norigequalcolids);
453 swaporigcolid = origequalcolids[norigequalcolids / 2];
467 thiscolswap->
from = swaporigcolid;
468 thiscolswap->
to = origcolid;
471 if ( swaporigcolid == origcolid )
478 var1 = orbidata->
vars[
i * ncols + swaporigcolid];
479 var2 = orbidata->
vars[
i * ncols + origcolid];
488 positionorigcolidincolorder = colorderinv[origcolid];
489 assert( positionorigcolidincolorder >= 0 );
490 assert( positionorigcolidincolorder < ncols );
491 assert( colorder[positionorigcolidincolorder] == origcolid );
494 positionswaporigcolidincolorder = colorderinv[swaporigcolid];
495 assert( positionswaporigcolidincolorder >= 0 );
496 assert( positionswaporigcolidincolorder < ncols );
497 assert( colorder[positionswaporigcolidincolorder] == swaporigcolid );
499 SCIPdebugMessage(
"Orbitope %p: Swapping column %d (at position %d) with column %d (at position %d)\n",
500 (
void*) orbidata, origcolid, positionorigcolidincolorder, swaporigcolid, positionswaporigcolidincolorder);
503 colorder[positionswaporigcolidincolorder] = origcolid;
504 colorder[positionorigcolidincolorder] = swaporigcolid;
505 colorderinv[origcolid] = positionswaporigcolidincolorder;
506 colorderinv[swaporigcolid] = positionorigcolidincolorder;
583 *nselrows = orbidata->
nrows;
601 if ( ancestornodeinfo !=
NULL )
604 for (
i = ancestornodeinfo->
nrows - 1;
i >= 0; --
i)
606 (*roworder)[(*nselrows)++] = ancestornodeinfo->
rows[
i];
610 for (j = 0; j < (*nselrows) - 1; ++j)
612 assert( ancestornodeinfo->
rows[
i] != (*roworder)[j] );
623 for (
i = 0;
i < (*nselrows) / 2; ++
i)
627 (*roworder)[
i] = (*roworder)[(*nselrows) - 1 -
i];
628 (*roworder)[(*nselrows) - 1 -
i] = j;
660 while ( node !=
NULL )
663 rootedpath[
i--] = node;
670 node = rootedpath[
i];
679 if ( ancestornodeinfo ==
NULL )
685 for (j = 0; j < ancestornodeinfo->
ncolswaps; ++j)
687 int positionfromincolorder;
688 int positiontoincolorder;
690 thiscolswap = &ancestornodeinfo->
colswaps[j];
696 positionfromincolorder = colorderinv[thiscolswap->
from];
697 assert( positionfromincolorder >= 0 );
698 assert( positionfromincolorder < orbidata->ncols );
699 assert( colorder[positionfromincolorder] == thiscolswap->
from );
702 positiontoincolorder = colorderinv[thiscolswap->
to];
703 assert( positiontoincolorder >= 0 );
704 assert( positiontoincolorder < orbidata->ncols );
705 assert( colorder[positiontoincolorder] == thiscolswap->
to );
708 colorder[positiontoincolorder] = thiscolswap->
from;
709 colorder[positionfromincolorder] = thiscolswap->
to;
710 colorderinv[thiscolswap->
from] = positiontoincolorder;
711 colorderinv[thiscolswap->
to] = positionfromincolorder;
765 for (
c = 0;
c < nchildren; ++
c)
767 childnode = children[
c];
772 for (
i = 0;
i < nboundchgs; ++
i)
790 if ( nbranchvars > 0 )
792 for (j = 0; j < nbranchvars; ++j)
794 if ( branchvars[j] ==
var )
800 if ( j < nbranchvars )
805 if ( nbranchvars >= maxnbranchvars )
807 assert( nbranchvars == maxnbranchvars );
808 assert( maxnbranchvars > 0 );
812 assert( nbranchvars < maxnbranchvars );
813 branchvars[nbranchvars++] =
var;
818 if ( nbranchvars <= 0 )
826 newnodeinfo->
nrows = 0;
842 for (
i = 0;
i < nbranchvars; ++
i)
854 for (j = 0; j < nselrows; ++j)
856 if ( rowid == roworder[j] )
866 roworder[nselrows++] = rowid;
878 newnodeinfo->
nrows, newnodeinfo->
nrows + 1) );
880 newnodeinfo->
rows[newnodeinfo->
nrows++] = rowid;
899 for (
i = 0;
i < orbidata->
ncols; ++
i)
903 for (
i = 0;
i < orbidata->
ncols; ++
i)
917 for (
i = 0;
i < nbranchvars; ++
i)
920 colorderinv, branchvars[
i], &tmpcolswap) );
923 if ( tmpcolswap.
from == tmpcolswap.
to )
939 thiscolswap->
from = tmpcolswap.
from;
940 thiscolswap->
to = tmpcolswap.
to;
972 return eventExecNodeBranched(
scip, eventhdlr, event, eventdata);
1009 for (
c = 1;
c < orbidata->
ncols; ++
c)
1039 assert( (*orbidata)->nrows > 0 );
1040 assert( (*orbidata)->ncols > 0 );
1041 assert( (*orbidata)->nrows * (*orbidata)->ncols > 0 );
1053 for (
i = 0;
i < nentries; ++
i)
1059 if ( nodeinfo ==
NULL )
1081 nelem = (*orbidata)->nrows * (*orbidata)->ncols;
1083 for (
i = 0;
i < nelem; ++
i)
1122 nelem =
nrows * ncols;
1137 orbidata->
ncols = ncols;
1153 SCIPdebugMessage(
"Orbitope variables for (%dx%d) orbitope with orbidata %p\n",
nrows, ncols, (
void*) orbidata);
1156 for (
i = 0, rowid = 0, colid = 0;
i < nelem; ++
i, ++colid)
1158 if ( colid == ncols )
1212 hashGetKeyBnbnodeinfo, hashKeyEqBnbnodeinfo, hashKeyValBnbnodeinfo,
NULL) );
1216 assert( orbireddata->norbitopes >= 0 );
1217 assert( (orbireddata->norbitopes == 0) == (orbireddata->orbitopes ==
NULL) );
1218 assert( orbireddata->norbitopes <= orbireddata->maxnorbitopes );
1219 if ( orbireddata->norbitopes == orbireddata->maxnorbitopes )
1226 if ( orbireddata->norbitopes == 0 )
1235 orbireddata->maxnorbitopes = newsize;
1238 assert( orbireddata->norbitopes < orbireddata->maxnorbitopes );
1241 assert( orbireddata->norbitopes < orbireddata->maxnorbitopes );
1242 orbireddata->orbitopes[orbireddata->norbitopes++] = orbidata;
1307 *colorderinv =
NULL;
1310 ncols = orbidata->
ncols;
1317 for (
i = 0;
i < ncols; ++
i)
1321 for (
i = 0;
i < ncols; ++
i)
1322 (*colorderinv)[
i] =
i;
1371 assert( ncols <= orbidata->ncols );
1375 for (rowid = 0; rowid <
nrows; ++rowid)
1378 for (colid = 0; colid < ncols; ++colid)
1381 idx = rowid * ncols + colid;
1382 origidx = origrowid * ncols + origcolid;
1383 var = orbidata->
vars[origidx];
1390 for (colid = 0; colid < ncols - 1; ++colid)
1393 for (rowid = 0; rowid <
nrows; ++rowid)
1396 assert(
SCIPsymGE(
scip, matrix[rowid * ncols + colid], matrix[rowid * ncols + colid + 1]) );
1398 if (
SCIPsymGT(
scip, matrix[rowid * ncols + colid], matrix[rowid * ncols + colid + 1]) )
1411 assert(
SCIPsymEQ(
scip, matrix[rowid * ncols + colid], matrix[rowid * ncols + colid + 1]) );
1412 if ( addinfinitesimals
1413 ? (infinitesimal[colid] == rowid)
1414 : (infinitesimal[colid + 1] == rowid)
1435 unsigned int hash = 0;
1440 for (
i = 0;
i < len;
i++)
1442 hash ^= (
unsigned int) (array[
i]);
1443 hash = (hash << 1) ^ (hash >> 1);
1450#ifdef SCIP_MORE_DEBUG
1453void debugPrintMatrix(
1466 for (row = 0; row <
nrows; ++row)
1469 for (col = 0; col < ncols; ++col)
1493 int* lexminepsrow =
NULL;
1495 int* lexmaxepsrow =
NULL;
1519 *infeasible =
FALSE;
1523 ncols = orbidata->
ncols;
1527 if ( nselrows <= 0 )
1530#ifdef SCIP_MORE_DEBUG
1538 for (k = 0; k < ncols; ++k)
1544 for (
r = 0;
r < nselrows; ++
r)
1547 for (k = 0; k < ncols; ++k)
1549 thisvar = orbidata->
vars[roworder[
r] * ncols + colorder[k]];
1558 nelem = nselrows * ncols;
1565 for (colid = 0; colid < ncols; ++colid)
1566 lexminepsrow[colid] = -1;
1571 for (rowid = 0,
i = colid; rowid < nselrows; ++rowid,
i += ncols)
1574 origidx = origrowid * ncols + origcolid;
1575 var = orbidata->
vars[origidx];
1577 assert(
i == rowid * ncols + colid );
1583 for (colid = ncols - 2; colid >= 0; --colid)
1592 for (rowid = 0,
i = colid; rowid < nselrows; ++rowid,
i += ncols)
1595 origidx = origrowid * ncols + origcolid;
1596 assert(
i == rowid * ncols + colid );
1599 assert( (
i + 1) % ncols > 0 );
1601 var = orbidata->
vars[origidx];
1617 ( lexminepsrow[colid + 1] == rowid &&
SCIPsymEQ(
scip, ub, lexminface[
i + 1]) ) )
1623 if ( lastunfixed >= 0 )
1627 lexminface[lastunfixed * ncols + colid + 1]) );
1634 lexminface[lastunfixed * ncols + colid] += 1.0;
1642 assert( lexminepsrow[colid] == -1 );
1643 lexminepsrow[colid] = lastunfixed;
1647 rowid = lastunfixed;
1648 i = rowid * ncols + colid;
1655 SCIPdebugMessage(
"Cannot repair infeasibility for column %d (original: %d), min\n", colid, origcolid);
1664 lexminface[
i] =
MAX(lexminface[
i + 1], lb);
1670 else if ( lexminepsrow[colid + 1] == rowid )
1680 assert( lexminepsrow[colid] == -1 );
1681 lexminepsrow[colid] = rowid;
1692 lastunfixed = rowid;
1700 lastunfixed = rowid;
1722 for (colid = 0; colid < ncols; ++colid)
1723 lexmaxepsrow[colid] = -1;
1728 for (rowid = 0,
i = colid; rowid < nselrows; ++rowid,
i += ncols)
1731 origidx = origrowid * ncols + origcolid;
1732 var = orbidata->
vars[origidx];
1734 assert(
i == rowid * ncols + colid );
1740 for (colid = 1; colid < ncols; ++colid)
1749 for (rowid = 0,
i = colid; rowid < nselrows; ++rowid,
i += ncols)
1752 origidx = origrowid * ncols + origcolid;
1753 assert(
i == rowid * ncols + colid );
1758 var = orbidata->
vars[origidx];
1774 ( lexmaxepsrow[colid - 1] == rowid &&
SCIPsymEQ(
scip, lb, lexmaxface[
i - 1]) ) )
1780 if ( lastunfixed >= 0 )
1784 lexmaxface[lastunfixed * ncols + colid - 1]) );
1791 lexmaxface[lastunfixed * ncols + colid] -= 1.0;
1801 assert( lexmaxepsrow[colid] == -1 );
1802 lexmaxepsrow[colid] = lastunfixed;
1806 rowid = lastunfixed;
1807 i = rowid * ncols + colid;
1814 SCIPdebugMessage(
"Cannot repair infeasibility for column %d (original: %d), max\n", colid, origcolid);
1823 lexmaxface[
i] =
MIN(lexmaxface[
i - 1], ub);
1829 else if ( lexmaxepsrow[colid - 1] == rowid )
1839 assert( lexmaxepsrow[colid] == -1 );
1840 lexmaxepsrow[colid] = rowid;
1851 lastunfixed = rowid;
1859 lastunfixed = rowid;
1876#ifdef SCIP_MORE_DEBUG
1879 debugPrintMatrix(lexminface, nselrows, ncols);
1881 debugPrintMatrix(lexmaxface, nselrows, ncols);
1885 for (colid = 0; colid < ncols; ++colid)
1887 for (rowid = 0,
i = colid; rowid < nselrows; ++rowid,
i += ncols)
1889 assert(
i == rowid * ncols + colid );
1894 origidx = origrowid * ncols + origcolid;
1895 var = orbidata->
vars[origidx];
1903 SCIPdebugMessage(
"Fixing variable LB %12s (%3d,%3d) to %5.2f\n",
var->name, rowid, colid, lexminface[
i]);
1908 SCIPdebugMessage(
"Fixing variable LB %12s (%3d,%3d) to %5.2f (no success)\n",
var->name, rowid, colid,
1913 SCIPdebugMessage(
"Detected infeasibility fixing variable %12s (%3d,%3d) to %5.2f\n",
1914 var->name, rowid, colid, lexminface[
i]);
1921 SCIPdebugMessage(
"Fixing variable UB %12s (%3d,%3d) to %5.2f\n",
var->name, rowid, colid, lexminface[
i]);
1926 SCIPdebugMessage(
"Fixing variable UB %12s (%3d,%3d) to %5.2f (no success)\n",
var->name, rowid, colid,
1931 SCIPdebugMessage(
"Detected infeasibility fixing variable %12s (%3d,%3d) to %5.2f\n",
1932 var->name, rowid, colid, lexminface[
i]);
1945 SCIPdebugMessage(
"Restricting variable LB %12s (%3d,%3d) to %5.2f\n",
var->name, rowid, colid,
1951 SCIPdebugMessage(
"Restricting variable LB %12s (%3d,%3d) to %5.2f (no success)\n",
var->name,
1952 rowid, colid, lexminface[
i]);
1956 SCIPdebugMessage(
"Detected infeasibility restricting variable LB %12s (%3d,%3d) to %5.2f\n",
1957 var->name, rowid, colid, lexminface[
i]);
1965 SCIPdebugMessage(
"Restricting variable UB %12s (%3d,%3d) to %5.2f\n",
var->name, rowid, colid,
1971 SCIPdebugMessage(
"Restricting variable UB %12s (%3d,%3d) to %5.2f (no success)\n",
var->name,
1972 rowid, colid, lexmaxface[
i]);
1976 SCIPdebugMessage(
"Detected infeasibility restricting variable UB %12s (%3d,%3d) to %5.2f\n",
1977 var->name, rowid, colid, lexmaxface[
i]);
2016 *infeasible =
FALSE;
2028 if ( nselrows == 0 )
2040 int hash = colhash ^ rowhash;
2043 SCIPdebugPrintf(
"Col hash %32d; Row hash %32d; Hash %32d\n", colhash, rowhash, hash);
2047 while ( tmpnode !=
NULL )
2049 int nbranchings, nconsprop, nprop;
2074#ifdef SCIP_MORE_DEBUG
2099 *nred = orbireddata->nred;
2100 *ncutoff = orbireddata->ncutoff;
2117 if ( orbireddata->norbitopes == 0 )
2124 " orbitopal reduction: %4d components: ", orbireddata->norbitopes);
2125 for (
i = 0;
i < orbireddata->norbitopes; ++
i)
2130 "%dx%d", orbireddata->orbitopes[
i]->nrows, orbireddata->orbitopes[
i]->ncols);
2154 assert( (orbireddata->orbitopes ==
NULL) == (orbireddata->norbitopes == 0) );
2155 assert( orbireddata->norbitopes >= 0 );
2156 assert( orbireddata->norbitopes <= orbireddata->maxnorbitopes );
2161 *infeasible =
FALSE;
2166 if ( orbireddata->norbitopes == 0 )
2181 for (
c = 0;
c < orbireddata->norbitopes; ++
c)
2183 orbidata = orbireddata->orbitopes[
c];
2187 SCIPdebugMessage(
"Found %d reductions during orbitopal reduction for orbitope %d\n", thisfixedvars,
c);
2188 *nred += thisfixedvars;
2196 SCIPdebugMessage(
"Detected infeasibility during orbitopal reduction for orbitope %d\n",
c);
2201 orbireddata->nred += *nred;
2203 ++orbireddata->ncutoff;
2230 if ( !orbireddata->conshdlr_nonlinear_checked )
2233 orbireddata->conshdlr_nonlinear_checked =
TRUE;
2251 assert( orbireddata->norbitopes >= 0 );
2252 assert( (orbireddata->norbitopes == 0) == (orbireddata->orbitopes ==
NULL) );
2253 assert( orbireddata->norbitopes <= orbireddata->maxnorbitopes );
2257 while (orbireddata->norbitopes > 0)
2261 assert( orbireddata->norbitopes == 0 );
2263 orbireddata->orbitopes =
NULL;
2264 orbireddata->maxnorbitopes = 0;
2309 "The column ordering variant, respects enum SCIP_ColumnOrdering.",
2317 (*orbireddata)->eventhdlr = eventhdlr;
2320 (*orbireddata)->orbitopes =
NULL;
2321 (*orbireddata)->norbitopes = 0;
2322 (*orbireddata)->maxnorbitopes = 0;
2325 (*orbireddata)->conshdlr_nonlinear =
NULL;
2326 (*orbireddata)->conshdlr_nonlinear_checked =
FALSE;
2329 (*orbireddata)->nred = 0;
2330 (*orbireddata)->ncutoff = 0;
2343 return orbireddata->defaultcolumnordering;
#define SCIPcheckStage(scip, method, init, problem, transforming, transformed, initpresolve, presolving, exitpresolve, presolved, initsolve, solving, solved, exitsolve, freetrans, freescip)
SCIP_Bool SCIPisTransformed(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
int SCIPhashmapGetImageInt(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
SCIP_Bool SCIPhashmapExists(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapInsertInt(SCIP_HASHMAP *hashmap, void *origin, int image)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
int SCIPhashtableGetNEntries(SCIP_HASHTABLE *hashtable)
SCIP_RETCODE SCIPhashtableSafeInsert(SCIP_HASHTABLE *hashtable, void *element)
void * SCIPhashtableGetEntry(SCIP_HASHTABLE *hashtable, int entryidx)
SCIP_RETCODE SCIPhashtableCreate(SCIP_HASHTABLE **hashtable, BMS_BLKMEM *blkmem, int tablesize, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr)
void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
int SCIPconshdlrGetNActiveConss(SCIP_CONSHDLR *conshdlr)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
SCIP_EVENTHDLR * SCIPfindEventhdlr(SCIP *scip, const char *name)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_RETCODE SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_NODE * SCIPeventGetNode(SCIP_EVENT *event)
SCIP_RETCODE SCIPdropEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
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 SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPfreeBufferArrayNull(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
void SCIPnodeGetNDomchg(SCIP_NODE *node, int *nbranchings, int *nconsprop, int *nprop)
SCIP_DOMCHG * SCIPnodeGetDomchg(SCIP_NODE *node)
SCIP_Longint SCIPnodeGetNumber(SCIP_NODE *node)
SCIP_NODE * SCIPnodeGetParent(SCIP_NODE *node)
int SCIPnodeGetDepth(SCIP_NODE *node)
SCIP_Bool SCIPinProbing(SCIP *scip)
SCIP_Longint SCIPgetNNodes(SCIP *scip)
SCIP_Bool SCIPsymGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPsymEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPsymLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_VARTYPE SCIPgetSymInferredVarType(SCIP_VAR *var)
SCIP_Bool SCIPsymGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPsymLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisIntegral(SCIP *scip, SCIP_Real val)
SCIP_RETCODE SCIPgetChildren(SCIP *scip, SCIP_NODE ***children, int *nchildren)
SCIP_NODE * SCIPgetFocusNode(SCIP *scip)
SCIP_NODE * SCIPgetCurrentNode(SCIP *scip)
SCIP_RETCODE SCIPtightenVarLb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
SCIP_VAR * SCIPboundchgGetVar(SCIP_BOUNDCHG *boundchg)
SCIP_BOUNDCHG * SCIPdomchgGetBoundchg(SCIP_DOMCHG *domchg, int pos)
SCIP_BOUNDCHGTYPE SCIPboundchgGetBoundchgtype(SCIP_BOUNDCHG *boundchg)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Bool SCIPvarIsTransformed(SCIP_VAR *var)
SCIP_RETCODE SCIPtightenVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound, SCIP_Bool force, SCIP_Bool *infeasible, SCIP_Bool *tightened)
int SCIPdomchgGetNBoundchgs(SCIP_DOMCHG *domchg)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPmarkDoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPallowStrongDualReds(SCIP *scip)
void SCIPsortInd(int *indarray, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len)
assert(minobj< SCIPgetCutoffbound(scip))
memory allocation routines
public methods for managing constraints
public methods for message output
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 problem copies
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 the probing mode
public methods for solutions
public methods for SCIP variables
SCIP_HASHMAP * rowindexmap
SCIP_Longint lastnodenumber
SCIP_HASHTABLE * nodeinfos
SCIP_ROWORDERING rowordering
SCIP_HASHMAP * colindexmap
SCIP_COLUMNORDERING columnordering
datastructures for block memory pools and memory buffers
SCIP main data structure.
data structures for branch and bound tree
datastructures for problem variables
methods for handling symmetries
static SCIP_RETCODE propagateStaticOrbitope(SCIP *scip, ORBITOPEDATA *orbidata, int *roworder, int nselrows, int *colorder, SCIP_Bool *infeasible, int *nfixedvars)
static SCIP_RETCODE getRowOrder(SCIP *scip, ORBITOPEDATA *orbidata, SCIP_NODE *node, int **roworder, int *nselrows)
static SCIP_RETCODE populateRootedPathColumnOrder(ORBITOPEDATA *orbidata, SCIP_NODE *node, SCIP_NODE **rootedpath, int *colorder, int *colorderinv)
static SCIP_RETCODE freeOrbitope(SCIP *scip, SCIP_ORBITOPALREDDATA *orbireddata, ORBITOPEDATA **orbidata)
static int debugGetArrayHash(int *array, int len)
static void freeColumnOrder(SCIP *scip, ORBITOPEDATA *orbidata, int **colorder, int **colorderinv)
SCIP_RETCODE SCIPincludeOrbitopalReduction(SCIP *scip, SCIP_ORBITOPALREDDATA **orbireddata)
struct OrbitopeData ORBITOPEDATA
SCIP_RETCODE SCIPorbitopalReductionFree(SCIP *scip, SCIP_ORBITOPALREDDATA **orbireddata)
SCIP_RETCODE SCIPorbitopalReductionReset(SCIP *scip, SCIP_ORBITOPALREDDATA *orbireddata)
static SCIP_RETCODE propagateOrbitope(SCIP *scip, ORBITOPEDATA *orbidata, SCIP_Bool *infeasible, int *nfixedvars)
SCIP_RETCODE SCIPorbitopalReductionAddOrbitope(SCIP *scip, SCIP_ORBITOPALREDDATA *orbireddata, SCIP_ROWORDERING rowordering, SCIP_COLUMNORDERING colordering, SCIP_VAR **vars, int nrows, int ncols, SCIP_Bool *success)
static SCIP_Bool rowIsBranchRow(SCIP *scip, SCIP_ORBITOPALREDDATA *orbireddata, ORBITOPEDATA *orbidata, int rowid)
SCIP_RETCODE SCIPorbitopalReductionPropagate(SCIP *scip, SCIP_ORBITOPALREDDATA *orbireddata, SCIP_Bool *infeasible, int *nred, SCIP_Bool *didrun)
static void freeRowOrder(SCIP *scip, ORBITOPEDATA *orbidata, int **roworder)
SCIP_RETCODE SCIPorbitopalReductionGetStatistics(SCIP *scip, SCIP_ORBITOPALREDDATA *orbireddata, int *nred, int *ncutoff)
struct BnbNodeInfo BNBNODEINFO
static SCIP_RETCODE updateColumnOrderWhenBranchingOnColumn(SCIP *scip, ORBITOPEDATA *orbidata, int *colorder, int *colorderinv, SCIP_VAR *var, COLSWAP *thiscolswap)
static SCIP_RETCODE addOrbitope(SCIP *scip, SCIP_ORBITOPALREDDATA *orbireddata, SCIP_ROWORDERING rowordering, SCIP_COLUMNORDERING colordering, SCIP_VAR **vars, int nrows, int ncols, SCIP_Bool *success)
SCIP_RETCODE SCIPorbitopalReductionPrintStatistics(SCIP *scip, SCIP_ORBITOPALREDDATA *orbireddata)
static SCIP_Bool testColumnsAreSymmetricallyEquivalent(SCIP *scip, ORBITOPEDATA *orbidata, int col1, int col2)
static SCIP_RETCODE getColumnOrder(SCIP *scip, ORBITOPEDATA *orbidata, SCIP_NODE *eventnode, int **colorder, int **colorderinv)
SCIP_COLUMNORDERING SCIPorbitopalReductionGetDefaultColumnOrdering(SCIP_ORBITOPALREDDATA *orbireddata)
static SCIP_Bool vartypeIsBranchRowType(SCIP_ORBITOPALREDDATA *orbireddata, SCIP_VAR *var)
static int getArrayEntryOrIndex(int *arr, int idx)
#define DEFAULT_COLUMNORDERING
static void assertIsOrbitopeMatrix(SCIP *scip, ORBITOPEDATA *orbidata, int *roworder, int *colorder, SCIP_Real *matrix, int nrows, int ncols, int *infinitesimal, SCIP_Bool addinfinitesimals)
@ SCIP_COLUMNORDERING_CENTRE
@ SCIP_COLUMNORDERING_FIRST
@ SCIP_COLUMNORDERING_NONE
@ SCIP_COLUMNORDERING_LAST
@ SCIP_COLUMNORDERING_MEDIAN
enum SCIP_ColumnOrdering SCIP_COLUMNORDERING
@ SCIP_ROWORDERING_BRANCHING
struct SCIP_OrbitopalReductionData SCIP_ORBITOPALREDDATA
enum SCIP_RowOrdering SCIP_ROWORDERING
struct SCIP_Conshdlr SCIP_CONSHDLR
struct SCIP_Eventhdlr SCIP_EVENTHDLR
struct SCIP_EventData SCIP_EVENTDATA
#define SCIP_DECL_EVENTEXEC(x)
#define SCIP_EVENTTYPE_NODEBRANCHED
struct SCIP_HashMap SCIP_HASHMAP
#define SCIP_DECL_HASHKEYEQ(x)
#define SCIP_DECL_HASHGETKEY(x)
#define SCIP_DECL_HASHKEYVAL(x)
struct SCIP_HashTable SCIP_HASHTABLE
enum SCIP_Retcode SCIP_RETCODE
type definitions for symmetry computations
struct SCIP_Node SCIP_NODE
type definitions for problem variables
union SCIP_DomChg SCIP_DOMCHG
struct SCIP_BoundChg SCIP_BOUNDCHG
@ SCIP_BOUNDCHGTYPE_BRANCHING