141#define PROP_NAME "symmetry"
142#define PROP_DESC "propagator for handling symmetry"
143#define PROP_TIMING SCIP_PROPTIMING_BEFORELP
144#define PROP_PRIORITY -1000000
146#define PROP_DELAY FALSE
148#define PROP_PRESOL_PRIORITY -10000000
149#define PROP_PRESOLTIMING SCIP_PRESOLTIMING_EXHAUSTIVE
150#define PROP_PRESOL_MAXROUNDS -1
154#define DEFAULT_MAXGENERATORS 1500
155#define DEFAULT_CHECKSYMMETRIES FALSE
156#define DEFAULT_DISPLAYNORBITVARS FALSE
157#define DEFAULT_USECOLUMNSPARSITY FALSE
158#define DEFAULT_DOUBLEEQUATIONS FALSE
159#define DEFAULT_COMPRESSSYMMETRIES TRUE
160#define DEFAULT_COMPRESSTHRESHOLD 0.5
161#define DEFAULT_SYMFIXNONBINARYVARS FALSE
162#define DEFAULT_ENFORCECOMPUTESYMMETRY FALSE
163#define DEFAULT_SYMTYPE (int) SYM_SYMTYPE_PERM
166#define DEFAULT_CONSSADDLP TRUE
167#define DEFAULT_ADDSYMRESACKS TRUE
168#define DEFAULT_DETECTDOUBLELEX TRUE
169#define DEFAULT_DETECTORBITOPES TRUE
170#define DEFAULT_DETECTSUBGROUPS TRUE
171#define DEFAULT_ADDWEAKSBCS TRUE
172#define DEFAULT_ADDSTRONGSBCS FALSE
173#define DEFAULT_ADDCONSSTIMING 2
174#define DEFAULT_MAXNCONSSSUBGROUP 500000
175#define DEFAULT_USEDYNAMICPROP TRUE
176#define DEFAULT_PREFERLESSROWS TRUE
179#define DEFAULT_SYMCOMPTIMING 2
180#define DEFAULT_PERFORMPRESOLVING 0
181#define DEFAULT_RECOMPUTERESTART 0
184#define DEFAULT_SSTTIEBREAKRULE 1
185#define DEFAULT_SSTLEADERRULE 0
186#define DEFAULT_SSTLEADERVARTYPE 14
188#define DEFAULT_ADDCONFLICTCUTS TRUE
189#define DEFAULT_SSTADDCUTS TRUE
190#define DEFAULT_SSTMIXEDCOMPONENTS TRUE
193#define TABLE_NAME_SYMMETRY "symmetry"
194#define TABLE_DESC_SYMMETRY "symmetry handling statistics"
195#define TABLE_POSITION_SYMMETRY 7001
196#define TABLE_EARLIEST_SYMMETRY SCIP_STAGE_SOLVING
200#define MAXGENNUMERATOR 64000000
201#define COMPRESSNVARSLB 25000
202#define DEFAULT_NAUTYMAXNCELLS 100000
204#define DEFAULT_NAUTYMAXNNODES 10000000
209#define ISSYMRETOPESACTIVE(x) (((unsigned) x & SYM_HANDLETYPE_SYMBREAK) != 0)
210#define ISORBITALREDUCTIONACTIVE(x) (((unsigned) x & SYM_HANDLETYPE_ORBITALREDUCTION) != 0)
211#define ISSSTACTIVE(x) (((unsigned) x & SYM_HANDLETYPE_SST) != 0)
213#define ISSSTBINACTIVE(x) (((unsigned) x & SCIP_SSTTYPE_BINARY) != 0)
214#define ISSSTINTACTIVE(x) (((unsigned) x & SCIP_SSTTYPE_INTEGER) != 0)
215#define ISSSTIMPLINTACTIVE(x) (((unsigned) x & SCIP_SSTTYPE_IMPLINT) != 0)
216#define ISSSTCONTACTIVE(x) (((unsigned) x & SCIP_SSTTYPE_CONTINUOUS) != 0)
219#define SYMMETRY_STATISTICS 1
234 int nmovedbinpermvars;
235 int nmovedintpermvars;
236 int nmovedimplintpermvars;
237 int nmovedcontpermvars;
248 int* componentbegins;
252 unsigned* componentblocked;
294 int maxnconsssubgroup;
299 int recomputerestart;
309 int sstleadervartype;
325struct SCIP_ConflictData
330 int nconflictinorbit;
347 else if ( elem1 > elem2 )
385 cmp = compfunc(arr1[it1], arr2[it2]);
391 if ( ++it1 >= narr1 )
400 if ( ++it2 >= narr2 )
413 assert( it1 >= narr1 || it2 >= narr2 );
446 if ( perm[baseidx] == baseidx || covered[baseidx] )
453 covered[baseidx] =
TRUE;
454 while ( j != baseidx )
484 assert( propdata->nperms > 0 );
486 assert( propdata->npermvars > 0 );
489 npermvars = propdata->npermvars;
497 for (p = 0; p < propdata->nperms; ++p)
500 perm = propdata->perms[p];
502 for (
i = 0;
i < permlen; ++
i)
507 for (
i = 0;
i < permlen; ++
i)
535 assert( propdata->nperms > 0 );
537 assert( propdata->npermvars > 0 );
538 assert( propdata->ncomponents > 0 );
541 npermvars = propdata->npermvars;
546 for (
c = 0;
c < propdata->ncomponents; ++
c)
551 if ( propdata->componenthassignedperm[
c] )
556 comppermlen = propdata->componenthassignedperm[
c] ? 2 * npermvars : npermvars;
558 for (p = propdata->componentbegins[
c], cnt = 0; p < propdata->componentbegins[
c + 1]; ++p, ++cnt)
561 perm = propdata->perms[propdata->components[p]];
563 for (
i = 0;
i < comppermlen; ++
i)
568 for (
i = 0;
i < comppermlen; ++
i)
590 if ( propdata->nperms == -1 )
594 else if ( propdata->nperms == 0 )
598 else if ( propdata->ncomponents < 0 )
641 if ( tabledata->propdata->orbitopalreddata || tabledata->propdata->orbitalreddata
642 || tabledata->propdata->lexreddata )
645 if ( tabledata->propdata->orbitopalreddata )
649 " %10d cutoffs\n", nred, ncutoff);
651 if ( tabledata->propdata->orbitalreddata )
655 " %10d cutoffs\n", nred, ncutoff);
657 if ( tabledata->propdata->lexreddata )
661 " %10d cutoffs\n", nred, ncutoff);
663 if ( tabledata->propdata->shadowtreeeventhdlr )
784 if ( G1->
lhs[perm1] < G2->
lhs[perm2] )
786 if ( G1->
lhs[perm1] > G2->
lhs[perm2] )
789 if ( G1->
rhs[perm1] < G2->
rhs[perm2] )
791 if ( G1->
rhs[perm1] > G2->
rhs[perm2] )
859 assert( propdata->ngenlinconss == 0 );
860 assert( propdata->ngenorbconss == 0 );
861 assert( propdata->genorbconsssize == 0 );
862 assert( propdata->genlinconsssize == 0 );
866 assert( propdata->permvardomaincenter ==
NULL );
870 assert( propdata->npermvars == 0 );
871 assert( propdata->nbinpermvars == 0 );
872 assert( propdata->nperms == -1 || propdata->nperms == 0 );
873 assert( propdata->nmaxperms == 0 );
874 assert( propdata->nmovedpermvars == -1 );
875 assert( propdata->nmovedbinpermvars == 0 );
876 assert( propdata->nmovedintpermvars == 0 );
877 assert( propdata->nmovedimplintpermvars == 0 );
878 assert( propdata->nmovedcontpermvars == 0 );
879 assert( propdata->nmovedvars == -1 );
883 assert( propdata->componenthassignedperm ==
NULL );
887 assert( propdata->ncomponents == -1 );
888 assert( propdata->ncompblocked == 0 );
906 if ( propdata->orbitalreddata !=
NULL )
910 if ( propdata->orbitopalreddata !=
NULL )
914 if ( propdata->lexreddata !=
NULL )
937 if ( propdata->permvarmap !=
NULL )
943 for (
i = 0;
i < propdata->npermvars; ++
i)
950 if ( propdata->permstrans !=
NULL )
952 assert( propdata->nperms > 0 );
954 assert( propdata->npermvars > 0 );
955 assert( propdata->nmaxperms > 0 );
957 for (
i = 0;
i < propdata->npermvars; ++
i)
965 if ( propdata->genorbconss !=
NULL )
967 assert( propdata->ngenorbconss > 0 );
970 while ( propdata->ngenorbconss > 0 )
972 assert( propdata->genorbconss[propdata->ngenorbconss - 1] !=
NULL );
975 assert( propdata->ngenorbconss == 0 );
979 propdata->genorbconsssize = 0;
983 if ( propdata->genlinconss !=
NULL )
986 for (
i = 0;
i < propdata->ngenlinconss; ++
i)
994 propdata->ngenlinconss = 0;
995 propdata->genlinconsssize = 0;
998 if ( propdata->sstconss !=
NULL )
1000 assert( propdata->nsstconss > 0 );
1003 for (
i = 0;
i < propdata->nsstconss; ++
i)
1011 propdata->sstconss =
NULL;
1012 propdata->nsstconss = 0;
1013 propdata->maxnsstconss = 0;
1016 if ( propdata->leaders !=
NULL )
1018 assert( propdata->maxnleaders > 0 );
1021 propdata->maxnleaders = 0;
1022 propdata->leaders =
NULL;
1023 propdata->nleaders = 0;
1027 if ( propdata->ncomponents > 0 )
1029 assert( propdata->componentblocked !=
NULL );
1040 propdata->ncomponents = -1;
1041 propdata->ncompblocked = 0;
1045 if ( propdata->nperms > 0 )
1052 permlen = 2 * propdata->npermvars;
1054 permlen = propdata->npermvars;
1059 if ( propdata->perms !=
NULL )
1061 for (
i = 0;
i < propdata->nperms; ++
i)
1070 propdata->npermvars = 0;
1071 propdata->nbinpermvars = 0;
1072 propdata->nperms = -1;
1073 propdata->nmaxperms = 0;
1074 propdata->nmovedpermvars = -1;
1075 propdata->nmovedbinpermvars = 0;
1076 propdata->nmovedintpermvars = 0;
1077 propdata->nmovedimplintpermvars = 0;
1078 propdata->nmovedcontpermvars = 0;
1079 propdata->nmovedvars = -1;
1080 propdata->log10groupsize = -1.0;
1081 propdata->binvaraffected =
FALSE;
1082 propdata->isnonlinvar =
NULL;
1084 propdata->nperms = -1;
1088 propdata->computedsymmetry =
FALSE;
1089 propdata->compressed =
FALSE;
1100 int* consarrsizeptr,
1109 assert( consarrsizereq > 0 );
1110 assert( *consarrsizeptr >= 0 );
1111 assert( (*consarrsizeptr == 0) == (*consarrptr ==
NULL) );
1114 if ( consarrsizereq <= *consarrsizeptr )
1119 assert( newsize > *consarrsizeptr );
1122 if ( *consarrptr ==
NULL )
1131 *consarrsizeptr = newsize;
1179 *binvaraffected =
FALSE;
1180 *compressed =
FALSE;
1186 int* labelmovedvars;
1187 int* labeltopermvaridx;
1188 int nbinvarsaffected = 0;
1199 labelmovedvars[
i] = -1;
1201 for (p = 0; p < nperms; ++p)
1203 if ( perms[p][
i] !=
i )
1205 labeltopermvaridx[*nmovedvars] =
i;
1206 labelmovedvars[
i] = (*nmovedvars)++;
1215 if ( nbinvarsaffected > 0 )
1216 *binvaraffected =
TRUE;
1220 if ( *nmovedvars > 0 &&
SCIPisLE(
scip, percentagemovedvars, compressthreshold) )
1223 for (p = 0; p < nperms; ++p)
1226 for (
i = 0;
i < *nmovedvars; ++
i)
1228 assert(
i <= labeltopermvaridx[
i] );
1229 if ( perms[p][labeltopermvaridx[
i]] >=
nvars )
1235 imgvaridx = perms[p][labeltopermvaridx[
i]] -
nvars;
1236 perms[p][
i] = labelmovedvars[imgvaridx] + *nmovedvars;
1238 assert( 0 <= perms[p][
i] && perms[p][
i] < 2 * (*nmovedvars) );
1241 perms[p][
i] = labelmovedvars[perms[p][labeltopermvaridx[
i]]];
1256 for (
i = 0;
i < *nmovedvars; ++
i)
1258 (*permvars)[
i] =
vars[labeltopermvaridx[
i]];
1260 *npermvars = *nmovedvars;
1261 *nbinpermvars = nbinvarsaffected;
1274 for (p = 0; p < nperms && ! *binvaraffected; ++p)
1276 if ( perms[p][
i] !=
i )
1279 *binvaraffected =
TRUE;
1288 for (
i = 0;
i < *npermvars; ++
i)
1293 (*permvardomaincenter)[
i] = 0.5 * (ub + lb);
1334 for (
c = 0;
c < nconshdlrs; ++
c)
1336 conshdlr = conshdlrs[
c];
1349 " Symmetry detection interrupted: constraints of type %s do not provide symmetry information.\n"
1350 " If symmetries shall be detected, implement the %s callback.\n",
1392 "Computed symmetries might be incorrect if the expression uses different constants or assigns\n"
1429 *nconsnodes = nconss;
1434 for (
c = 0;
c < nconss; ++
c)
1462 depth = (int) log2((
double) num);
1463 expval = (int) exp2((
double) (
depth + 1));
1464 numnodes =
MIN(expval, 100);
1466 *nopnodes += numnodes;
1467 *nvalnodes +=
MAX((
int) 0.1 * numnodes, 1);
1482 *nopnodes += num - 1;
1491 if (
nvars <= 100000 )
1492 *nedges = 100 *
nvars;
1493 else if (
nvars <= 1000000 )
1494 *nedges = 32 *
nvars;
1495 else if (
nvars <= 16700000 )
1496 *nedges = 16 *
nvars;
1498 *nedges = INT_MAX / 10;
1526#ifdef SCIP_DISPLAY_SYM_CHECK
1543 assert( nsymvars == npermvars );
1547 for (
c = 0;
c < nconss; ++
c)
1570 for (
c = 0;
c < nconss; ++
c)
1575 SCIPsort(graphperm, SYMsortSymgraphs, graphs, nconss);
1578 for (
c = 1;
c < nconss; ++
c)
1581 groupbegins[ngroups++] =
c;
1583 groupbegins[ngroups] = nconss;
1586 for (
c = 0;
c < nconss; ++
c)
1591#ifdef SCIP_DISPLAY_SYM_CHECK
1597 for (p = 0; p < nperms; ++p)
1602#ifdef SCIP_DISPLAY_SYM_CHECK
1606 for (
i = 0;
i < permlen; ++
i)
1611 for (
i = 0;
i < permlen; ++
i)
1617 for (g = 0; g < ngroups; ++g)
1619 for (
c = groupbegins[g];
c < groupbegins[g+1]; ++
c)
1621#ifdef SCIP_DISPLAY_SYM_CHECK
1632#ifdef SCIP_DISPLAY_SYM_CHECK
1641 for (d = groupbegins[g]; d < groupbegins[g+1] && ! found; ++d)
1645#ifdef SCIP_DISPLAY_SYM_CHECK
1656#ifdef SCIP_DISPLAY_SYM_CHECK
1666#ifdef SCIP_DISPLAY_SYM_CHECK
1673 for (
c = nconss - 1;
c >= 0; --
c)
1740 *binvaraffected =
FALSE;
1741 *compressed =
FALSE;
1742 *log10groupsize = 0;
1768 nopnodes, nvalnodes, nconsnodes, nedges) );
1771 for (
c = 0;
c < nconss && *success; ++
c)
1806 perms, log10groupsize, symcodetime) );
1808 if ( checksymmetries && *nperms > 0 )
1823 permvardomaincenter, *perms, *nperms, nmovedvars, binvaraffected,
1824 compresssymmetries, compressthreshold, compressed) );
1848 for (v = 0; v <
nvars; ++v)
1851 if ( symmetry[v] >=
nvars )
1878 int* componentbegins;
1885 assert( propdata->ncomponents > 0 );
1890 componentbegins = propdata->componentbegins;
1891 ncomponents = propdata->ncomponents;
1900 for (
c = 0;
c < ncomponents; ++
c)
1902 for (
i = componentbegins[
c];
i < componentbegins[
c + 1]; ++
i)
1906 propdata->componenthassignedperm[
c] =
TRUE;
1926 assert( propdata->nperms >= 0 );
1929 if ( propdata->ncomponents >= 0 )
1933 assert( propdata->ncomponents == -1 );
1938#ifdef SCIP_OUTPUT_COMPONENT
1943 propdata->permvars, propdata->npermvars,
FALSE, &propdata->components, &propdata->componentbegins,
1944 &propdata->vartocomponent, &propdata->componentblocked, &propdata->ncomponents) );
1946#ifdef SCIP_OUTPUT_COMPONENT
1952 assert( propdata->ncomponents > 0 );
1956 assert( propdata->componenthassignedperm !=
NULL );
1975 assert( propdata->nperms >= 0 );
1978 if ( propdata->permvarmap !=
NULL )
1985 for (v = 0; v < propdata->npermvars; ++v)
2008 assert( propdata->nperms >= 0 );
2011 if ( propdata->permstrans !=
NULL )
2017 for (v = 0; v < propdata->npermvars; ++v)
2020 for (p = 0; p < propdata->nperms; ++p)
2021 propdata->permstrans[v][p] = propdata->perms[p][v];
2042 assert( propdata->nperms >= 0 );
2045 if ( propdata->nmovedpermvars >= 0 )
2047 assert( propdata->nmovedpermvars == -1 );
2049 propdata->nmovedpermvars = 0;
2050 propdata->nmovedbinpermvars = 0;
2051 propdata->nmovedintpermvars = 0;
2052 propdata->nmovedimplintpermvars = 0;
2053 propdata->nmovedcontpermvars = 0;
2055 for (v = 0; v < propdata->npermvars; ++v)
2057 for (p = 0; p < propdata->nperms; ++p)
2059 if ( propdata->perms[p][v] != v )
2061 ++propdata->nmovedpermvars;
2066 ++propdata->nmovedbinpermvars;
2069 ++propdata->nmovedintpermvars;
2072 ++propdata->nmovedimplintpermvars;
2075 ++propdata->nmovedcontpermvars;
2098 if ( propdata->enforcecomputesymmetry )
2151 unsigned int type = 0;
2157 assert( propdata->usesymmetry >= 0 );
2171 " Deactivated symmetry handling methods, since SCIP was built without symmetry detector (SYM=none).\n");
2199 if ( ! (type & symspecrequire) )
2202 " (%.1fs) symmetry computation skipped: type (bin %c, int %c, cont %c) does not match requirements (bin %c, int %c, cont %c).\n",
2215 if ( propdata->computedsymmetry )
2218 assert( propdata->npermvars == 0 );
2220 assert( propdata->nperms < 0 );
2221 assert( propdata->nmaxperms == 0 );
2226 " (%.1fs) symmetry computation started: requiring (bin %c, int %c, cont %c), (fixed: bin %c, int %c, cont %c)\n",
2233 (symspecrequirefixed & (
int)
SYM_SPEC_REAL) != 0 ?
'+' :
'-');
2236 if ( symspecrequire & symspecrequirefixed )
2240 maxgenerators = propdata->maxgenerators;
2245 propdata->compresssymmetries, propdata->compressthreshold,
2246 maxgenerators, symspecrequirefixed, propdata->checksymmetries, &propdata->permvars,
2247 &propdata->npermvars, &propdata->nbinpermvars, &propdata->permvardomaincenter,
2248 &propdata->perms, &propdata->nperms, &propdata->nmaxperms,
2249 &propdata->nmovedvars, &propdata->binvaraffected, &propdata->compressed,
2250 &propdata->log10groupsize, &symcodetime, &successful) );
2253 propdata->computedsymmetry =
TRUE;
2268 if ( propdata->nperms == 0 )
2275 assert( propdata->nperms > 0 );
2276 assert( propdata->npermvars > 0 );
2283 if ( maxgenerators == 0 )
2291 if ( propdata->displaynorbitvars )
2293 if ( propdata->nmovedvars == -1 )
2296 propdata->npermvars, &(propdata->nmovedvars)) );
2303 for (
i = 0;
i < propdata->npermvars; ++
i)
2339 int** orbitopevaridx,
2353 int ntestedperms = 0;
2365 assert( nactiveperms > 0 );
2366 assert( ntwocycles > 0 );
2368 assert( activevars ==
NULL || (0 <= nactiveperms && nactiveperms < npermvars) );
2371 if ( nusedcols !=
NULL )
2380 while ( ! foundperm )
2384 assert( ntestedperms < nactiveperms );
2386 permidx = activeperms[ntestedperms];
2388 for (j = 0; j < npermvars; ++j)
2390 if ( activevars !=
NULL && ! activevars[j] )
2393 assert( activevars ==
NULL || activevars[perms[permidx][j]] );
2396 if ( perms[permidx][j] > j )
2401 rowisbinary[row] =
TRUE;
2403 orbitopevaridx[row][0] = j;
2404 orbitopevaridx[row++][1] = perms[permidx][j];
2406 ++(nusedelems[perms[permidx][j]]);
2411 if ( row == ntwocycles )
2419 if ( row != ntwocycles )
2421 *isorbitope =
FALSE;
2426 usedperm[ntestedperms - 1] =
TRUE;
2436 for (j = ntestedperms; j < nactiveperms; ++j)
2441 if ( nusedperms == nactiveperms )
2448 perms[activeperms[j]],
TRUE, &nusedelems, permvars,
NULL, &success, &infeasible) );
2452 *isorbitope =
FALSE;
2459 coltoextend = nfilledcols;
2460 columnorder[nfilledcols++] = -1;
2465 if ( ! *isorbitope )
2472 for (j = ntestedperms; j < nactiveperms; ++j)
2477 if ( nusedperms == nactiveperms )
2484 perms[activeperms[j]],
FALSE, &nusedelems, permvars,
NULL, &success, &infeasible) );
2488 *isorbitope =
FALSE;
2495 coltoextend = nfilledcols;
2496 columnorder[nfilledcols] = 1;
2502 if ( activevars ==
NULL && nusedperms < nactiveperms )
2503 *isorbitope =
FALSE;
2505 if ( nusedcols !=
NULL )
2506 *nusedcols = nfilledcols;
2507 assert( ! *isorbitope || activevars ==
NULL || nusedperms < nfilledcols );
2526 int* componentbegins;
2535 assert( compidx < propdata->ncomponents );
2539 assert( propdata->computedsymmetry );
2540 assert( propdata->nperms > 0 );
2542 assert( propdata->npermvars > 0 );
2543 assert( propdata->ncomponents > 0 );
2547 perms = propdata->perms;
2548 npermvars = propdata->npermvars;
2550 componentbegins = propdata->componentbegins;
2551 npermsincomp = componentbegins[compidx + 1] - componentbegins[compidx];
2552 *ntwocycleperms = npermsincomp;
2556 for (
i = 0;
i < npermsincomp; ++
i)
2561 perm = perms[
components[componentbegins[compidx] +
i]];
2566 if ( ntwocycles[
i] == 0 )
2569 if ( propdata->preferlessrows )
2570 ntwocycles[
i] = npermvars;
2573 --(*ntwocycleperms);
2575 else if ( ! propdata->preferlessrows )
2576 ntwocycles[
i] = - ntwocycles[
i];
2600 int** graphcomponents,
2601 int** graphcompbegins,
2602 int** compcolorbegins,
2603 int* ngraphcomponents,
2616 int* componentbegins;
2617 int* componentslastperm;
2635 assert( usedpermssize > 0 );
2637 assert( ntwocycleperms >= 0 );
2639 assert( compidx < propdata->ncomponents );
2640 assert( propdata->computedsymmetry );
2641 assert( propdata->nperms > 0 );
2643 assert( propdata->npermvars > 0 );
2644 assert( propdata->ncomponents > 0 );
2647 assert( ! propdata->componentblocked[compidx] );
2649 perms = propdata->perms;
2650 npermvars = propdata->npermvars;
2652 componentbegins = propdata->componentbegins;
2655 assert( ntwocycleperms <= componentbegins[compidx + 1] - componentbegins[compidx] );
2661 for (k = 0; k < npermvars; ++k)
2662 componentslastperm[k] = -1;
2664 for (j = 0; j < ntwocycleperms; ++j)
2667 int firstcolor = -1;
2670 perm = perms[
components[componentbegins[compidx] + genorder[j]]];
2674 for (k = 0; k < npermvars; ++k)
2683 assert( perm[img] == k );
2691 if ( comp1 == comp2 )
2694 if ( firstcolor < 0 )
2699 componentslastperm[comp1] = j;
2706 if ( componentslastperm[comp1] == j || componentslastperm[comp2] == j )
2713 if ( color1 == color2 )
2716 componentslastperm[comp1] = j;
2717 componentslastperm[comp2] = j;
2719 if ( firstcolor < 0 )
2720 firstcolor = color1;
2724 if ( k < npermvars )
2728 if ( firstcolor == -1 )
2732 if ( *nusedperms >= usedpermssize )
2735 assert( newsize > usedpermssize );
2739 usedpermssize = newsize;
2742 (*usedperms)[*nusedperms] =
components[componentbegins[compidx] + genorder[j]];
2744 permused[genorder[j]] =
TRUE;
2747 for (k = 0; k < npermvars; ++k)
2756 assert( perm[img] == k );
2765 if ( comp1 == comp2 )
2771 if ( color1 != color2 )
2795 for (j = 0; j < npermvars; ++j)
2804 (*graphcomponents)[j] = j;
2808 SCIPsort(*graphcomponents, SYMsortGraphCompVars, (
void*) &graphcompvartype, npermvars);
2817 (*graphcompbegins)[0] = 0;
2818 (*compcolorbegins)[0] = 0;
2821 for (j = 1; j < npermvars; ++j)
2826 idx1 = (*graphcomponents)[j];
2827 idx2 = (*graphcomponents)[j-1];
2833 (*graphcompbegins)[nextcomp] = j;
2835 if ( graphcompvartype.
colors[idx1] > graphcompvartype.
colors[idx2] )
2837 (*compcolorbegins)[nextcolor] = nextcomp;
2844 assert( nextcomp == *ngraphcomponents );
2845 assert( nextcolor == *ncompcolors );
2847 (*compcolorbegins)[nextcolor] = *ngraphcomponents;
2848 (*graphcompbegins)[nextcomp] = npermvars;
2866 int* compcolorbegins,
2867 int* graphcompbegins,
2868 int* graphcomponents,
2873 int* compidxfirstrow,
2876 int* maxnvarslexorder,
2884 int** orbitopevaridx;
2891 int nactivevars = 0;
2902 assert( nusedperms > 0 );
2916 for (k = 0; k < nrows; ++k)
2923 for (k = 0; k < ncols; ++k)
2924 columnorder[k] = ncols + 1;
2930 for (k = compcolorbegins[graphcoloridx]; k < compcolorbegins[graphcoloridx+1]; ++k)
2936 compstart = graphcompbegins[k];
2937 firstvar = propdata->permvars[graphcomponents[compstart]];
2942 for (l = 0; l < ncols; ++l)
2946 varidx = graphcomponents[compstart + l];
2955 assert( nactivevars == nrows * ncols );
2967 propdata->perms, usedperms, nrows, nusedperms, orbitopevaridx, columnorder,
2968 nusedelems, &ngencols,
NULL, &isorbitope, activevars) );
2977 for (k = nrows - 1; k >= 0; --k)
2997 if ( firstvaridx !=
NULL )
2999 if ( columnorder[ngencols-1] > -1 )
3000 *firstvaridx = orbitopevaridx[0][ngencols-1];
3002 *firstvaridx = orbitopevaridx[0][1];
3006 if ( compidxfirstrow !=
NULL && firstvaridx !=
NULL )
3008 *compidxfirstrow = -1;
3010 for (k = compcolorbegins[graphcoloridx]; k < compcolorbegins[graphcoloridx+1] && (*compidxfirstrow) < 0; ++k)
3016 compstart = graphcompbegins[k];
3017 firstvar = propdata->permvars[graphcomponents[compstart]];
3025 for (l = 0; l < ncols; ++l)
3027 if ( graphcomponents[compstart + l] == *firstvaridx )
3029 *compidxfirstrow = k;
3034 assert( *compidxfirstrow > -1 );
3039 for (k = 0; k < nrows; ++k)
3046 propdata->permvars, propdata->npermvars, orbitopevaridx, columnorder,
3047 nusedelems,
NULL, &infeasible,
TRUE, lexorder, nvarslexorder, maxnvarslexorder) );
3050 assert( firstvaridx ==
NULL || propdata->permvars[*firstvaridx] == orbitopevarmatrix[0][0] );
3063 &propdata->genorbconsssize, propdata->ngenorbconss + 1) );
3064 propdata->genorbconss[propdata->ngenorbconss++] = cons;
3065 ++propdata->norbitopes;
3067 for (k = nrows - 1; k >= 0; --k)
3072 for (k = nrows - 1; k >= 0; --k)
3085 int* graphcompbegins,
3086 int* graphcomponents,
3100 assert( graphcompidx >= 0 );
3101 assert( ! storelexorder || lexorder !=
NULL );
3102 assert( ! storelexorder || nvarsorder !=
NULL );
3103 assert( ! storelexorder || maxnvarsorder !=
NULL );
3106 if ( storelexorder )
3108 if ( *maxnvarsorder == 0 )
3110 *maxnvarsorder = graphcompbegins[graphcompidx + 1] - graphcompbegins[graphcompidx + 1];
3117 assert( *nvarsorder == *maxnvarsorder );
3119 *maxnvarsorder += graphcompbegins[graphcompidx + 1] - graphcompbegins[graphcompidx + 1];
3124 (*lexorder)[*nvarsorder++] = graphcomponents[graphcompbegins[graphcompidx]];
3128 for (k = graphcompbegins[graphcompidx]+1; k < graphcompbegins[graphcompidx+1]; ++k)
3135 vars[0] = propdata->permvars[graphcomponents[k-1]];
3136 vars[1] = propdata->permvars[graphcomponents[k]];
3138 if ( storelexorder )
3139 (*lexorder)[*nvarsorder++] = graphcomponents[k];
3149#ifdef SCIP_MORE_DEBUG
3156 &propdata->genlinconsssize, propdata->ngenlinconss + 1) );
3157 propdata->genlinconss[propdata->ngenlinconss] = cons;
3158 ++propdata->ngenlinconss;
3169 int* compcolorbegins,
3170 int* graphcompbegins,
3171 int* graphcomponents,
3173 int* chosencomppercolor,
3174 int* firstvaridxpercolor,
3189 int orbitsize[2] = {1, 1};
3191 int chosencolor = -1;
3203 assert( symgrpcompidx >= 0 );
3204 assert( symgrpcompidx < propdata->ncomponents );
3205 assert( ! storelexorder || lexorder !=
NULL );
3206 assert( ! storelexorder || nvarsorder !=
NULL );
3207 assert( ! storelexorder || maxnvarsorder !=
NULL );
3217 if ( lexorder ==
NULL || *lexorder ==
NULL )
3220 varsinlexorder =
NULL;
3224 assert( *maxnvarsorder >= 0 );
3225 assert( *nvarsorder >= 0 );
3229 for (k = 0; k < *nvarsorder; ++k)
3233 assert((*lexorder)[k] >= 0);
3241 if ( ncompcolors > 0 )
3245 for (j = 0; j < ncompcolors; ++j)
3252 if ( chosencomppercolor[j] < 0 )
3255 assert( firstvaridxpercolor[j] >= 0 );
3257 graphcomp = chosencomppercolor[j];
3258 graphcompsize = graphcompbegins[graphcomp+1] - graphcompbegins[graphcomp];
3259 varidx = firstvaridxpercolor[j];
3264 if ( varfound[
varidx] || graphcompsize == propdata->npermvars )
3268 if ( varsinlexorder !=
NULL
3270 && lexorder !=
NULL && *lexorder !=
NULL && *maxnvarsorder > 0 && *nvarsorder > 0
3271 && (*lexorder)[0] !=
varidx )
3275 for (k = graphcompbegins[graphcomp]; k < graphcompbegins[graphcomp+1]; ++k)
3277 assert( 0 <= graphcomponents[k] && graphcomponents[k] < propdata->npermvars );
3279 usedvars[graphcomponents[k]] =
TRUE;
3283 propdata->permstrans, propdata->components, propdata->componentbegins,
3284 usedvars, varfound,
varidx, symgrpcompidx,
3285 orbit[activeorb], &orbitsize[activeorb]) );
3289 if ( orbitsize[activeorb] > orbitsize[1 - activeorb] )
3292 activeorb = 1 - activeorb;
3297 for (k = graphcompbegins[graphcomp]; k < graphcompbegins[graphcomp+1]; ++k)
3298 usedvars[graphcomponents[k]] =
FALSE;
3302 if ( chosencolor > -1 )
3305 activeorb = 1 - activeorb;
3307 assert( orbit[activeorb][0] == firstvaridxpercolor[chosencolor] );
3308 vars[0] = propdata->permvars[orbit[activeorb][0]];
3310 assert( chosencolor > -1 );
3311 SCIPdebugMsg(
scip,
" adding %d weak sbcs for enclosing orbit of color %d.\n", orbitsize[activeorb]-1, chosencolor);
3313 *naddedconss = orbitsize[activeorb] - 1;
3316 for (j = 1; j < orbitsize[activeorb]; ++j)
3321 vars[1] = propdata->permvars[orbit[activeorb][j]];
3331#ifdef SCIP_MORE_DEBUG
3338 &propdata->genlinconsssize, propdata->ngenlinconss + 1) );
3339 propdata->genlinconss[propdata->ngenlinconss] = cons;
3340 ++propdata->ngenlinconss;
3344 if ( storelexorder )
3348 varidx = orbit[activeorb][0];
3351 if ( *maxnvarsorder == 0 )
3357 (*lexorder)[(*nvarsorder)++] =
varidx;
3361 assert( *nvarsorder == *maxnvarsorder );
3367 if (
varidx == (*lexorder)[0] )
3384 for (k = *maxnvarsorder - 1; k >= 1; --k)
3385 (*lexorder)[k] = (*lexorder)[k - 1];
3397 if ( varsinlexorder !=
NULL )
3411 int** modifiedperms,
3442 for (
i = 0;
i < npermvars; ++
i)
3447 for (
i = 0;
i < npermvars; ++
i)
3448 posinpermvar[
i] =
i;
3452 for (l = 0; l < nleaders; ++l)
3454 leader = leaders[l];
3455 curposleader = posinpermvar[leader];
3456 varidx = permvaridx[curposleader];
3457 lidx = permvaridx[l];
3460 permvaridx[curposleader] = lidx;
3464 posinpermvar[lidx] = curposleader;
3465 posinpermvar[leader] = l;
3469 for (
i = 0;
i < npermvars; ++
i)
3470 modifiedpermvars[
i] = origpermvars[permvaridx[
i]];
3473 for (p = 0; p < nperms; ++p)
3475 for (
i = 0;
i < npermvars; ++
i)
3476 modifiedperms[p][
i] = posinpermvar[origperms[p][permvaridx[
i]]];
3492 int* graphcomponents,
3493 int* graphcompbegins,
3494 int* compcolorbegins,
3506 assert( ncompcolors >= 0 );
3507 assert( symcompsize > 0 );
3509 for (j = 0; j < ncompcolors; ++j)
3512 int largestcompsize = 0;
3517 if ( graphcompbegins[compcolorbegins[j+1]] - graphcompbegins[compcolorbegins[j]] < 2 )
3521 for (k = compcolorbegins[j]; k < compcolorbegins[j+1]; ++k)
3525 compsize = graphcompbegins[k+1] - graphcompbegins[k];
3528 if ( largestcompsize < 1 )
3533 largestcompsize = compsize;
3535 else if ( compsize != largestcompsize )
3538 firstvar = permvars[graphcomponents[graphcompbegins[k]]];
3546 if ( k == compcolorbegins[j+1] )
3552 ncols = graphcompbegins[compcolorbegins[j] + 1] - graphcompbegins[compcolorbegins[j]];
3554 threshold = 0.7 * (
SCIP_Real) symcompsize;
3557 if ( nbinrows <= 2 * ncols || (nbinrows <= 8 * ncols && nbinrows < 100) )
3558 multorbitopecriterion =
TRUE;
3559 else if ( nbinrows <= 3 * ncols || (
SCIP_Real) nbinrows * ncols >= threshold )
3560 oneorbitopecriterion =
TRUE;
3564 if ( (norbitopes == 1 && oneorbitopecriterion) || (norbitopes >= 2 && multorbitopecriterion) )
3583 int nstrongsbcs = 0;
3586 int** modifiedperms;
3588 int* nvarsincomponent;
3590 int* graphcomponents;
3591 int* graphcompbegins;
3592 int* compcolorbegins;
3593 int* chosencomppercolor =
NULL;
3594 int* firstvaridxpercolor =
NULL;
3597 int ngraphcomponents;
3602 int ntrivialcolors = 0;
3604 int* lexorder =
NULL;
3605 int nvarslexorder = 0;
3606 int maxnvarslexorder = 0;
3610 int norbitopesincomp;
3614 assert( propdata->computedsymmetry );
3615 assert( propdata->nperms >= 0 );
3616 assert( 0 <= cidx && cidx < propdata->ncomponents );
3621 if ( propdata->nperms == 0 || propdata->componentblocked[cidx] )
3628 assert( propdata->nperms > 0 );
3630 assert( propdata->npermvars > 0 );
3638 for (p = 0; p < propdata->nperms; ++p)
3645 for (p = 0; p < propdata->npermvars; ++p)
3647 if ( propdata->vartocomponent[p] >= 0 )
3648 ++nvarsincomponent[propdata->vartocomponent[p]];
3651 SCIPdebugMsg(
scip,
"starting subgroup detection routine for component %d\n", cidx);
3653 npermsincomp = propdata->componentbegins[cidx + 1] - propdata->componentbegins[cidx];
3656 for (j = 0; j < npermsincomp; ++j)
3661 assert( ntwocycleperms >= 0 );
3662 assert( ntwocycleperms <= npermsincomp );
3664 SCIPdebugMsg(
scip,
"component %d has %d permutations consisting of 2-cycles\n", cidx, ntwocycleperms);
3666#ifdef SCIP_MORE_DEBUG
3673 for (p = propdata->componentbegins[cidx]; p < propdata->componentbegins[cidx+1]; ++p)
3675 perm = propdata->components[p];
3677 for (k = 0; k < propdata->npermvars; ++k)
3682 for (k = 0; k < propdata->npermvars; ++k)
3687 j = propdata->perms[perm][k];
3699 j = propdata->perms[perm][j];
3709 if ( ntwocycleperms < 2 )
3715 usedpermssize = ntwocycleperms / 2;
3720 &graphcomponents, &graphcompbegins, &compcolorbegins, &ngraphcomponents,
3721 &ncompcolors, &usedperms, &nusedperms, usedpermssize, permused) );
3723 SCIPdebugMsg(
scip,
" created subgroup detection graph using %d of the permutations\n", nusedperms);
3725 if ( nusedperms == npermsincomp )
3726 allpermsused =
TRUE;
3731 assert( ngraphcomponents > 0 );
3732 assert( ncompcolors > 0 );
3733 assert( nusedperms <= ntwocycleperms );
3734 assert( ncompcolors < propdata->npermvars );
3736 if ( nusedperms == 0 )
3738 SCIPdebugMsg(
scip,
" -> skipping component, since less no permutation was used\n");
3746 SCIPdebugMsg(
scip,
" number of different colors in the graph: %d\n", ncompcolors);
3748 if ( propdata->addstrongsbcs || propdata->addweaksbcs )
3757 for (j = 0; j < ncompcolors; ++j)
3759 chosencomppercolor[j] = -1;
3760 firstvaridxpercolor[j] = -1;
3764 norbitopesincomp =
getNOrbitopesInComp(propdata->permvars, graphcomponents, graphcompbegins, compcolorbegins,
3765 ncompcolors, nvarsincomponent[cidx]);
3768 if ( norbitopesincomp == 1 )
3772 for (k = 0; k < npermsincomp; ++k)
3780 propdata->perms[propdata->components[propdata->componentbegins[cidx] + k]],
3781 propdata->permvars, propdata->npermvars,
FALSE,
3787 &propdata->genorbconsssize, propdata->ngenorbconss + 1) );
3788 propdata->genorbconss[propdata->ngenorbconss++] = cons;
3789 ++propdata->nsymresacks;
3791 if ( ! propdata->componentblocked[cidx] )
3794 ++propdata->ncompblocked;
3797 SCIPdebugMsg(
scip,
" add symresack for permutation %d of component %d\n", k, cidx);
3803 for (j = 0; j < ncompcolors; ++j)
3805 int nbinarycomps = 0;
3806 int largestcolorcomp = -1;
3807 int largestcompsize = 0;
3819 if ( graphcompbegins[compcolorbegins[j+1]] - graphcompbegins[compcolorbegins[j]] < 2 )
3821 if( chosencomppercolor !=
NULL )
3822 chosencomppercolor[j] = -1;
3828 SCIPdebugMsg(
scip,
" color %d has %d components with overall %d variables\n", j, compcolorbegins[j+1] - compcolorbegins[j],
3829 graphcompbegins[compcolorbegins[j+1]] - graphcompbegins[compcolorbegins[j]]);
3832 for (k = compcolorbegins[j]; k < compcolorbegins[j+1]; ++k)
3837 compsize = graphcompbegins[k+1] - graphcompbegins[k];
3840 if ( largestcompsize < 1 )
3848 largestcompsize = compsize;
3849 largestcolorcomp = k;
3851 else if ( compsize != largestcompsize )
3858 firstvar = propdata->permvars[graphcomponents[graphcompbegins[k]]];
3866 for (k = compcolorbegins[j]; k < compcolorbegins[j+1]; ++k)
3870 firstvar = propdata->permvars[graphcomponents[graphcompbegins[k]]];
3877 contaffected =
TRUE;
3880 SCIPdebugMsg(
scip,
" affected types (bin,int,cont): (%d,%d,%d)\n", binaffected, intaffected, contaffected);
3884 useorbitope =
FALSE;
3885 if ( norbitopesincomp > 0 && nbinarycomps > 0 )
3888 if ( isorbitope && useorbitope )
3893 SCIPdebugMsg(
scip,
" detected an orbitope with %d rows and %d columns\n", nbinarycomps, largestcompsize);
3895 assert( nbinarycomps > 0 );
3896 assert( largestcompsize > 2 );
3904 graphcompbegins, graphcomponents, j, nbinarycomps, largestcompsize, &firstvaridx, &chosencomp,
3905 &lexorder, &nvarslexorder, &maxnvarslexorder, allpermsused, &orbitopeadded) );
3907 if ( orbitopeadded )
3909 if ( propdata->addstrongsbcs || propdata->addweaksbcs )
3915 assert( compcolorbegins[j] <= chosencomp && chosencomp < compcolorbegins[j+1] );
3916 assert( 0 <= firstvaridx && firstvaridx < propdata->npermvars );
3918 chosencomppercolor[j] = chosencomp;
3919 firstvaridxpercolor[j] = firstvaridx;
3922 if ( ! propdata->componentblocked[cidx] )
3925 ++propdata->ncompblocked;
3935 if ( propdata->addstrongsbcs && ! orbitopeadded )
3937 assert( largestcolorcomp >= 0 );
3938 assert( largestcolorcomp < ngraphcomponents );
3939 assert( largestcompsize > 0 );
3941 if( propdata->addweaksbcs )
3946 chosencomppercolor[j] = largestcolorcomp;
3947 firstvaridxpercolor[j] = graphcomponents[graphcompbegins[largestcolorcomp]];
3950 SCIPdebugMsg(
scip,
" choosing component %d with %d variables and adding strong SBCs\n",
3951 largestcolorcomp, graphcompbegins[largestcolorcomp+1] - graphcompbegins[largestcolorcomp]);
3955 propdata->addsymresacks, &lexorder, &nvarslexorder, &maxnvarslexorder) );
3958 if ( !
SCIPvarIsBinary(propdata->permvars[graphcomponents[graphcompbegins[largestcolorcomp]]]) )
3959 handlednonbinarysymmetry =
TRUE;
3961 if ( ! propdata->componentblocked[cidx] )
3964 ++propdata->ncompblocked;
3968 nstrongsbcs += graphcompbegins[largestcolorcomp+1] - graphcompbegins[largestcolorcomp] - 1;
3971 else if ( ! orbitopeadded )
3976 if ( propdata->addweaksbcs )
3979 chosencomppercolor[j] = -1;
3987 if ( propdata->addweaksbcs && propdata->componentblocked[cidx] && nusedperms < npermsincomp )
3995 graphcomponents, ncompcolors, chosencomppercolor, firstvaridxpercolor,
3996 cidx, &naddedconss, propdata->addsymresacks, &lexorder, &nvarslexorder, &maxnvarslexorder) );
3998 assert( naddedconss < propdata->npermvars );
4001 nweaksbcs += naddedconss;
4005 SCIPdebugMsg(
scip,
" don't add weak sbcs because all generators were used or the settings forbid it\n");
4010 if ( nvarslexorder > 0 && propdata->addsymresacks && ! handlednonbinarysymmetry )
4015 propdata->permvars, modifiedpermvars, propdata->npermvars, lexorder, nvarslexorder) );
4017 for (k = 0; k < npermsincomp; ++k)
4029 symresackperm = modifiedperms[propdata->components[propdata->componentbegins[cidx] + k]];
4030 for (j = 0; j < propdata->nperms && !actsonbinary; ++j)
4033 actsonbinary =
TRUE;
4036 if ( ! actsonbinary )
4042 symresackperm, modifiedpermvars, propdata->npermvars,
FALSE,
4048 &propdata->genorbconsssize, propdata->ngenorbconss + 1) );
4049 propdata->genorbconss[propdata->ngenorbconss++] = cons;
4050 ++propdata->nsymresacks;
4052 if ( ! propdata->componentblocked[cidx] )
4055 ++propdata->ncompblocked;
4058 SCIPdebugMsg(
scip,
" add symresack for permutation %d of component %d adapted to suborbitope lexorder\n", k, cidx);
4074 SCIPdebugMsg(
scip,
"total number of added (sub-)orbitopes: %d\n", norbitopes);
4075 SCIPdebugMsg(
scip,
"total number of added strong sbcs: %d\n", nstrongsbcs);
4083 for (p = propdata->nperms - 1; p >= 0; --p)
4120 assert( nconflictvars > 0 );
4126 for (
i = 0;
i < nconflictvars; ++
i)
4129 varconflicts[
i].orbitidx = -1;
4130 varconflicts[
i].nconflictinorbit = 0;
4131 varconflicts[
i].orbitsize = -1;
4132 varconflicts[
i].posinorbit = -1;
4136 for (
r = 0;
r < norbits; ++
r)
4141 orbitsize = orbitbegins[
r + 1] - orbitbegins[
r];
4142 assert( orbitsize >= 0 );
4144 for (
i = orbitbegins[
r];
i < orbitbegins[
r + 1]; ++
i)
4150 assert( pos < nconflictvars );
4151 assert( varconflicts[pos].
var == conflictvars[pos] );
4153 varconflicts[pos].orbitidx =
r;
4154 varconflicts[pos].nconflictinorbit = 0;
4155 varconflicts[pos].orbitsize = orbitsize;
4156 varconflicts[pos].posinorbit = posinorbit++;
4166 for (
i = orbitbegins[
r];
i < orbitbegins[
r + 1]; ++
i)
4169 assert( varconflicts[ii].orbitidx ==
r );
4172 if ( ! varconflicts[ii].
active )
4175 for (j =
i + 1; j < orbitbegins[
r + 1]; ++j)
4178 assert( varconflicts[jj].orbitidx ==
r );
4181 if ( ! varconflicts[jj].
active )
4191 varconflicts[ii].ncliques, (
void**)varconflicts[jj].cliques, varconflicts[jj].ncliques,
4192 sortByPointerValue) )
4195 ++varconflicts[ii].nconflictinorbit;
4196 ++varconflicts[jj].nconflictinorbit;
4233 int varncliques = 0;
4239 assert( nconflictvars > 0 );
4242 *varconflicts =
NULL;
4248 if ( ncliques == 0 )
4250 SCIPdebugMsg(
scip,
"No cliques present --> construction of conflict structure aborted.\n");
4257 for (
i = 0;
i < nconflictvars; ++
i)
4259 (*varconflicts)[
i].ncliques = 0;
4260 (*varconflicts)[
i].active =
TRUE;
4261 (*varconflicts)[
i].var = conflictvars[
i];
4263 (*varconflicts)[
i].cliques =
NULL;
4264 (*varconflicts)[
i].orbitidx = -1;
4265 (*varconflicts)[
i].nconflictinorbit = 0;
4266 (*varconflicts)[
i].orbitsize = -1;
4267 (*varconflicts)[
i].posinorbit = -1;
4277 for (
c = 0;
c < ncliques; ++
c)
4279 clique = cliques[
c];
4285 assert( ncliquevars > 0 );
4291 for (
i = 0;
i < ncliquevars; ++
i)
4296 if ( node == INT_MAX )
4299 assert( node < nconflictvars );
4301 assert( (*varconflicts)[node].
var == cliquevars[
i] );
4302 (*varconflicts)[node].active =
TRUE;
4303 (*varconflicts)[node].ncliques++;
4308 for (
i = 0;
i < nconflictvars; ++
i)
4310 assert( (*varconflicts)[
i].ncliques >= 0 );
4312 if ( (*varconflicts)[
i].ncliques > 0 )
4320 for (
c = 0;
c < ncliques; ++
c)
4322 clique = cliques[
c];
4328 assert( ncliquevars > 0 );
4334 for (
i = 0;
i < ncliquevars; ++
i)
4339 if ( node == INT_MAX )
4343 assert( node < nconflictvars );
4344 assert( (*varconflicts)[node].
var == cliquevars[
i] );
4347 assert( tmpncliques[node] < (*varconflicts)[node].ncliques );
4348 assert( (*varconflicts)[node].cliques !=
NULL );
4349 (*varconflicts)[node].cliques[tmpncliques[node]++] = clique;
4358 for (
i = 0;
i < nconflictvars; ++
i)
4360 SCIPsortPtr((
void**)(*varconflicts)[
i].cliques, sortByPointerValue, (*varconflicts)[
i].ncliques);
4364 for (
i = 0;
i < nconflictvars; ++
i)
4366 assert( tmpncliques[
i] == (*varconflicts)[
i].ncliques );
4373 SCIPdebugMsg(
scip,
"Construction of conflict graph terminated; %d variable-clique combinations detected.\n",
4398 n = (*varconflicts)[
i].ncliques;
4416 int* componentbegins;
4419 int** modifiedperms =
NULL;
4422 int nsymresackcons = 0;
4430 assert( propdata->npermvars >= 0 );
4431 assert( propdata->nbinpermvars >= 0 );
4434 if ( propdata->nbinpermvars == 0 )
4436 assert( propdata->binvaraffected == 0 );
4440 perms = propdata->perms;
4441 nperms = propdata->nperms;
4442 permvars = propdata->permvars;
4443 npermvars = propdata->npermvars;
4444 conssaddlp = propdata->conssaddlp;
4446 componentbegins = propdata->componentbegins;
4453 assert( 0 <= cidx && cidx < propdata->ncomponents );
4468 if ( propdata->componenthassignedperm[cidx] )
4472 if ( propdata->nleaders > 0 &&
ISSSTBINACTIVE(propdata->sstleadervartype) )
4475 for (p = 0; p < nperms; ++p)
4481 for (
i = 0;
i < npermvars; ++
i)
4482 modifiedpermvars[
i] = permvars[
i];
4485 propdata->leaders, propdata->nleaders) );
4489 for (p = componentbegins[cidx]; p < componentbegins[cidx + 1]; ++p)
4500 if ( propdata->nleaders > 0 &&
ISSSTBINACTIVE(propdata->sstleadervartype) )
4519 &propdata->genorbconsssize, propdata->ngenorbconss + 1) );
4520 propdata->genorbconss[propdata->ngenorbconss++] = cons;
4521 ++propdata->nsymresacks;
4525 if ( propdata->nleaders > 0 &&
ISSSTBINACTIVE(propdata->sstleadervartype) )
4531 for (p = nperms - 1; p >= 0; --p)
4556 int norbitvarinconflict,
4580 assert( orbitleaderidx >= 0 );
4582 assert( norbitvarinconflict >= 0 );
4585 orbitsize = orbitbegins[orbitidx + 1] - orbitbegins[orbitidx];
4588 if ( propdata->sstaddcuts )
4592 addcuts = propdata->addconflictcuts;
4595 ncuts = orbitsize - norbitvarinconflict - 1;
4600 if ( propdata->nsstconss == 0 )
4603 assert( propdata->maxnsstconss == 0 );
4604 propdata->maxnsstconss = 2 * ncuts;
4607 else if ( propdata->nsstconss + ncuts > propdata->maxnsstconss )
4613 propdata->maxnsstconss, newsize) );
4614 propdata->maxnsstconss = newsize;
4618 if ( propdata->nleaders == 0 )
4620 propdata->maxnleaders =
MIN(propdata->nperms, propdata->npermvars);
4623 assert( propdata->nleaders < propdata->maxnleaders );
4626 posleader = orbitbegins[orbitidx] + orbitleaderidx;
4627 vars[0] = permvars[orbits[posleader]];
4630 propdata->leaders[propdata->nleaders++] = orbits[posleader];
4632 for (
i = 0, poscur = orbitbegins[orbitidx];
i < orbitsize; ++
i, ++poscur)
4634 if (
i == orbitleaderidx )
4636 assert( orbitvarinconflict ==
NULL || ! orbitvarinconflict[
i] );
4640 vars[1] = permvars[orbits[poscur]];
4642 for (j = 0; j < propdata->nleaders - 1; ++j)
4644 assert( propdata->leaders[j] != orbits[poscur] );
4649 if ( varconflicts !=
NULL )
4651 if ( orbitvarinconflict[
i] )
4665 varconflicts[orbits[poscur]].active =
FALSE;
4669 orbitvarinconflict[
i] =
FALSE;
4678 propdata->sstconss[propdata->nsstconss++] = cons;
4688 propdata->sstconss[propdata->nsstconss++] = cons;
4712 int* norbitvarinconflict,
4718 int curcriterion = INT_MIN;
4725 assert( nconflictvars > 0 );
4737 *norbitvarinconflict = 0;
4748 orbitcriterion = INT_MIN;
4751 for (
i = 0;
i < norbits; ++
i)
4755 if (
SCIPvarGetType(conflictvars[orbits[orbitbegins[
i]]]) != leadervartype )
4759 curcriterion = orbitbegins[
i] - orbitbegins[
i + 1];
4761 curcriterion = orbitbegins[
i + 1] - orbitbegins[
i];
4771 cnt = orbitbegins[
i];
4783 cnt = orbitbegins[
i + 1] - 1;
4798 curcriterion = varconflicts[
varidx].nconflictinorbit;
4802 if ( curcriterion > orbitcriterion )
4804 orbitcriterion = curcriterion;
4811 *leaderidx = orbitbegins[
i + 1] - orbitbegins[
i] - 1;
4816 if ( *success && varconflicts !=
NULL )
4818 leader = orbits[orbitbegins[*orbitidx] + *leaderidx];
4819 assert( leader < nconflictvars );
4822 && varconflicts[leader].ncliques > 0 )
4829 orbitsize = orbitbegins[*orbitidx + 1] - orbitbegins[*orbitidx];
4831 assert( leader >= 0 && leader < nconflictvars );
4835 for (
i = 0;
i < orbitsize; ++
i)
4838 if (
i == *leaderidx )
4842 varmapid = orbits[orbitbegins[*orbitidx] +
i];
4845 if ( ! varconflicts[varmapid].
active )
4850 varconflicts[leader].ncliques, (
void**)varconflicts[varmapid].cliques,
4851 varconflicts[varmapid].ncliques, sortByPointerValue) )
4854 orbitvarinconflict[
i] =
TRUE;
4855 ++(*norbitvarinconflict);
4872 for (
i = 0;
i < nconflictvars; ++
i)
4880 if ( varconflicts[
i].orbitidx == -1 )
4883 curcriterion = varconflicts[
i].nconflictinorbit;
4885 if ( curcriterion > orbitcriterion )
4887 orbitcriterion = curcriterion;
4888 *orbitidx = varconflicts[
i].orbitidx;
4889 *leaderidx = varconflicts[
i].posinorbit;
4895 leader = orbits[orbitbegins[*orbitidx] + *leaderidx];
4896 assert( leader < nconflictvars );
4899 if ( *success && varconflicts[leader].ncliques > 0 )
4904 orbitsize = orbitbegins[*orbitidx + 1] - orbitbegins[*orbitidx];
4906 assert( leader >= 0 && leader < nconflictvars );
4910 for (
i = 0;
i < orbitsize; ++
i)
4913 if (
i == *leaderidx )
4917 varmapid = orbits[orbitbegins[*orbitidx] +
i];
4919 if ( ! varconflicts[varmapid].
active )
4924 varconflicts[leader].ncliques, (
void**)varconflicts[varmapid].cliques,
4925 varconflicts[varmapid].ncliques, sortByPointerValue) )
4928 orbitvarinconflict[
i] =
TRUE;
4929 ++(*norbitvarinconflict);
4955 int nmovedbinpermvars;
4956 int nmovedintpermvars;
4957 int nmovedimplintpermvars;
4958 int nmovedcontpermvars;
4965 int* componentbegins;
4966 int* vartocomponent;
4968 unsigned* componentblocked;
4973 int norbitvarinconflict;
4981 int nvarsselectedtype;
4984 int norbitleadercomponent;
4995 assert( propdata->computedsymmetry );
4997 permvars = propdata->permvars;
4998 npermvars = propdata->npermvars;
4999 nperms = propdata->nperms;
5005 permvarmap = propdata->permvarmap;
5009 permstrans = propdata->permstrans;
5013 componentbegins = propdata->componentbegins;
5014 componentblocked = propdata->componentblocked;
5015 vartocomponent = propdata->vartocomponent;
5016 ncomponents = propdata->ncomponents;
5022 assert( ncomponents > 0 );
5023 assert( 0 <= cidx && cidx < ncomponents );
5026 if ( componentblocked[cidx] )
5030 if ( propdata->componenthassignedperm[cidx] )
5033 leaderrule = propdata->sstleaderrule;
5034 tiebreakrule = propdata->ssttiebreakrule;
5035 leadervartype = propdata->sstleadervartype;
5036 mixedcomponents = propdata->sstmixedcomponents;
5040 nmovedpermvars = propdata->nmovedpermvars;
5041 nmovedbinpermvars = propdata->nmovedbinpermvars;
5042 nmovedintpermvars = propdata->nmovedintpermvars;
5043 nmovedimplintpermvars = propdata->nmovedimplintpermvars;
5044 nmovedcontpermvars = propdata->nmovedcontpermvars;
5045 assert( nmovedpermvars > 0 );
5048 nvarsselectedtype = 0;
5049 if (
ISSSTBINACTIVE(leadervartype) && nmovedbinpermvars > nvarsselectedtype )
5052 nvarsselectedtype = nmovedbinpermvars;
5055 if (
ISSSTINTACTIVE(leadervartype) && nmovedintpermvars > nvarsselectedtype )
5058 nvarsselectedtype = nmovedintpermvars;
5061 if (
ISSSTIMPLINTACTIVE(leadervartype) && nmovedimplintpermvars > nvarsselectedtype )
5064 nvarsselectedtype = nmovedimplintpermvars;
5067 if (
ISSSTCONTACTIVE(leadervartype) && nmovedcontpermvars > nvarsselectedtype )
5070 nvarsselectedtype = nmovedcontpermvars;
5074 if ( nvarsselectedtype == 0 )
5078 if ( onlywithcontvars )
5080 for (p = componentbegins[cidx]; p < componentbegins[cidx + 1]; ++p)
5082 perm = propdata->perms[p];
5083 for (
i = 0;
i < propdata->npermvars; ++
i)
5105 conflictgraphcreated = varconflicts !=
NULL;
5113 if ( conflictgraphcreated )
5118 SCIPdebugMsg(
scip,
"Start selection of orbits and leaders for Schreier Sims constraints.\n");
5121 if ( nchgbds !=
NULL )
5125 for (
c = 0;
c < ncomponents; ++
c)
5127 for (p = componentbegins[
c]; p < componentbegins[
c + 1]; ++p)
5135 ninactiveperms = nperms - componentbegins[cidx + 1] + componentbegins[cidx];
5138 norbitleadercomponent = 0;
5139 while ( ninactiveperms < nperms )
5145 orbits, orbitbegins, &norbits,
components, componentbegins, vartocomponent,
5146 componentblocked, ncomponents, nmovedpermvars) );
5149 if ( ! mixedcomponents )
5151 for (p = 0; p < norbits; ++p)
5154 if (
SCIPvarGetType(permvars[orbits[orbitbegins[p]]]) != selectedtype )
5166 if ( conflictgraphcreated )
5184 norbits, propdata->sstleaderrule, propdata->ssttiebreakrule, selectedtype, &orbitidx, &orbitleaderidx,
5185 orbitvarinconflict, &norbitvarinconflict, &success) );
5190 assert( 0 <= orbitidx && orbitidx < norbits );
5191 assert( 0 <= orbitleaderidx && orbitleaderidx < orbitbegins[orbitidx + 1] - orbitbegins[orbitidx] );
5192 SCIPdebugMsg(
scip,
"%d\t\t%d\t\t%d\n", orbitidx, orbitleaderidx, orbitbegins[orbitidx + 1] - orbitbegins[orbitidx]);
5196 orbits, orbitbegins, orbitidx, orbitleaderidx, orbitvarinconflict, norbitvarinconflict, &nchanges) );
5198 ++norbitleadercomponent;
5200 if ( nchgbds !=
NULL )
5201 *nchgbds += nchanges;
5204 posleader = orbits[orbitbegins[orbitidx] + orbitleaderidx];
5205 for (p = 0; p < nperms; ++p)
5207 if ( inactiveperms[p] )
5210 if ( permstrans[posleader][p] != posleader )
5212 inactiveperms[p] =
TRUE;
5219 if ( norbitleadercomponent > 0 )
5222 if ( conflictgraphcreated )
5228 if ( varconflicts !=
NULL )
5263 assert( propdata->usedynamicprop );
5281 &propdata->genlinconsssize, propdata->ngenlinconss + ncols - 1) );
5282 for (
i = 0;
i < ncols - 1; ++
i)
5286 consvars[0] = propdata->permvars[varidxmatrix[0][
i]];
5287 consvars[1] = propdata->permvars[varidxmatrix[0][
i + 1]];
5293 propdata->genlinconss[propdata->ngenlinconss++] = cons;
5301 if ( ncols == 2 && propdata->lexreddata !=
NULL )
5306 orbisackperm = propdata->perms[propdata->components[propdata->componentbegins[id]]];
5309 propdata->permvars, propdata->npermvars, orbisackperm, (
SYM_SYMTYPE) propdata->symtype,
5310 propdata->permvardomaincenter,
TRUE, success) );
5317 for (
i = 0;
i < nrows; ++
i)
5320 for (j = 0; j < ncols; ++j)
5321 varmatrix[
i][j] = propdata->permvars[varidxmatrix[
i][j]];
5328 ispporbitope = npprows >= 3;
5342 for (
i = 0;
i < nrows; ++
i)
5347 ppvarsarrayonlypprows[
r++] = varmatrix[
i];
5361 &propdata->genlinconsssize, propdata->ngenlinconss + 1) );
5365 propdata->genlinconss[propdata->ngenlinconss++] = cons;
5379 nelem = nrows * ncols;
5381 for (
i = 0;
i < nrows; ++
i)
5383 for (j = 0; j < ncols; ++j)
5384 orbitopevarmatrix[pos++] = varmatrix[
i][j];
5393 orbitopevarmatrix, nrows, ncols, success) );
5401 for (
i = nrows - 1;
i >= 0; --
i)
5416 int** componentperms,
5435 int** pporbisackperms;
5436 int npporbisackperms;
5440 int* npermvarssetppcconss;
5441 int* maxnpermvarssetppcconss;
5448 assert( componentsize > 0 );
5455 if ( hassignedperm )
5459 if ( setppcconshdlr ==
NULL )
5463 if ( nsetppcconss == 0 )
5474 for (
c = 0;
c < nsetppcconss; ++
c)
5476 cons = setppcconss[
c];
5482 setppconsssort[nsetppconss++] = cons;
5484 SCIPsortPtr((
void**) setppconsssort, sortByPointerValue, nsetppconss);
5492 for (
c = 0;
c < nsetppconss; ++
c)
5496 cons = setppconsssort[
c];
5502 for (
i = 0;
i < nsetppcvars; ++
i)
5504 var = setppcvars[
i];
5507 assert( varid == INT_MAX || varid < propdata->npermvars );
5509 if ( varid < propdata->npermvars )
5512 &(permvarssetppcconss[varid]), &maxnpermvarssetppcconss[varid], npermvarssetppcconss[varid] + 1) );
5513 assert( npermvarssetppcconss[varid] < maxnpermvarssetppcconss[varid] );
5514 permvarssetppcconss[varid][npermvarssetppcconss[varid]++] = cons;
5522 npporbisackperms = 0;
5523 for (p = 0; p < componentsize; ++p)
5525 perm = componentperms[p];
5529 for (
i = 0;
i < propdata->npermvars; ++
i)
5548 (
void**) permvarssetppcconss[j], npermvarssetppcconss[j], sortByPointerValue) )
5557 if ( ntwocycles > 0 )
5559 pporbisackperms[npporbisackperms++] = perm;
5560 if ( ntwocycles > maxntwocycles )
5561 maxntwocycles = ntwocycles;
5569 if ( npporbisackperms * 2 >= componentsize )
5577 assert( npporbisackperms > 0 );
5578 assert( maxntwocycles > 0 );
5583 for (
i = 0;
i < maxntwocycles; ++
i)
5584 ppvarsmatrix[
i] = &(ppvarsblock[2 *
i]);
5587 for (p = 0; p < npporbisackperms; ++p)
5589 perm = pporbisackperms[p];
5593 for (
i = 0;
i < propdata->npermvars; ++
i)
5606 (
void**) permvarssetppcconss[j], npermvarssetppcconss[j], sortByPointerValue) );
5608 assert( nrows < maxntwocycles );
5609 row = ppvarsmatrix[nrows++];
5610 row[0] = propdata->permvars[
i];
5611 row[1] = propdata->permvars[j];
5612 assert( row[0] != row[1] );
5623 &propdata->genlinconsssize, propdata->ngenlinconss + 1) );
5627 propdata->genlinconss[propdata->ngenlinconss++] = cons;
5641 for (varid = 0; varid < propdata->npermvars; ++varid)
5643 assert( (permvarssetppcconss[varid] ==
NULL) == (maxnpermvarssetppcconss[varid] == 0) );
5644 assert( npermvarssetppcconss[varid] >= 0 );
5645 assert( maxnpermvarssetppcconss[varid] >= 0 );
5646 assert( npermvarssetppcconss[varid] <= maxnpermvarssetppcconss[varid] );
5647 if ( npermvarssetppcconss[varid] == 0 )
5650 permvarssetppcconss[varid] =
NULL;
5651 npermvarssetppcconss[varid] = 0;
5652 maxnpermvarssetppcconss[varid] = 0;
5672 int** componentperms;
5685 && propdata->usedynamicprop
5686 && propdata->addsymresacks
5688 assert( propdata->nperms > 0 );
5689 assert( 0 <= cidx && cidx < propdata->ncomponents );
5690 assert( propdata->componentblocked !=
NULL );
5693 if ( propdata->componentblocked[cidx] )
5698 checklexred =
ISSYMRETOPESACTIVE(propdata->usesymmetry) && propdata->usedynamicprop && propdata->addsymresacks;
5699 assert( checkorbired || checklexred );
5702 assert( propdata->nmovedpermvars );
5705 componentsize = propdata->componentbegins[cidx + 1] - propdata->componentbegins[cidx];
5707 for (p = 0; p < componentsize; ++p)
5708 componentperms[p] = propdata->perms[propdata->components[propdata->componentbegins[cidx] + p]];
5717 checkpporbisack =
SCIPgetParam(
scip,
"constraints/orbisack/checkpporbisack");
5721 componentperms, componentsize, propdata->componenthassignedperm[cidx], &success) );
5726 goto FINISHCOMPONENT;
5731 if ( checkorbired && !propdata->componenthassignedperm[cidx] )
5734 propdata->permvars, propdata->npermvars, componentperms, componentsize, &success) );
5743 for (p = 0; p < componentsize; ++p)
5747 propdata->permvars, propdata->npermvars, componentperms[p],
5748 (
SYM_SYMTYPE) propdata->symtype, propdata->permvardomaincenter,
TRUE, &success) );
5756 if ( propdata->componentblocked[cidx] )
5757 ++propdata->ncompblocked;
5772 int ncomponentshandled;
5779 if ( propdata->orbitopalreddata )
5783 if ( propdata->orbitalreddata )
5787 if ( propdata->lexreddata )
5791 if ( propdata->ncomponents >= 0 )
5798 ncomponentshandled = 0;
5799 for (
i = 0;
i < propdata->ncomponents; ++
i)
5801 if ( propdata->componentblocked[
i] )
5802 ++ncomponentshandled;
5804 assert( propdata->ncompblocked <= ncomponentshandled );
5805 assert( ncomponentshandled <= propdata->ncomponents );
5807 ncomponentshandled, propdata->ncomponents);
5835 if ( propdata->usedynamicprop )
5840 else if ( propdata->binvaraffected )
5852 for (
i = 0;
i < nrows; ++
i)
5859 for (j = 0; j < ncols; ++j)
5862 orbitopematrix[nbinrows][j] = propdata->permvars[varidxmatrix[
i][j]];
5877 &propdata->genorbconsssize, propdata->ngenorbconss + 1) );
5878 propdata->genorbconss[propdata->ngenorbconss++] = cons;
5879 ++propdata->norbitopes;
5884 for (
i = nbinrows - 1;
i >= 0; --
i)
5930 assert( nrowblocks > 0 );
5931 assert( ncolblocks > 0 );
5936 &propdata->genorbconsssize, propdata->ngenorbconss + nrowblocks + ncolblocks) );
5938 maxdim =
MAX(nrows, ncols);
5940 for (
i = 0;
i < maxdim; ++
i)
5946 for (p = 0; p < ncolblocks; ++p)
5949 for (
i = 0;
i < nrows; ++
i)
5952 if ( !
SCIPvarIsBinary(propdata->permvars[varidxmatrix[
i][colsbegin[p]]]) )
5955 for (col = 0, j = colsbegin[p]; j < colsbegin[p + 1]; ++j, ++col)
5958 orbitopematrix[nbinrows][col] = propdata->permvars[varidxmatrix[
i][j]];
5970 propdata->genorbconss[(propdata->ngenorbconss)++] = cons;
5976 for (p = 0; p < nrowblocks; ++p)
5979 for (
i = 0;
i < ncols; ++
i)
5982 if ( !
SCIPvarIsBinary(propdata->permvars[varidxmatrix[rowsbegin[p]][
i]]) )
5985 for (col = 0, j = rowsbegin[p]; j < rowsbegin[p + 1]; ++j, ++col)
5988 orbitopematrix[nbinrows][col] = propdata->permvars[varidxmatrix[j][
i]];
6000 propdata->genorbconss[(propdata->ngenorbconss)++] = cons;
6005 for (
i = maxdim - 1;
i >= 0; --
i)
6023 int** lexmatrix =
NULL;
6024 int* lexrowsbegin =
NULL;
6025 int* lexcolsbegin =
NULL;
6039 assert( 0 <= cidx && cidx < propdata->ncomponents );
6042 if ( propdata->componentblocked[cidx] )
6046 if ( propdata->componenthassignedperm[cidx] )
6054 compsize = propdata->componentbegins[cidx + 1] - propdata->componentbegins[cidx];
6056 for (p = 0,
i = propdata->componentbegins[cidx];
i < propdata->componentbegins[cidx + 1]; ++
i)
6057 perms[p++] = propdata->perms[propdata->components[
i]];
6060 &success, &isorbitope, &lexmatrix, &nrows, &ncols,
6061 &lexrowsbegin, &lexcolsbegin, &nrowmatrices, &ncolmatrices) );
6081 for (
i = 0;
i < nrows && !hasbinaryvar; ++
i)
6083 for (p = 0; p < ncols; ++p)
6087 hasbinaryvar =
TRUE;
6096 lexrowsbegin, lexcolsbegin, nrowmatrices, ncolmatrices, &success) );
6103 for (
i = nrows - 1;
i >= 0; --
i)
6108 if ( ncolmatrices > 0 )
6112 if ( nrowmatrices > 0 )
6121 ++(propdata->ncompblocked);
6137 assert( 0 <= cidx && cidx < propdata->ncomponents );
6140 if ( propdata->componentblocked[cidx] )
6144 if ( propdata->componenthassignedperm[cidx] )
6148 if ( !propdata->usedynamicprop &&
ISSYMRETOPESACTIVE(propdata->usesymmetry) && propdata->detectsubgroups
6149 && propdata->binvaraffected && propdata->ncompblocked < propdata->ncomponents )
6193 assert( propdata->ncomponents >= 0 );
6194 assert( 0 <= cidx && cidx < propdata->ncomponents );
6197 if ( propdata->componentblocked[cidx] )
6202 || (
ISSYMRETOPESACTIVE(propdata->usesymmetry) && propdata->usedynamicprop && propdata->addsymresacks );
6205 if ( propdata->detectdoublelex || propdata->detectorbitopes )
6209 detectsinglelex = propdata->detectdoublelex ?
FALSE :
TRUE;
6218 if ( useorbitalredorlexred )
6243 if ( nchgbds !=
NULL )
6245 if ( earlyterm !=
NULL )
6251 if ( earlyterm !=
NULL )
6258 assert( propdata->usesymmetry >= 0 );
6261 if ( propdata->usesymmetry == 0 )
6263 if ( earlyterm !=
NULL )
6269 if ( propdata->triedaddsymmethods )
6271 assert( propdata->nperms >= 0 );
6273 if ( earlyterm !=
NULL )
6278 assert( !propdata->triedaddsymmethods );
6281 if ( !propdata->computedsymmetry )
6289 if ( !propdata->computedsymmetry )
6293 propdata->triedaddsymmethods =
TRUE;
6294 assert( propdata->nperms >= 0 );
6297 if ( propdata->nperms == 0 )
6302 assert( propdata->ncomponents > 0 );
6305 for (
c = 0;
c < propdata->ncomponents; ++
c)
6313#ifdef SYMMETRY_STATISTICS
6340 *infeasible =
FALSE;
6385 if ( propdata->usesymmetry < 0 )
6389 assert( propdata->usesymmetry >= 0 );
6392 if ( propdata->usesymmetry == 0 )
6421 assert( propdata->usesymmetry >= 0 );
6424 if ( propdata->usesymmetry == 0 )
6479 assert( propdata->usesymmetry >= 0 );
6482 if ( propdata->usesymmetry == 0 )
6496 noldngenconns = propdata->ngenorbconss + propdata->nsstconss + propdata->ngenlinconss;
6508 *nchgbds += nchanges;
6512 if ( propdata->ngenorbconss > 0 || propdata->ngenlinconss > 0 || propdata->nsstconss > 0 )
6515 assert( propdata->nperms > 0 );
6516 assert( propdata->triedaddsymmethods );
6521 *naddconss += propdata->ngenorbconss + propdata->ngenlinconss + propdata->nsstconss - noldngenconns;
6522 SCIPdebugMsg(
scip,
"Added symmetry breaking constraints: %d.\n", *naddconss);
6525 for (
i = 0;
i < propdata->ngenorbconss; ++
i)
6528 nnewchgbds, nnewholes, nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, nfixedvars, naggrvars,
6529 nchgvartypes, nchgbds, naddholes, ndelconss, naddconss, nupgdconss, nchgcoefs, nchgsides,
result) );
6539 for (
i = 0;
i < propdata->ngenlinconss; ++
i)
6542 nnewchgbds, nnewholes, nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, nfixedvars, naggrvars,
6543 nchgvartypes, nchgbds, naddholes, ndelconss, naddconss, nupgdconss, nchgcoefs, nchgsides,
result) );
6553 propdata->ngenorbconss + propdata->ngenlinconss);
6555 for (
i = 0;
i < propdata->nsstconss; ++
i)
6558 nnewchgbds, nnewholes, nnewdelconss, nnewaddconss, nnewupgdconss, nnewchgcoefs, nnewchgsides, nfixedvars, naggrvars,
6559 nchgvartypes, nchgbds, naddholes, ndelconss, naddconss, nupgdconss, nchgcoefs, nchgsides,
result) );
6568 SCIPdebugMsg(
scip,
"Presolved %d generated Schreier Sims constraints.\n", propdata->nsstconss);
6599 if ( propdata->usesymmetry < 0 )
6607 propdata->symfoundreduction =
TRUE;
6614 propdata->symfoundreduction =
TRUE;
6641 propdata->usesymmetry = -1;
6642 propdata->triedaddsymmethods =
FALSE;
6643 propdata->nsymresacks = 0;
6644 propdata->norbitopes = 0;
6645 propdata->lastrestart = 0;
6646 propdata->symfoundreduction =
FALSE;
6685 assert( propdata->customsymopnodetypes !=
NULL );
6695 assert( propdata->orbitopalreddata !=
NULL );
6723 propdata->npermvars = 0;
6724 propdata->nbinpermvars = 0;
6725 propdata->permvars =
NULL;
6726 propdata->nperms = -1;
6727 propdata->nmaxperms = 0;
6728 propdata->perms =
NULL;
6729 propdata->permstrans =
NULL;
6730 propdata->permvarmap =
NULL;
6731 propdata->permvardomaincenter =
NULL;
6733 propdata->ncomponents = -1;
6734 propdata->ncompblocked = 0;
6735 propdata->components =
NULL;
6736 propdata->componentbegins =
NULL;
6737 propdata->vartocomponent =
NULL;
6738 propdata->componentblocked =
NULL;
6739 propdata->componenthassignedperm =
NULL;
6741 propdata->log10groupsize = -1.0;
6742 propdata->nmovedvars = -1;
6743 propdata->binvaraffected =
FALSE;
6744 propdata->computedsymmetry =
FALSE;
6745 propdata->conshdlr_nonlinear =
NULL;
6747 propdata->usesymmetry = -1;
6748 propdata->triedaddsymmethods =
FALSE;
6749 propdata->genorbconss =
NULL;
6750 propdata->genlinconss =
NULL;
6751 propdata->ngenorbconss = 0;
6752 propdata->ngenlinconss = 0;
6753 propdata->genorbconsssize = 0;
6754 propdata->genlinconsssize = 0;
6755 propdata->nsymresacks = 0;
6756 propdata->norbitopes = 0;
6757 propdata->isnonlinvar =
NULL;
6759 propdata->nmovedpermvars = -1;
6760 propdata->nmovedbinpermvars = 0;
6761 propdata->nmovedintpermvars = 0;
6762 propdata->nmovedimplintpermvars = 0;
6763 propdata->nmovedcontpermvars = 0;
6764 propdata->lastrestart = 0;
6765 propdata->symfoundreduction =
FALSE;
6767 propdata->sstconss =
NULL;
6768 propdata->nsstconss = 0;
6769 propdata->maxnsstconss = 0;
6770 propdata->leaders =
NULL;
6771 propdata->nleaders = 0;
6772 propdata->maxnleaders = 0;
6792 tabledata->propdata = propdata;
6799 if( rootdialog !=
NULL )
6809 "symmetry",
"display generators of symmetry group in cycle notation, if available",
6817 "propagating/" PROP_NAME "/maxgenerators",
6818 "limit on the number of generators that should be produced within symmetry detection (0 = no limit)",
6822 "propagating/" PROP_NAME "/checksymmetries",
6823 "Should all symmetries be checked after computation?",
6827 "propagating/" PROP_NAME "/displaynorbitvars",
6828 "Should the number of variables affected by some symmetry be displayed?",
6832 "propagating/" PROP_NAME "/doubleequations",
6833 "Double equations to positive/negative version?",
6839 "Should the symmetry breaking constraints be added to the LP?",
6843 "propagating/" PROP_NAME "/addsymresacks",
6844 "Add inequalities for symresacks for each generator?",
6848 "propagating/" PROP_NAME "/detectdoublelex",
6849 "Should we check whether the components of the symmetry group can be handled by double lex matrices?",
6853 "propagating/" PROP_NAME "/detectorbitopes",
6854 "Should we check whether the components of the symmetry group can be handled by orbitopes?",
6858 "propagating/" PROP_NAME "/detectsubgroups",
6859 "Should we try to detect symmetric subgroups of the symmetry group on binary variables?",
6863 "propagating/" PROP_NAME "/addweaksbcs",
6864 "Should we add weak SBCs for enclosing orbit of symmetric subgroups?",
6868 "propagating/" PROP_NAME "/addconsstiming",
6869 "timing of adding constraints (0 = before presolving, 1 = during presolving, 2 = after presolving) [disabled parameter]",
6874 "propagating/" PROP_NAME "/ofsymcomptiming",
6875 "timing of symmetry computation (0 = before presolving, 1 = during presolving, 2 = at first call) [disabled parameter]",
6879 "propagating/" PROP_NAME "/performpresolving",
6880 "run orbital fixing during presolving? (disabled)",
6884 "propagating/" PROP_NAME "/recomputerestart",
6885 "recompute symmetries after a restart has occurred? (0 = never)",
6889 "propagating/" PROP_NAME "/compresssymmetries",
6890 "Should non-affected variables be removed from permutation to save memory?",
6894 "propagating/" PROP_NAME "/compressthreshold",
6895 "Compression is used if percentage of moved vars is at most the threshold.",
6899 "propagating/" PROP_NAME "/usecolumnsparsity",
6900 "Should the number of conss a variable is contained in be exploited in symmetry detection?",
6904 "propagating/" PROP_NAME "/maxnconsssubgroup",
6905 "maximum number of constraints up to which subgroup structures are detected",
6909 "propagating/" PROP_NAME "/usedynamicprop",
6910 "whether dynamified symmetry handling constraint methods should be used",
6914 "propagating/" PROP_NAME "/addstrongsbcs",
6915 "Should strong SBCs for enclosing orbit of symmetric subgroups be added if orbitopes are not used?",
6919 "propagating/" PROP_NAME "/ssttiebreakrule",
6920 "rule to select the orbit in Schreier Sims inequalities (variable in 0: minimum size orbit; 1: maximum size orbit; 2: orbit with most variables in conflict with leader)",
6924 "propagating/" PROP_NAME "/sstleaderrule",
6925 "rule to select the leader in an orbit (0: first var; 1: last var; 2: var having most conflicting vars in orbit)",
6929 "propagating/" PROP_NAME "/sstleadervartype",
6930 "bitset encoding which variable types can be leaders (1: binary; 2: integer; 4: impl. int; 8: continuous);" \
6931 "if multiple types are allowed, take the one with most affected vars",
6935 "propagating/" PROP_NAME "/addconflictcuts",
6936 "Should Schreier Sims constraints be added if we use a conflict based rule?",
6941 "Should Schreier Sims constraints be added?",
6945 "propagating/" PROP_NAME "/sstmixedcomponents",
6946 "Should Schreier Sims constraints be added if a symmetry component contains variables of different types?",
6950 "propagating/" PROP_NAME "/symfixnonbinaryvars",
6951 "Whether all non-binary variables shall be not affected by symmetries if OF is active? (disabled)",
6955 "propagating/" PROP_NAME "/enforcecomputesymmetry",
6956 "Is only symmetry on binary variables used?",
6960 "propagating/" PROP_NAME "/preferlessrows",
6961 "Shall orbitopes with less rows be preferred in detection?",
6966 "Type of symmetries that shall be computed?",
6971 "timing of symmetry computation and handling (0 = before presolving, 1 = during presolving, 2 = after presolving)",
6978 "propagating/" PROP_NAME "/nautymaxncells",
6979 "terminate symmetry detection using Nauty when number of cells in color refinment is at least this number",
6983 "propagating/" PROP_NAME "/nautymaxnnodes",
6984 "terminate symmetry detection using Nauty when its search tree has at least this number of nodes",
7000 assert( propdata->shadowtreeeventhdlr !=
NULL );
7003 assert( propdata->orbitopalreddata !=
NULL );
7027 int** componentbegins,
7028 int** vartocomponent,
7055 *npermvars = propdata->npermvars;
7056 *permvars = propdata->permvars;
7058 if ( permvarmap !=
NULL )
7060 if ( propdata->nperms > 0 )
7064 *permvarmap = propdata->permvarmap;
7067 *nperms = propdata->nperms;
7068 if ( perms !=
NULL )
7070 *perms = propdata->perms;
7074 if ( permstrans !=
NULL )
7076 if ( propdata->nperms > 0 )
7080 *permstrans = propdata->permstrans;
7081 assert( *permstrans !=
NULL || *nperms <= 0 );
7084 if ( log10groupsize !=
NULL )
7085 *log10groupsize = propdata->log10groupsize;
7087 if ( binvaraffected !=
NULL )
7088 *binvaraffected = propdata->binvaraffected;
7092 if ( propdata->nperms > 0 )
7101 if ( componentbegins !=
NULL )
7102 *componentbegins = propdata->componentbegins;
7104 if ( vartocomponent )
7105 *vartocomponent = propdata->vartocomponent;
7108 *ncomponents = propdata->ncomponents;
7131 if ( propdata->nperms < 0 )
7134 return propdata->nperms;
7143 const char* opnodename,
7156 SCIPerrorMessage(
"Cannot create operator node type, symmetry propagator has not been included.\n");
7162 assert( propdata->customsymopnodetypes !=
NULL );
7166 SCIPerrorMessage(
"Cannot create operator node type %s, it already exists.\n", opnodename);
7171 *nodetype = propdata->nopnodetypes++;
7182 const char* opnodename,
7194 SCIPerrorMessage(
"Cannot return operator node type, symmetry propagator has not been included.\n");
7200 assert( propdata->customsymopnodetypes !=
NULL );
static GRAPHNODE ** active
interface for symmetry computations
SCIP_Bool SYMcheckGraphsAreIdentical(SCIP *scip, SYM_SYMTYPE symtype, SYM_GRAPH *G1, SYM_GRAPH *G2)
const char * SYMsymmetryGetName(void)
const char * SYMsymmetryGetAddName(void)
SCIP_RETCODE SYMcomputeSymmetryGenerators(SCIP *scip, int maxgenerators, SYM_GRAPH *graph, int *nperms, int *nmaxperms, int ***perms, SCIP_Real *log10groupsize, SCIP_Real *symcodetime)
SCIP_Bool SYMcanComputeSymmetry(void)
const char * SYMsymmetryGetDesc(void)
const char * SYMsymmetryGetAddDesc(void)
Constraint handler for AND constraints, .
constraint handler for bound disjunction constraints
constraint handler for indicator constraints
Constraint handler for knapsack constraints of the form , x binary and .
Constraint handler for linear constraints in their most general form, .
constraint handler for linking binary variables to a linking (continuous or integer) variable
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...
constraint handler for nonlinear constraints specified by algebraic expressions
Constraint handler for "or" constraints, .
constraint handler for (partitioning/packing/full) orbitope constraints w.r.t. the full symmetric gro...
Constraint handler for the set partitioning / packing / covering constraints .
constraint handler for SOS type 1 constraints
constraint handler for SOS type 2 constraints
constraint handler for symresack constraints
Constraint handler for variable bound constraints .
Constraint handler for XOR constraints, .
SCIP_Real SCIPgetShadowTreeEventHandlerExecutionTime(SCIP *scip, SCIP_EVENTHDLR *eventhdlr)
SCIP_RETCODE SCIPincludeEventHdlrShadowTree(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr)
power and signed power expression handlers
product expression handler
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 SCIPcreateConsLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool initial, SCIP_Bool separate, SCIP_Bool enforce, SCIP_Bool check, SCIP_Bool propagate, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool dynamic, SCIP_Bool removable, SCIP_Bool stickingatnode)
SCIP_RETCODE SCIPcreateConsOrbitope(SCIP *scip, SCIP_CONS **cons, const char *name, SCIP_VAR ***vars, SCIP_ORBITOPETYPE orbitopetype, int nspcons, int nblocks, SCIP_Bool usedynamicprop, SCIP_Bool mayinteract, SCIP_Bool resolveprop, 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_COVERING
int SCIPdisjointsetGetComponentCount(SCIP_DISJOINTSET *djset)
void SCIPfreeDisjointset(SCIP *scip, SCIP_DISJOINTSET **djset)
int SCIPdisjointsetFind(SCIP_DISJOINTSET *djset, int element)
void SCIPdisjointsetUnion(SCIP_DISJOINTSET *djset, int p, int q, SCIP_Bool forcerepofp)
SCIP_RETCODE SCIPcreateDisjointset(SCIP *scip, SCIP_DISJOINTSET **djset, int ncomponents)
SCIP_Bool SCIPisPresolveFinished(SCIP *scip)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_STATUS SCIPgetStatus(SCIP *scip)
SCIP_STAGE SCIPgetStage(SCIP *scip)
int SCIPgetNIntVars(SCIP *scip)
int SCIPgetNImplVars(SCIP *scip)
int SCIPgetNContVars(SCIP *scip)
SCIP_CONS ** SCIPgetConss(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNConss(SCIP *scip)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
int SCIPgetNBinVars(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 SCIPinfoMessage(SCIP *scip, FILE *file, const char *formatstr,...)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
void SCIPwarningMessage(SCIP *scip, 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_PARAM * SCIPgetParam(SCIP *scip, const char *name)
SCIP_RETCODE SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPgetIntParam(SCIP *scip, const char *name, int *value)
int SCIPgetNActiveBenders(SCIP *scip)
int SCIPgetNConshdlrs(SCIP *scip)
SCIP_Bool SCIPconshdlrSupportsSignedPermsymDetection(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNConss(SCIP_CONSHDLR *conshdlr)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_Bool SCIPconshdlrSupportsPermsymDetection(SCIP_CONSHDLR *conshdlr)
int SCIPconshdlrGetNActiveConss(SCIP_CONSHDLR *conshdlr)
SCIP_CONS ** SCIPconshdlrGetConss(SCIP_CONSHDLR *conshdlr)
SCIP_CONSHDLR ** SCIPgetConshdlrs(SCIP *scip)
SCIP_RETCODE SCIPgetConsNVars(SCIP *scip, SCIP_CONS *cons, int *nvars, SCIP_Bool *success)
SCIP_RETCODE SCIPgetConsSignedPermsymGraph(SCIP *scip, SCIP_CONS *cons, SYM_GRAPH *graph, SCIP_Bool *success)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_RETCODE SCIPpresolCons(SCIP *scip, SCIP_CONS *cons, int nrounds, SCIP_PRESOLTIMING presoltiming, int nnewfixedvars, int nnewaggrvars, int nnewchgvartypes, int nnewchgbds, int nnewholes, int nnewdelconss, int nnewaddconss, int nnewupgdconss, int nnewchgcoefs, int nnewchgsides, int *nfixedvars, int *naggrvars, int *nchgvartypes, int *nchgbds, int *naddholes, int *ndelconss, int *naddconss, int *nupgdconss, int *nchgcoefs, int *nchgsides, SCIP_RESULT *result)
SCIP_RETCODE SCIPprintCons(SCIP *scip, SCIP_CONS *cons, FILE *file)
SCIP_RETCODE SCIPgetConsPermsymGraph(SCIP *scip, SCIP_CONS *cons, SYM_GRAPH *graph, SCIP_Bool *success)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_RETCODE SCIPreleaseDialog(SCIP *scip, SCIP_DIALOG **dialog)
SCIP_DIALOG * SCIPdialoghdlrGetRoot(SCIP_DIALOGHDLR *dialoghdlr)
SCIP_Bool SCIPdialogHasEntry(SCIP_DIALOG *dialog, const char *entryname)
SCIP_RETCODE SCIPdialoghdlrAddHistory(SCIP_DIALOGHDLR *dialoghdlr, SCIP_DIALOG *dialog, const char *command, SCIP_Bool escapecommand)
SCIP_RETCODE SCIPincludeDialog(SCIP *scip, SCIP_DIALOG **dialog, SCIP_DECL_DIALOGCOPY((*dialogcopy)), SCIP_DECL_DIALOGEXEC((*dialogexec)), SCIP_DECL_DIALOGDESC((*dialogdesc)), SCIP_DECL_DIALOGFREE((*dialogfree)), const char *name, const char *desc, SCIP_Bool issubmenu, SCIP_DIALOGDATA *dialogdata)
SCIP_RETCODE SCIPaddDialogEntry(SCIP *scip, SCIP_DIALOG *dialog, SCIP_DIALOG *subdialog)
SCIP_DIALOGDATA * SCIPdialogGetData(SCIP_DIALOG *dialog)
SCIP_DIALOG * SCIPgetRootDialog(SCIP *scip)
int SCIPdialogFindEntry(SCIP_DIALOG *dialog, const char *entryname, SCIP_DIALOG **subdialog)
const char * SCIPexprhdlrGetName(SCIP_EXPRHDLR *exprhdlr)
int SCIPgetNExprhdlrs(SCIP *scip)
SCIP_Bool SCIPexprhdlrHasGetSymData(SCIP_EXPRHDLR *exprhdlr)
SCIP_EXPRHDLR ** SCIPgetExprhdlrs(SCIP *scip)
SCIP_RETCODE SCIPincludeExternalCodeInformation(SCIP *scip, const char *name, const char *description)
#define SCIPfreeCleanBufferArray(scip, ptr)
#define SCIPallocCleanBufferArray(scip, ptr, num)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
#define SCIPallocClearBlockMemoryArray(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 SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
#define SCIPfreeBufferArrayNull(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
int SCIPgetNActivePricers(SCIP *scip)
SCIP_PROP * SCIPfindProp(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetPropInitpre(SCIP *scip, SCIP_PROP *prop,)
SCIP_RETCODE SCIPsetPropExitpre(SCIP *scip, SCIP_PROP *prop,)
SCIP_PROPDATA * SCIPpropGetData(SCIP_PROP *prop)
SCIP_RETCODE SCIPsetPropPresol(SCIP *scip, SCIP_PROP *prop, SCIP_DECL_PROPPRESOL((*proppresol)), int presolpriority, int presolmaxrounds, SCIP_PRESOLTIMING presoltiming)
SCIP_RETCODE SCIPsetPropExitsol(SCIP *scip, SCIP_PROP *prop,)
const char * SCIPpropGetName(SCIP_PROP *prop)
SCIP_RETCODE SCIPsetPropResprop(SCIP *scip, SCIP_PROP *prop,)
SCIP_RETCODE SCIPsetPropFree(SCIP *scip, SCIP_PROP *prop,)
SCIP_RETCODE SCIPsetPropExit(SCIP *scip, SCIP_PROP *prop,)
SCIP_RETCODE SCIPincludePropBasic(SCIP *scip, SCIP_PROP **propptr, const char *name, const char *desc, int priority, int freq, SCIP_Bool delay, SCIP_PROPTIMING timingmask, SCIP_DECL_PROPEXEC((*propexec)), SCIP_PROPDATA *propdata)
SCIP_Bool SCIPisReoptEnabled(SCIP *scip)
int SCIPgetNRuns(SCIP *scip)
SCIP_RETCODE SCIPdetermineNVarsAffectedSym(SCIP *scip, int **perms, int nperms, SCIP_VAR **permvars, int npermvars, int *nvarsaffected)
SCIP_RETCODE SCIPcomputeComponentsSym(SCIP *scip, SYM_SYMTYPE symtype, int **perms, int nperms, SCIP_VAR **permvars, int npermvars, SCIP_Bool transposed, int **components, int **componentbegins, int **vartocomponent, unsigned **componentblocked, int *ncomponents)
SCIP_RETCODE SCIPcomputeOrbitVar(SCIP *scip, int npermvars, int **perms, int **permstrans, int *components, int *componentbegins, SCIP_Shortbool *ignoredvars, SCIP_Shortbool *varfound, int varidx, int component, int *orbit, int *orbitsize)
SCIP_RETCODE SCIPisInvolutionPerm(int *perm, SCIP_VAR **vars, int nvars, int *ntwocyclesperm, int *nbincyclesperm, SCIP_Bool earlytermination)
SCIP_RETCODE SCIPdetectSingleOrDoubleLexMatrices(SCIP *scip, SCIP_Bool detectsinglelex, int **perms, int nperms, int permlen, SCIP_Bool *success, SCIP_Bool *isorbitope, int ***lexmatrix, int *nrows, int *ncols, int **lexrowsbegin, int **lexcolsbegin, int *nrowmatrices, int *ncolmatrices)
SCIP_RETCODE SCIPgenerateOrbitopeVarsMatrix(SCIP *scip, SCIP_VAR ****vars, int nrows, int ncols, SCIP_VAR **permvars, int npermvars, int **orbitopevaridx, int *columnorder, int *nusedelems, SCIP_Shortbool *rowisbinary, SCIP_Bool *infeasible, SCIP_Bool storelexorder, int **lexorder, int *nvarsorder, int *maxnvarsorder)
SCIP_RETCODE SCIPisPackingPartitioningOrbitope(SCIP *scip, SCIP_VAR ***vars, int nrows, int ncols, SCIP_Bool **pprows, int *npprows, SCIP_ORBITOPETYPE *type)
SCIP_RETCODE SCIPcomputeOrbitsFilterSym(SCIP *scip, int npermvars, int **permstrans, int nperms, SCIP_Shortbool *inactiveperms, int *orbits, int *orbitbegins, int *norbits, int *components, int *componentbegins, int *vartocomponent, unsigned *componentblocked, int ncomponents, int nmovedpermvars)
SCIP_RETCODE SCIPextendSubOrbitope(int **suborbitope, int nrows, int nfilledcols, int coltoextend, int *perm, SCIP_Bool leftextension, int **nusedelems, SCIP_VAR **permvars, SCIP_Shortbool *rowisbinary, SCIP_Bool *success, SCIP_Bool *infeasible)
SCIP_TABLEDATA * SCIPtableGetData(SCIP_TABLE *table)
SCIP_RETCODE SCIPincludeTable(SCIP *scip, const char *name, const char *desc, SCIP_Bool active, SCIP_DECL_TABLECOPY((*tablecopy)), SCIP_DECL_TABLEFREE((*tablefree)), SCIP_DECL_TABLEINIT((*tableinit)), SCIP_DECL_TABLEEXIT((*tableexit)), SCIP_DECL_TABLEINITSOL((*tableinitsol)), SCIP_DECL_TABLEEXITSOL((*tableexitsol)), SCIP_DECL_TABLEOUTPUT((*tableoutput)), SCIP_TABLEDATA *tabledata, int position, SCIP_STAGE earlieststage)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisGE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisLE(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
int SCIPgetDepth(SCIP *scip)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPchgVarUb(SCIP *scip, SCIP_VAR *var, SCIP_Real newbound)
SCIP_CLIQUE ** SCIPgetCliques(SCIP *scip)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
int SCIPvarGetProbindex(SCIP_VAR *var)
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)
int SCIPgetNCliques(SCIP *scip)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_Bool SCIPallowWeakDualReds(SCIP *scip)
SCIP_RETCODE SCIPcaptureVar(SCIP *scip, SCIP_VAR *var)
SCIP_Bool SCIPallowStrongDualReds(SCIP *scip)
void SCIPsortPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
void SCIPsortIntInt(int *intarray1, int *intarray2, int len)
void SCIPsort(int *perm, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIP_RETCODE SCIPfreeSymgraph(SCIP *scip, SYM_GRAPH **graph)
SCIP_RETCODE SCIPcreateSymgraph(SCIP *scip, SYM_SYMTYPE symtype, SYM_GRAPH **graph, SCIP_VAR **symvars, int nsymvars, int nopnodes, int nvalnodes, int nconsnodes, int nedges)
SCIP_RETCODE SCIPcomputeSymgraphColors(SCIP *scip, SYM_GRAPH *graph, SYM_SPEC fixedtype)
SCIP_RETCODE SCIPcreateSymgraphConsnodeperm(SCIP *scip, SYM_GRAPH *graph)
SCIP_RETCODE SCIPfreeSymgraphConsnodeperm(SCIP *scip, SYM_GRAPH *graph)
SCIP_RETCODE SCIPcopySymgraph(SCIP *scip, SYM_GRAPH **graph, SYM_GRAPH *origgraph, int *perm, SYM_SPEC fixedtype)
int SCIPgetSymgraphNVarcolors(SYM_GRAPH *graph)
assert(minobj< SCIPgetCutoffbound(scip))
SCIP_VAR ** SCIPcliqueGetVars(SCIP_CLIQUE *clique)
int SCIPcliqueGetNVars(SCIP_CLIQUE *clique)
int SCIPcliqueGetIndex(SCIP_CLIQUE *clique)
unsigned int SCIPcliqueGetId(SCIP_CLIQUE *clique)
internal miscellaneous methods
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
SCIP_Bool SCIPparamGetBool(SCIP_PARAM *param)
#define PROP_PRESOL_MAXROUNDS
#define PROP_PRESOLTIMING
#define PROP_PRESOL_PRIORITY
#define DEFAULT_CONSSADDLP
static SCIP_Bool conshdlrCanProvideSymInformation(SCIP_CONSHDLR *conshdlr, SYM_SYMTYPE symtype)
#define DEFAULT_MAXGENERATORS
static SCIP_RETCODE tryAddSymmetryHandlingMethodsComponent(SCIP *scip, SCIP_PROPDATA *propdata, int cidx, int *nchgbds)
#define DEFAULT_DETECTSUBGROUPS
#define DEFAULT_SSTLEADERRULE
#define DEFAULT_PREFERLESSROWS
#define ISSSTINTACTIVE(x)
static SCIP_RETCODE tryAddSymmetryHandlingMethods(SCIP *scip, SCIP_PROP *prop, int *nchgbds, SCIP_Bool *earlyterm)
#define TABLE_POSITION_SYMMETRY
#define DEFAULT_ADDWEAKSBCS
static SCIP_Bool checkSortedArraysHaveOverlappingEntry(void **arr1, int narr1, void **arr2, int narr2,)
static SCIP_RETCODE buildSubgroupGraph(SCIP *scip, SCIP_PROPDATA *propdata, int *genorder, int ntwocycleperms, int compidx, int **graphcomponents, int **graphcompbegins, int **compcolorbegins, int *ngraphcomponents, int *ncompcolors, int **usedperms, int *nusedperms, int usedpermssize, SCIP_Shortbool *permused)
#define DEFAULT_ADDSTRONGSBCS
static SCIP_RETCODE propagateSymmetry(SCIP *scip, SCIP_PROPDATA *propdata, SCIP_Bool *infeasible, int *nred, SCIP_Bool *didrun)
#define DEFAULT_SYMCOMPTIMING
SCIP_RETCODE SCIPgetSymmetry(SCIP *scip, int *npermvars, SCIP_VAR ***permvars, SCIP_HASHMAP **permvarmap, int *nperms, int ***perms, int ***permstrans, SCIP_Real *log10groupsize, SCIP_Bool *binvaraffected, int **components, int **componentbegins, int **vartocomponent, int *ncomponents)
static SCIP_RETCODE ensureSymmetryPermvarmapComputed(SCIP *scip, SCIP_PROPDATA *propdata)
static SCIP_RETCODE createConflictGraphSST(SCIP *scip, SCIP_CONFLICTDATA **varconflicts, SCIP_VAR **conflictvars, int nconflictvars, SCIP_HASHMAP *conflictvarmap)
static SCIP_RETCODE ensureDynamicConsArrayAllocatedAndSufficientlyLarge(SCIP *scip, SCIP_CONS ***consarrptr, int *consarrsizeptr, int consarrsizereq)
#define DEFAULT_SSTLEADERVARTYPE
static SCIP_RETCODE tryHandleSingleOrDoubleLexMatricesComponent(SCIP *scip, SCIP_PROPDATA *propdata, SCIP_Bool detectsinglelex, int cidx)
#define DEFAULT_COMPRESSSYMMETRIES
static SCIP_RETCODE adaptSymmetryDataSST(SCIP *scip, int **origperms, int **modifiedperms, int nperms, SCIP_VAR **origpermvars, SCIP_VAR **modifiedpermvars, int npermvars, int *leaders, int nleaders)
#define ISSYMRETOPESACTIVE(x)
static SCIP_RETCODE determineSymmetry(SCIP *scip, SCIP_PROPDATA *propdata, SYM_SPEC symspecrequire, SYM_SPEC symspecrequirefixed)
static SCIP_RETCODE addWeakSBCsSubgroup(SCIP *scip, SCIP_PROPDATA *propdata, int *compcolorbegins, int *graphcompbegins, int *graphcomponents, int ncompcolors, int *chosencomppercolor, int *firstvaridxpercolor, int symgrpcompidx, int *naddedconss, SCIP_Bool storelexorder, int **lexorder, int *nvarsorder, int *maxnvarsorder)
#define DEFAULT_ADDSYMRESACKS
static SCIP_RETCODE setSymmetryData(SCIP *scip, SYM_SYMTYPE symtype, SCIP_VAR **vars, int nvars, int nbinvars, SCIP_VAR ***permvars, int *npermvars, int *nbinpermvars, SCIP_Real **permvardomaincenter, int **perms, int nperms, int *nmovedvars, SCIP_Bool *binvaraffected, SCIP_Bool usecompression, SCIP_Real compressthreshold, SCIP_Bool *compressed)
static int getNOrbitopesInComp(SCIP_VAR **permvars, int *graphcomponents, int *graphcompbegins, int *compcolorbegins, int ncompcolors, int symcompsize)
#define DEFAULT_SSTTIEBREAKRULE
#define DEFAULT_DOUBLEEQUATIONS
#define DEFAULT_SSTMIXEDCOMPONENTS
SCIP_RETCODE SCIPcreateSymOpNodeType(SCIP *scip, const char *opnodename, int *nodetype)
static SCIP_RETCODE displaySymmetriesWithComponents(SCIP *scip, SCIP_PROPDATA *propdata)
#define DEFAULT_ADDCONFLICTCUTS
static SCIP_RETCODE updateSymInfoConflictGraphSST(SCIP *scip, SCIP_CONFLICTDATA *varconflicts, SCIP_VAR **conflictvars, int nconflictvars, int *orbits, int *orbitbegins, int norbits)
#define ISSSTBINACTIVE(x)
static SCIP_RETCODE estimateSymgraphSize(SCIP *scip, int *nopnodes, int *nvalnodes, int *nconsnodes, int *nedges)
static SCIP_RETCODE addSymresackConss(SCIP *scip, SCIP_PROPDATA *propdata, int cidx)
#define DEFAULT_DETECTDOUBLELEX
static SCIP_Bool isNonstandardPerm(SCIP *scip, int *symmetry, SCIP_VAR **vars, int nvars)
static SCIP_RETCODE chooseOrderOfGenerators(SCIP *scip, SCIP_PROPDATA *propdata, int compidx, int **genorder, int *ntwocycleperms)
static SCIP_RETCODE tryHandleSubgroups(SCIP *scip, SCIP_PROPDATA *propdata, int cidx)
static SCIP_Bool testSymmetryComputationRequired(SCIP *scip, SCIP_PROPDATA *propdata)
#define ISSSTIMPLINTACTIVE(x)
static int compareSymgraphs(SCIP *scip, SYM_GRAPH *G1, SYM_GRAPH *G2)
struct SCIP_ConflictData SCIP_CONFLICTDATA
static SCIP_RETCODE resetDynamicSymmetryHandling(SCIP *scip, SCIP_PROPDATA *propdata)
static SCIP_RETCODE selectOrbitLeaderSSTConss(SCIP *scip, SCIP_CONFLICTDATA *varconflicts, SCIP_VAR **conflictvars, int nconflictvars, int *orbits, int *orbitbegins, int norbits, int leaderrule, int tiebreakrule, SCIP_VARTYPE leadervartype, int *orbitidx, int *leaderidx, SCIP_Shortbool *orbitvarinconflict, int *norbitvarinconflict, SCIP_Bool *success)
#define DEFAULT_COMPRESSTHRESHOLD
#define TABLE_EARLIEST_SYMMETRY
#define DEFAULT_DETECTORBITOPES
static SCIP_RETCODE freeSymmetryData(SCIP *scip, SCIP_PROPDATA *propdata)
static SCIP_RETCODE SCIPdisplaySymmetryStatistics(SCIP *scip, SCIP_PROPDATA *propdata)
static SCIP_RETCODE computeSymmetryGroup(SCIP *scip, SYM_SYMTYPE symtype, SCIP_Bool compresssymmetries, SCIP_Real compressthreshold, int maxgenerators, SYM_SPEC fixedtype, SCIP_Bool checksymmetries, SCIP_VAR ***permvars, int *npermvars, int *nbinpermvars, SCIP_Real **permvardomaincenter, int ***perms, int *nperms, int *nmaxperms, int *nmovedvars, SCIP_Bool *binvaraffected, SCIP_Bool *compressed, SCIP_Real *log10groupsize, SCIP_Real *symcodetime, SCIP_Bool *success)
static SCIP_RETCODE handleDoublelLexMatrix(SCIP *scip, SCIP_PROPDATA *propdata, int id, int **varidxmatrix, int nrows, int ncols, int *rowsbegin, int *colsbegin, int nrowblocks, int ncolblocks, SCIP_Bool *success)
#define DEFAULT_ADDCONSSTIMING
#define DEFAULT_SSTADDCUTS
static SCIP_RETCODE checkSymmetriesAreSymmetries(SCIP *scip, SYM_SYMTYPE symtype, int **perms, int nperms, int npermvars, SYM_SPEC fixedtype)
static SCIP_Bool checkSymmetryDataFree(SCIP_PROPDATA *propdata)
#define TABLE_NAME_SYMMETRY
#define DEFAULT_CHECKSYMMETRIES
static SCIP_RETCODE addOrbitopeSubgroup(SCIP *scip, SCIP_PROPDATA *propdata, int *usedperms, int nusedperms, int *compcolorbegins, int *graphcompbegins, int *graphcomponents, int graphcoloridx, int nrows, int ncols, int *firstvaridx, int *compidxfirstrow, int **lexorder, int *nvarslexorder, int *maxnvarslexorder, SCIP_Bool mayinteract, SCIP_Bool *success)
static SCIP_RETCODE addOrbitopesDynamic(SCIP *scip, SCIP_PROPDATA *propdata, int id, int **varidxmatrix, int nrows, int ncols, SCIP_Bool *success)
#define DEFAULT_USEDYNAMICPROP
#define DEFAULT_RECOMPUTERESTART
static SCIP_RETCODE checkComponentsForNonstandardPerms(SCIP *scip, SCIP_PROPDATA *propdata)
#define DEFAULT_NAUTYMAXNCELLS
#define DEFAULT_MAXNCONSSSUBGROUP
static SCIP_RETCODE ensureSymmetryMovedpermvarscountsComputed(SCIP *scip, SCIP_PROPDATA *propdata)
static SCIP_RETCODE tryAddOrbitalRedLexRed(SCIP *scip, SCIP_PROPDATA *propdata, int cidx)
struct SYM_Sortgraphcompvars SYM_SORTGRAPHCOMPVARS
#define TABLE_DESC_SYMMETRY
static SCIP_RETCODE freeConflictGraphSST(SCIP *scip, SCIP_CONFLICTDATA **varconflicts, int nvars)
static SCIP_RETCODE addStrongSBCsSubgroup(SCIP *scip, SCIP_PROPDATA *propdata, int *graphcompbegins, int *graphcomponents, int graphcompidx, SCIP_Bool storelexorder, int **lexorder, int *nvarsorder, int *maxnvarsorder)
#define DEFAULT_ENFORCECOMPUTESYMMETRY
#define ISORBITALREDUCTIONACTIVE(x)
static SCIP_RETCODE addSSTConss(SCIP *scip, SCIP_PROPDATA *propdata, SCIP_Bool onlywithcontvars, int *nchgbds, int cidx)
#define DEFAULT_PERFORMPRESOLVING
static SCIP_RETCODE checkTwoCyclePermsAreOrbitope(SCIP *scip, SCIP_VAR **permvars, int npermvars, int **perms, int *activeperms, int ntwocycles, int nactiveperms, int **orbitopevaridx, int *columnorder, int *nusedelems, int *nusedcols, SCIP_Shortbool *rowisbinary, SCIP_Bool *isorbitope, SCIP_Shortbool *activevars)
static SCIP_RETCODE ensureSymmetryPermstransComputed(SCIP *scip, SCIP_PROPDATA *propdata)
static SCIP_RETCODE displaySymmetriesWithoutComponents(SCIP *scip, SCIP_PROPDATA *propdata)
static SCIP_RETCODE addSSTConssOrbitAndUpdateSST(SCIP *scip, SCIP_CONFLICTDATA *varconflicts, SCIP_PROPDATA *propdata, SCIP_VAR **permvars, int *orbits, int *orbitbegins, int orbitidx, int orbitleaderidx, SCIP_Shortbool *orbitvarinconflict, int norbitvarinconflict, int *nchgbds)
SCIP_RETCODE SCIPincludePropSymmetry(SCIP *scip)
static SCIP_RETCODE displayCycleOfSymmetry(SCIP *scip, int *perm, SYM_SYMTYPE symtype, int baseidx, SCIP_Bool *covered, int nvars, SCIP_VAR **vars)
static SCIP_RETCODE componentPackingPartitioningOrbisackUpgrade(SCIP *scip, SCIP_PROPDATA *propdata, int **componentperms, int componentsize, SCIP_Bool hassignedperm, SCIP_Bool *success)
int SCIPgetSymmetryNGenerators(SCIP *scip)
#define DEFAULT_SYMFIXNONBINARYVARS
static SCIP_RETCODE handleOrbitope(SCIP *scip, SCIP_PROPDATA *propdata, int id, int **varidxmatrix, int nrows, int ncols, SCIP_Bool *success)
static SCIP_RETCODE ensureSymmetryComponentsComputed(SCIP *scip, SCIP_PROPDATA *propdata)
static SCIP_RETCODE detectAndHandleSubgroups(SCIP *scip, SCIP_PROPDATA *propdata, int cidx)
#define ISSSTCONTACTIVE(x)
#define DEFAULT_DISPLAYNORBITVARS
SCIP_RETCODE SCIPgetSymOpNodeType(SCIP *scip, const char *opnodename, int *nodetype)
static SCIP_Bool conshdlrsCanProvideSymInformation(SCIP *scip, SYM_SYMTYPE symtype)
#define DEFAULT_NAUTYMAXNNODES
#define DEFAULT_USECOLUMNSPARSITY
propagator for symmetry handling
public functions to work with algebraic expressions
public methods for data structures
methods for handling symmetries
methods for dealing with symmetry detection graphs
SCIP_RETCODE SCIPlexicographicReductionPropagate(SCIP *scip, SCIP_LEXREDDATA *masterdata, SCIP_Bool *infeasible, int *nred, SCIP_Bool *didrun)
SCIP_RETCODE SCIPlexicographicReductionGetStatistics(SCIP *scip, SCIP_LEXREDDATA *masterdata, int *nred, int *ncutoff)
SCIP_RETCODE SCIPlexicographicReductionReset(SCIP *scip, SCIP_LEXREDDATA *masterdata)
SCIP_RETCODE SCIPlexicographicReductionPrintStatistics(SCIP *scip, SCIP_LEXREDDATA *masterdata)
SCIP_RETCODE SCIPlexicographicReductionFree(SCIP *scip, SCIP_LEXREDDATA **masterdata)
SCIP_RETCODE SCIPlexicographicReductionAddPermutation(SCIP *scip, SCIP_LEXREDDATA *masterdata, SCIP_VAR **permvars, int npermvars, int *perm, SYM_SYMTYPE symtype, SCIP_Real *permvardomaincenter, SCIP_Bool usedynamicorder, SCIP_Bool *success)
SCIP_RETCODE SCIPincludeLexicographicReduction(SCIP *scip, SCIP_LEXREDDATA **masterdata, SCIP_EVENTHDLR *shadowtreeeventhdlr)
methods for handling symmetries by dynamic lexicographic ordering reduction
struct SCIP_LexRedData SCIP_LEXREDDATA
SCIP_RETCODE SCIPorbitalReductionFree(SCIP *scip, SCIP_ORBITALREDDATA **orbireddata)
SCIP_RETCODE SCIPorbitalReductionGetStatistics(SCIP *scip, SCIP_ORBITALREDDATA *orbireddata, int *nred, int *ncutoff)
SCIP_RETCODE SCIPincludeOrbitalReduction(SCIP *scip, SCIP_ORBITALREDDATA **orbireddata, SCIP_EVENTHDLR *shadowtreeeventhdlr)
SCIP_RETCODE SCIPorbitalReductionPrintStatistics(SCIP *scip, SCIP_ORBITALREDDATA *orbireddata)
SCIP_RETCODE SCIPorbitalReductionAddComponent(SCIP *scip, SCIP_ORBITALREDDATA *orbireddata, SCIP_VAR **permvars, int npermvars, int **perms, int nperms, SCIP_Bool *success)
SCIP_RETCODE SCIPorbitalReductionReset(SCIP *scip, SCIP_ORBITALREDDATA *orbireddata)
SCIP_RETCODE SCIPorbitalReductionPropagate(SCIP *scip, SCIP_ORBITALREDDATA *orbireddata, SCIP_Bool *infeasible, int *nred, SCIP_Bool *didrun)
struct SCIP_OrbitalReductionData SCIP_ORBITALREDDATA
SCIP_RETCODE SCIPincludeOrbitopalReduction(SCIP *scip, SCIP_ORBITOPALREDDATA **orbireddata)
SCIP_RETCODE SCIPorbitopalReductionFree(SCIP *scip, SCIP_ORBITOPALREDDATA **orbireddata)
SCIP_RETCODE SCIPorbitopalReductionReset(SCIP *scip, SCIP_ORBITOPALREDDATA *orbireddata)
SCIP_RETCODE SCIPorbitopalReductionAddOrbitope(SCIP *scip, SCIP_ORBITOPALREDDATA *orbireddata, SCIP_ROWORDERING rowordering, SCIP_COLUMNORDERING colordering, SCIP_VAR **vars, int nrows, int ncols, SCIP_Bool *success)
SCIP_RETCODE SCIPorbitopalReductionPropagate(SCIP *scip, SCIP_ORBITOPALREDDATA *orbireddata, SCIP_Bool *infeasible, int *nred, SCIP_Bool *didrun)
SCIP_RETCODE SCIPorbitopalReductionGetStatistics(SCIP *scip, SCIP_ORBITOPALREDDATA *orbireddata, int *nred, int *ncutoff)
SCIP_RETCODE SCIPorbitopalReductionPrintStatistics(SCIP *scip, SCIP_ORBITOPALREDDATA *orbireddata)
SCIP_COLUMNORDERING SCIPorbitopalReductionGetDefaultColumnOrdering(SCIP_ORBITOPALREDDATA *orbireddata)
enum SCIP_ColumnOrdering SCIP_COLUMNORDERING
@ SCIP_ROWORDERING_BRANCHING
struct SCIP_OrbitopalReductionData SCIP_ORBITOPALREDDATA
struct SCIP_Cons SCIP_CONS
struct SYM_Graph SYM_GRAPH
struct SCIP_Conshdlr SCIP_CONSHDLR
struct SCIP_Dialog SCIP_DIALOG
#define SCIP_DECL_DIALOGEXEC(x)
struct SCIP_DialogData SCIP_DIALOGDATA
struct SCIP_Eventhdlr SCIP_EVENTHDLR
struct SCIP_Exprhdlr SCIP_EXPRHDLR
struct SCIP_Clique SCIP_CLIQUE
struct SCIP_HashMap SCIP_HASHMAP
#define SCIP_DECL_SORTPTRCOMP(x)
#define SCIP_DECL_SORTINDCOMP(x)
struct SCIP_DisjointSet SCIP_DISJOINTSET
struct SCIP_Param SCIP_PARAM
#define SCIP_DECL_PROPEXITPRE(x)
#define SCIP_DECL_PROPFREE(x)
#define SCIP_DECL_PROPEXITSOL(x)
#define SCIP_DECL_PROPEXIT(x)
struct SCIP_Prop SCIP_PROP
#define SCIP_DECL_PROPPRESOL(x)
#define SCIP_DECL_PROPINITPRE(x)
#define SCIP_DECL_PROPRESPROP(x)
struct SCIP_PropData SCIP_PROPDATA
#define SCIP_DECL_PROPEXEC(x)
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_ORBITOPETYPE_PACKING
enum SYM_Symtype SYM_SYMTYPE
@ SCIP_LEADERRULE_LASTINORBIT
@ SCIP_LEADERRULE_MAXCONFLICTSINORBIT
@ SCIP_LEADERRULE_FIRSTINORBIT
#define SYM_TIMING_DURINGPRESOL
@ SCIP_LEADERTIEBREAKRULE_MAXORBIT
@ SCIP_LEADERTIEBREAKRULE_MINORBIT
@ SCIP_LEADERTIEBREAKRULE_MAXCONFLICTSINORBIT
#define SYM_TIMING_AFTERPRESOL
#define SYM_TIMING_BEFOREPRESOL
#define SYM_HANDLETYPE_SYMBREAK
enum SCIP_OrbitopeType SCIP_ORBITOPETYPE
#define SYM_HANDLETYPE_SST
#define SYM_HANDLETYPE_ORBITALREDUCTION
#define SCIP_DECL_TABLEFREE(x)
struct SCIP_TableData SCIP_TABLEDATA
#define SCIP_DECL_TABLEOUTPUT(x)
#define SCIP_PROPTIMING_ALWAYS
@ SCIP_VARTYPE_CONTINUOUS
enum SCIP_Vartype SCIP_VARTYPE