51 #define PRESOL_NAME "symmetry" 52 #define PRESOL_DESC "presolver for computing and storing symmetry information about current problem" 53 #define PRESOL_PRIORITY 0 54 #define PRESOL_MAXROUNDS -1 55 #define PRESOL_TIMING SCIP_PRESOLTIMING_EXHAUSTIVE 58 #define DEFAULT_MAXGENERATORS 1500 59 #define DEFAULT_COMPUTEPRESOLVED TRUE 60 #define DEFAULT_CHECKSYMMETRIES FALSE 61 #define DEFAULT_DISPLAYNORBITVARS FALSE 64 #define MAXGENNUMERATOR 64000000 68 struct SCIP_PresolData
87 int oldmaxpreroundscomponents;
88 int oldmaxroundsdomcol;
89 int oldmaxpreroundsdualfix;
119 scip = (
SCIP*) userptr;
181 assert( 0 <= ind1 && ind1 < data->
nrhscoef );
182 assert( 0 <= ind2 && ind2 < data->nrhscoef );
191 diffvals = data->
vals[ind1] - data->
vals[ind2];
193 if ( diffvals < 0.0 )
195 else if ( diffvals > 0.0 )
215 diffvals = vals[ind1] - vals[ind2];
217 if ( diffvals < 0.0 )
219 else if ( diffvals > 0.0 )
265 assert( scip != NULL );
266 assert( vars != NULL );
267 assert( scalars != NULL );
268 assert( *vars != NULL );
269 assert( *scalars != NULL );
270 assert( nvars != NULL );
271 assert( constant != NULL );
277 if ( requiredsize > *nvars )
283 assert( requiredsize <= *nvars );
288 for (v = 0; v < *nvars; ++v)
319 assert( scip != NULL );
320 assert( nlinvars == 0 || linvars != NULL );
321 assert( lhs <= rhs );
334 if ( linvals != NULL )
341 for (j = 0; j < nvars; ++j)
344 assert( vars != NULL );
345 assert( vals != NULL );
370 assert( newsize >= 0 );
390 if ( (
int) rhssense >= 3 )
396 for (j = 0; j < nvars; ++j)
398 assert( nmatcoef < matrixdata->nmaxmatcoef );
400 matrixdata->
matidx[nmatcoef] = nmatcoef;
406 matrixdata->
matcoef[nmatcoef++] = vals[j];
418 for (j = 0; j < nvars; ++j)
420 assert( nmatcoef < matrixdata->nmaxmatcoef );
421 matrixdata->
matidx[nmatcoef] = nmatcoef;
427 matrixdata->
matcoef[nmatcoef++] = -vals[j];
438 for (j = 0; j < nvars; ++j)
440 assert( nmatcoef < matrixdata->nmaxmatcoef );
441 matrixdata->
matidx[nmatcoef] = nmatcoef;
447 matrixdata->
matcoef[nmatcoef++] = vals[j];
482 SCIPdebugMsg(scip,
"Checking whether symmetries are symmetries (generators: %u).\n", nperms);
489 for (j = 0; j < matrixdata->
nrhscoef; ++j)
494 for (j = 0; j < matrixdata->
nmatcoef; ++j)
501 assert( 0 <= rhs && rhs < matrixdata->
nrhscoef );
508 for (j = 0; j < matrixdata->
npermvars; ++j)
512 for (p = 0; p < nperms; ++p)
518 SCIPdebugMsg(scip,
"Verifying automorphism group generator #%d ...\n", p);
522 for (j = 0; j < matrixdata->
npermvars; ++j)
526 SCIPdebugMsg(scip,
"Permutation does not fix types %u, moving variable %d.\n", fixedtype, j);
532 for (r1 = 0; r1 < matrixdata->
nrhscoef; ++r1)
538 assert( 0 <= j && j < matrixdata->nmatcoef );
539 assert( matrixdata->
matrhsidx[j] == r1 );
542 while ( j < matrixdata->nmatcoef && matrixdata->
matrhsidx[j] == r1 )
548 assert( 0 <= varidx && varidx < matrixdata->npermvars );
549 if ( varidx != matrixdata->
matvaridx[j] )
552 permrow[varidx] = matrixdata->
matcoef[j];
561 for (r2 = 0; r2 < matrixdata->
nrhscoef; ++r2)
567 assert( 0 <= j && j < matrixdata->nmatcoef );
568 assert( matrixdata->
matrhsidx[j] == r2 );
595 while ( j < matrixdata->nmatcoef && matrixdata->
matrhsidx[j] == r1 )
599 permrow[varidx] = 0.0;
619 int nhandleconss = 0;
621 assert( scip != NULL );
675 int nuniquevararray = 0;
684 assert( scip != NULL );
685 assert( npermvars != NULL );
686 assert( permvars != NULL );
687 assert( permvarsobj != NULL );
688 assert( nperms != NULL );
689 assert( nmaxperms != NULL );
690 assert( perms != NULL );
691 assert( log10groupsize != NULL );
692 assert( success != NULL );
712 if ( nconss == 0 || nvars == 0 )
719 assert( conss != NULL );
725 if ( nactiveconss == 0 )
733 assert( nhandleconss <= nactiveconss );
734 if ( nhandleconss < nactiveconss )
741 SCIPdebugMsg(scip,
"Detecting %ssymmetry on %d variables and %d constraints.\n", local ?
"local " :
"", nvars, nactiveconss);
745 assert( vars != NULL );
776 for (c = 0; c < nconss; ++c)
778 const char* conshdlrname;
785 assert( cons != NULL );
793 assert( conshdlr != NULL );
796 assert( conshdlrname != NULL );
799 if ( strcmp(conshdlrname,
"linear") == 0 )
805 else if ( strcmp(conshdlrname,
"setppc") == 0 )
826 else if ( strcmp(conshdlrname,
"xor") == 0 )
836 for (j = 0; j < nconsvars; ++j)
838 assert( curconsvars[j] != NULL );
839 consvars[j] = curconsvars[j];
847 consvars[nconsvars] = var;
848 consvals[nconsvars++] = 2.0;
850 assert( nconsvars <= nallvars );
855 else if ( strcmp(conshdlrname,
"and") == 0 )
865 for (j = 0; j < nconsvars; ++j)
867 assert( curconsvars[j] != NULL );
868 consvars[j] = curconsvars[j];
874 consvals[nconsvars++] = 2.0;
875 assert( nconsvars <= nallvars );
880 else if ( strcmp(conshdlrname,
"or") == 0 )
890 for (j = 0; j < nconsvars; ++j)
892 assert( curconsvars[j] != NULL );
893 consvars[j] = curconsvars[j];
899 consvals[nconsvars++] = 2.0;
900 assert( nconsvars <= nallvars );
905 else if ( strcmp(conshdlrname,
"logicor") == 0 )
910 else if ( strcmp(conshdlrname,
"knapsack") == 0 )
918 for (j = 0; j < nconsvars; ++j)
920 assert( nconsvars <= nallvars );
925 else if ( strcmp(conshdlrname,
"varbound") == 0 )
936 else if ( strcmp(conshdlrname,
"bounddisjunction") == 0 )
942 SCIPerrorMessage(
"Cannot determine symmetries for constraint <%s> of constraint handler <%s>.\n",
949 SCIPerrorMessage(
"Cannot determine symmetries for constraint <%s> of constraint handler <%s>.\n",
954 assert( matrixdata.
nrhscoef <= 2 * nactiveconss );
971 assert( vartypemap != NULL );
982 for (j = 0; j < nvars; ++j)
987 assert( var != NULL );
1001 vt = &uniquevararray[nuniquevararray];
1002 assert( nuniquevararray <= matrixdata.
nuniquevars );
1024 SCIPdebugMsg(scip,
"Detected variable <%s> of new type (probindex: %d, obj: %g, lb: %g, ub: %g, type: %d) - color %d.\n",
1039 for (j = 0; j < matrixdata.
nmatcoef; ++j)
1043 idx = matrixdata.
matidx[j];
1044 assert( 0 <= idx && idx < matrixdata.
nmatcoef );
1046 val = matrixdata.
matcoef[idx];
1049 if ( !
SCIPisEQ(scip, val, oldcoef) )
1066 for (j = 0; j < matrixdata.
nrhscoef; ++j)
1071 idx = matrixdata.
rhsidx[j];
1072 assert( 0 <= idx && idx < matrixdata.
nrhscoef );
1074 val = matrixdata.
rhscoef[idx];
1077 if ( sense != oldsense )
1083 if ( !
SCIPisEQ(scip, val, oldcoef) )
1086 SCIPdebugMsg(scip,
"Detected new rhs type %f, type: %u - color: %d\n", val, sense, matrixdata.
nuniquerhs);
1101 SCIPdebugMsg(scip,
"Number of detected different variables: %d (total: %d).\n", matrixdata.
nuniquevars, nvars);
1139 for (j = 0; j < nvars; ++j)
1146 for (j = 0; j < nvars; ++j)
1169 assert( scip != NULL );
1170 assert( presoldata != NULL );
1171 assert( presoldata->perms != NULL );
1172 assert( presoldata->nperms > 0 );
1173 assert( presoldata->npermvars > 0 );
1175 perms = presoldata->perms;
1176 nperms = presoldata->nperms;
1177 nvars = presoldata->npermvars;
1182 for (p = 0; p < nperms; ++p)
1184 for (i = 0; i < nvars; ++i)
1189 if ( perms[p][i] != i )
1197 presoldata->norbitvars = naffected;
1216 assert( scip != NULL );
1217 assert( presoldata != NULL );
1219 assert( ! presoldata->computedsym );
1220 assert( presoldata->npermvars == 0 );
1221 assert( presoldata->permvars == NULL );
1222 assert( presoldata->permvarsobj == NULL );
1223 assert( presoldata->nperms == 0 );
1224 assert( presoldata->nmaxperms == 0 );
1225 assert( presoldata->perms == NULL );
1227 presoldata->computedsym =
TRUE;
1233 assert( usesymmetry );
1262 assert( nhandleconss <= nconss );
1263 if ( nhandleconss < nconss )
1267 " Deactivated symmetry handling methods, since SCIP was built without symmetry detector (SYM=none).\n");
1271 else if ( ! (type & presoldata->symspecrequire) )
1274 " (%.1fs) symmetry computation skipped: type (bin %c, int %c, cont %c) does not match requirements (bin %c, int %c, cont %c)\n",
1279 (presoldata->symspecrequire & (
int)
SYM_SPEC_BINARY) != 0 ?
'+' :
'-',
1281 (presoldata->symspecrequire & (
int)
SYM_SPEC_REAL) != 0 ?
'+' :
'-');
1288 " (%.1fs) symmetry computation skipped: there exist constraints that cannot be handled by symmetry methods\n",
1294 " (%.1fs) symmetry computation started: requiring (bin %c, int %c, cont %c), (fixed: bin %c, int %c, cont %c)\n",
1296 (presoldata->symspecrequire & (
int)
SYM_SPEC_BINARY) != 0 ?
'+' :
'-',
1298 (presoldata->symspecrequire & (
int)
SYM_SPEC_REAL) != 0 ?
'+' :
'-',
1299 (presoldata->symspecrequirefixed & (
int) SYM_SPEC_BINARY) != 0 ?
'+' :
'-',
1300 (presoldata->symspecrequirefixed & (
int) SYM_SPEC_INTEGER) != 0 ?
'+' :
'-',
1301 (presoldata->symspecrequirefixed & (
int) SYM_SPEC_REAL) != 0 ?
'+' :
'-');
1303 if ( presoldata->symspecrequire & presoldata->symspecrequirefixed )
1308 maxgenerators = presoldata->maxgenerators;
1312 &presoldata->npermvars, &presoldata->permvars, &presoldata->permvarsobj, &presoldata->nperms, &presoldata->nmaxperms, &presoldata->perms,
1313 &presoldata->log10groupsize, &presoldata->successful) );
1316 if ( ! presoldata->successful )
1318 else if ( presoldata->nperms == 0 )
1322 assert( presoldata->nperms > 0 );
1324 if ( presoldata->displaynorbitvars )
1331 " (%.1fs) symmetry computation finished: %d generators found (max: ",
1335 if ( maxgenerators == 0 )
1344 if ( presoldata->displaynorbitvars )
1351 " (%.1fs) turning off presolver <domcol>, constraint handler <components>, and propagator <dualfix> for remaining computations in order to avoid conflicts\n",
1364 presoldata->changeddefaultparams =
TRUE;
1381 assert(
scip != NULL );
1382 assert( presol != NULL );
1403 assert(
scip != NULL );
1404 assert( presol != NULL );
1408 assert( presoldata != NULL );
1413 if ( ! presoldata->computepresolved && ! presoldata->computedsym && presoldata->symtype != 0 )
1430 assert(
scip != NULL );
1431 assert( presol != NULL );
1437 assert( presoldata != NULL );
1441 for (i = 0; i < presoldata->nperms; ++i)
1448 presoldata->symtype = 0;
1449 presoldata->symspecrequire = 0;
1450 presoldata->symspecrequirefixed = 0;
1451 presoldata->npermvars = 0;
1452 presoldata->nperms = 0;
1453 presoldata->nmaxperms = 0;
1454 presoldata->norbitvars = 0;
1455 presoldata->computedsym =
FALSE;
1456 presoldata->successful =
FALSE;
1459 if ( presoldata->changeddefaultparams )
1466 presoldata->changeddefaultparams =
FALSE;
1479 assert(
scip != NULL );
1480 assert( presol != NULL );
1486 assert( presoldata != NULL );
1498 assert(
scip != NULL );
1499 assert( presol != NULL );
1501 assert( result != NULL );
1516 assert(
scip != NULL );
1517 assert( presol != NULL );
1535 assert( presoldata != NULL );
1538 if ( presoldata->computepresolved && ! presoldata->computedsym && presoldata->symtype != 0 )
1561 assert( presoldata != NULL );
1563 presoldata->symtype = 0;
1564 presoldata->symspecrequire = 0;
1565 presoldata->symspecrequirefixed = 0;
1566 presoldata->npermvars = 0;
1567 presoldata->permvars = NULL;
1568 presoldata->permvarsobj = NULL;
1569 presoldata->perms = NULL;
1570 presoldata->nperms = 0;
1571 presoldata->nmaxperms = 0;
1572 presoldata->norbitvars = 0;
1573 presoldata->computedsym =
FALSE;
1574 presoldata->successful =
FALSE;
1575 presoldata->changeddefaultparams =
FALSE;
1580 assert( presol != NULL );
1591 "Should the symmetry be computed after presolving (otherwise before presol)?",
1596 "limit on the number of generators that should be produced within symmetry detection (0 = no limit)",
1601 "Should all symmetries be checked after computation?",
1606 "Should the number of variables affected by some symmetry be displayed?",
1632 assert( scip != NULL );
1633 assert( npermvars != NULL );
1634 assert( permvars != NULL );
1635 assert( nperms != NULL );
1636 assert( perms != NULL );
1640 if ( presol == NULL )
1645 assert( presol != NULL );
1649 assert( presoldata != NULL );
1651 if ( ! presoldata->computedsym )
1656 SCIPerrorMessage(
"Cannot call symmetry detection outside of presolving.\n");
1664 *npermvars = presoldata->npermvars;
1665 *permvars = presoldata->permvars;
1666 *nperms = presoldata->nperms;
1667 *perms = presoldata->perms;
1668 if ( log10groupsize != NULL )
1669 *log10groupsize = presoldata->log10groupsize;
1684 assert( scip != NULL );
1685 assert( permvarsobj != NULL );
1689 if ( presol == NULL )
1694 assert( presol != NULL );
1698 assert( presoldata != NULL );
1700 *permvarsobj = presoldata->permvarsobj;
1717 assert( scip != NULL );
1721 if ( presol == NULL )
1726 assert( presol != NULL );
1730 assert( presoldata != NULL );
1733 if ( ( presoldata->symtype & ~ symtype ) != 0 )
1735 SCIPerrorMessage(
"Conflicting symmetry handling methods are activated.\n");
1739 presoldata->symtype |= symtype;
1740 presoldata->symspecrequire |= type;
1741 presoldata->symspecrequirefixed |= fixedtype;
1756 assert( scip != NULL );
1757 assert( afterpresolve != NULL );
1761 if ( presol == NULL )
1766 assert( presol != NULL );
1770 assert( presoldata != NULL );
1772 *afterpresolve = presoldata->computepresolved;
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
SCIP_RETCODE SCIPincludePresolBasic(SCIP *scip, SCIP_PRESOL **presolptr, const char *name, const char *desc, int priority, int maxrounds, SCIP_PRESOLTIMING timing, SCIP_DECL_PRESOLEXEC((*presolexec)), SCIP_PRESOLDATA *presoldata)
int SCIPgetNIntVars(SCIP *scip)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
struct SCIP_PresolData SCIP_PRESOLDATA
#define SCIPallocBlockMemoryArray(scip, ptr, num)
SCIP_RETCODE SCIPsetPresolFree(SCIP *scip, SCIP_PRESOL *presol, SCIP_DECL_PRESOLFREE((*presolfree)))
SCIP_STAGE SCIPgetStage(SCIP *scip)
Constraint handler for variable bound constraints .
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
SCIP_CONSHDLR * SCIPfindConshdlr(SCIP *scip, const char *name)
SCIP_RETCODE SCIPsetPresolExit(SCIP *scip, SCIP_PRESOL *presol, SCIP_DECL_PRESOLEXIT((*presolexit)))
int SCIPgetNVarsSetppc(SCIP *scip, SCIP_CONS *cons)
#define SCIPallocClearBufferArray(scip, ptr, num)
static SCIP_RETCODE checkSymmetriesAreSymmetries(SCIP *scip, SYM_SPEC fixedtype, SYM_MATRIXDATA *matrixdata, int nperms, int **perms)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
int SCIPgetNVarsLogicor(SCIP *scip, SCIP_CONS *cons)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
#define DEFAULT_DISPLAYNORBITVARS
static int getNSymhandableConss(SCIP *scip)
int SCIPgetNActivePricers(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
enum SCIP_Retcode SCIP_RETCODE
SCIP_PRESOLDATA * SCIPpresolGetData(SCIP_PRESOL *presol)
int SCIPvarGetProbindex(SCIP_VAR *var)
static SCIP_RETCODE collectCoefficients(SCIP *scip, SCIP_VAR **linvars, SCIP_Real *linvals, int nlinvars, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool istransformed, SYM_RHSSENSE rhssense, SYM_MATRIXDATA *matrixdata)
SCIP_Bool SCIPconsIsTransformed(SCIP_CONS *cons)
int SCIPgetNActiveConss(SCIP *scip)
#define SCIPfreeBlockMemory(scip, ptr)
SCIP_VAR ** SCIPgetVarsKnapsack(SCIP *scip, SCIP_CONS *cons)
Constraint handler for AND constraints, .
#define SCIPduplicateBufferArray(scip, ptr, source, num)
SCIP_CONS ** SCIPgetConss(SCIP *scip)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
#define SCIPfreeBufferArray(scip, ptr)
Constraint handler for the set partitioning / packing / covering constraints .
#define SCIPallocBlockMemory(scip, ptr)
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_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
int SCIPgetNContVars(SCIP *scip)
SCIP_RETCODE SCIPhashtableCreate(SCIP_HASHTABLE **hashtable, BMS_BLKMEM *blkmem, int tablesize, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr)
interface for symmetry computations
static SCIP_DECL_PRESOLEXEC(presolExecSymmetry)
#define DEFAULT_MAXGENERATORS
int SCIPgetNFixedVars(SCIP *scip)
Constraint handler for "or" constraints, .
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
#define SCIPduplicateBlockMemoryArray(scip, ptr, source, num)
Constraint handler for knapsack constraints of the form , x binary and .
SCIP_VAR ** SCIPgetVarsAnd(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR * SCIPgetVarVarbound(SCIP *scip, SCIP_CONS *cons)
const char * SCIPconshdlrGetName(SCIP_CONSHDLR *conshdlr)
SCIP_VAR * SCIPgetResultantAnd(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetRhsVarbound(SCIP *scip, SCIP_CONS *cons)
Constraint handler for logicor constraints (equivalent to set covering, but algorithms are suited fo...
SCIP_Real SCIPgetVbdcoefVarbound(SCIP *scip, SCIP_CONS *cons)
static INLINE uint32_t SCIPrealHashCode(double x)
SCIP_STATUS SCIPgetStatus(SCIP *scip)
#define DEFAULT_COMPUTEPRESOLVED
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
SCIP_RETCODE SCIPgetTimingSymmetry(SCIP *scip, SCIP_Bool *afterpresolve)
const char * SCIPconsGetName(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetPresolInit(SCIP *scip, SCIP_PRESOL *presol, SCIP_DECL_PRESOLINIT((*presolinit)))
SCIP_RETCODE SCIPmarkDoNotMultaggrVar(SCIP *scip, SCIP_VAR *var)
SCIP_VAR ** SCIPgetVarsLogicor(SCIP *scip, SCIP_CONS *cons)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_PRESOL * SCIPfindPresol(SCIP *scip, const char *name)
SCIP_RETCODE SCIPgetIntParam(SCIP *scip, const char *name, int *value)
SCIP_VAR * SCIPgetVbdvarVarbound(SCIP *scip, SCIP_CONS *cons)
#define SCIPhashTwo(a, b)
SCIP_RETCODE SCIPgetProbvarLinearSum(SCIP *scip, SCIP_VAR **vars, SCIP_Real *scalars, int *nvars, int varssize, SCIP_Real *constant, int *requiredsize, SCIP_Bool mergemultiples)
SCIP_VAR ** SCIPgetVarsOr(SCIP *scip, SCIP_CONS *cons)
void SCIPverbMessage(SCIP *scip, SCIP_VERBLEVEL msgverblevel, FILE *file, const char *formatstr,...)
SCIP_RETCODE SCIPsetPresolInitpre(SCIP *scip, SCIP_PRESOL *presol, SCIP_DECL_PRESOLINITPRE((*presolinitpre)))
SCIP_RETCODE SCIPregisterSymmetry(SCIP *scip, SYM_HANDLETYPE symtype, SYM_SPEC type, SYM_SPEC fixedtype)
static SCIP_DECL_PRESOLINITPRE(presolInitpreSymmetry)
SCIP_Longint SCIPgetCapacityKnapsack(SCIP *scip, SCIP_CONS *cons)
static SCIP_RETCODE computeNOrbitVars(SCIP *scip, SCIP_PRESOLDATA *presoldata)
#define SCIPallocBufferArray(scip, ptr, num)
int SCIPgetNImplVars(SCIP *scip)
int SCIPgetNVarsOr(SCIP *scip, SCIP_CONS *cons)
SCIP_SETPPCTYPE SCIPgetTypeSetppc(SCIP *scip, SCIP_CONS *cons)
SCIP_Bool SYMcanComputeSymmetry(void)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetIntParam(SCIP *scip, const char *name, int value)
const char * SCIPpresolGetName(SCIP_PRESOL *presol)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
static SCIP_DECL_HASHKEYVAL(SYMhashKeyValVartype)
int SCIPgetNRuns(SCIP *scip)
Constraint handler for linear constraints in their most general form, .
void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPgetRhsXor(SCIP *scip, SCIP_CONS *cons)
static SCIP_DECL_PRESOLEXITPRE(presolExitpreSymmetry)
static SCIP_RETCODE determineSymmetry(SCIP *scip, SCIP_PRESOLDATA *presoldata)
SCIP_RETCODE SCIPvarGetOrigvarSum(SCIP_VAR **var, SCIP_Real *scalar, SCIP_Real *constant)
static SCIP_DECL_HASHKEYEQ(SYMhashKeyEQVartype)
int SCIPgetNBinVars(SCIP *scip)
int SCIPconshdlrGetNActiveConss(SCIP_CONSHDLR *conshdlr)
static SCIP_RETCODE computeSymmetryGroup(SCIP *scip, int maxgenerators, SYM_SPEC fixedtype, SCIP_Bool local, SCIP_Bool checksymmetries, int *npermvars, SCIP_VAR ***permvars, SCIP_Real **permvarsobj, int *nperms, int *nmaxperms, int ***perms, SCIP_Real *log10groupsize, SCIP_Bool *success)
SCIP_VAR ** SCIPgetVarsSetppc(SCIP *scip, SCIP_CONS *cons)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
int SCIPgetNVars(SCIP *scip)
SCIP_VAR ** SCIPgetVarsXor(SCIP *scip, SCIP_CONS *cons)
enum SYM_Rhssense SYM_RHSSENSE
Constraint handler for XOR constraints, .
int SCIPgetNVarsXor(SCIP *scip, SCIP_CONS *cons)
void SCIPsort(int *perm, SCIP_DECL_SORTINDCOMP((*indcomp)), void *dataptr, int len)
SCIP_RETCODE SYMcomputeSymmetryGenerators(SCIP *scip, int maxgenerators, SYM_MATRIXDATA *matrixdata, int *nperms, int *nmaxperms, int ***perms, SCIP_Real *log10groupsize)
SCIP_RETCODE SCIPgetPermvarsObjSymmetry(SCIP *scip, SCIP_Real **permvarsobj)
static const SCIP_Real scalars[]
SCIP_VAR ** SCIPgetVarsLinear(SCIP *scip, SCIP_CONS *cons)
static SCIP_DECL_SORTINDCOMP(SYMsortRhsTypes)
const char * SYMsymmetryGetName(void)
SCIP_VAR * SCIPgetResultantOr(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNConss(SCIP *scip)
static SCIP_DECL_PRESOLINIT(presolInitSymmetry)
presolver for storing symmetry information about current problem
static SCIP_DECL_PRESOLEXIT(presolExitSymmetry)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
SCIP_Bool SCIPisStopped(SCIP *scip)
int SCIPgetNVarsAnd(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNVarsKnapsack(SCIP *scip, SCIP_CONS *cons)
const char * SYMsymmetryGetDesc(void)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
SCIP_Bool SCIPhashtableExists(SCIP_HASHTABLE *hashtable, void *element)
SCIP_RETCODE SCIPincludeExternalCodeInformation(SCIP *scip, const char *name, const char *description)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Real * SCIPgetValsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
#define SCIPfreeBlockMemoryArrayNull(scip, ptr, num)
static SCIP_RETCODE getActiveVariables(SCIP *scip, SCIP_VAR ***vars, SCIP_Real **scalars, int *nvars, SCIP_Real *constant, SCIP_Bool transformed)
static SCIP_DECL_HASHGETKEY(SYMhashGetKeyVartype)
SCIP_Longint * SCIPgetWeightsKnapsack(SCIP *scip, SCIP_CONS *cons)
#define SCIPcombineTwoInt(a, b)
SCIP_Real SCIPgetLhsVarbound(SCIP *scip, SCIP_CONS *cons)
static SCIP_DECL_PRESOLFREE(presolFreeSymmetry)
static SCIP_Bool SymmetryFixVar(SYM_SPEC fixedtype, SCIP_VAR *var)
int SCIPgetNVarsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_VAR * SCIPgetIntVarXor(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPgetGeneratorsSymmetry(SCIP *scip, int *npermvars, SCIP_VAR ***permvars, int *nperms, int ***perms, SCIP_Real *log10groupsize)
SCIP_RETCODE SCIPsetPresolExitpre(SCIP *scip, SCIP_PRESOL *presol, SCIP_DECL_PRESOLEXITPRE((*presolexitpre)))
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 SCIPincludePresolSymmetry(SCIP *scip)
#define SCIPreallocBufferArray(scip, ptr, num)
#define DEFAULT_CHECKSYMMETRIES