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 63 #define MAXGENNUMERATOR 64000000 67 struct SCIP_PresolData
84 int oldmaxpreroundscomponents;
85 int oldmaxroundsdomcol;
86 int oldmaxpreroundsdualfix;
116 scip = (
SCIP*) userptr;
178 assert( 0 <= ind1 && ind1 < data->
nrhscoef );
179 assert( 0 <= ind2 && ind2 < data->nrhscoef );
188 diffvals = data->
vals[ind1] - data->
vals[ind2];
190 if ( diffvals < 0.0 )
192 else if ( diffvals > 0.0 )
212 diffvals = vals[ind1] - vals[ind2];
214 if ( diffvals < 0.0 )
216 else if ( diffvals > 0.0 )
262 assert( scip != NULL );
263 assert( vars != NULL );
264 assert( scalars != NULL );
265 assert( *vars != NULL );
266 assert( *scalars != NULL );
267 assert( nvars != NULL );
268 assert( constant != NULL );
274 if ( requiredsize > *nvars )
280 assert( requiredsize <= *nvars );
285 for (v = 0; v < *nvars; ++v)
316 assert( scip != NULL );
317 assert( nlinvars == 0 || linvars != NULL );
318 assert( lhs <= rhs );
331 if ( linvals != NULL )
338 for (j = 0; j < nvars; ++j)
341 assert( vars != NULL );
342 assert( vals != NULL );
367 assert( newsize >= 0 );
387 if ( (
int) rhssense >= 3 )
393 for (j = 0; j < nvars; ++j)
395 assert( nmatcoef < matrixdata->nmaxmatcoef );
397 matrixdata->
matidx[nmatcoef] = nmatcoef;
403 matrixdata->
matcoef[nmatcoef++] = vals[j];
415 for (j = 0; j < nvars; ++j)
417 assert( nmatcoef < matrixdata->nmaxmatcoef );
418 matrixdata->
matidx[nmatcoef] = nmatcoef;
424 matrixdata->
matcoef[nmatcoef++] = -vals[j];
435 for (j = 0; j < nvars; ++j)
437 assert( nmatcoef < matrixdata->nmaxmatcoef );
438 matrixdata->
matidx[nmatcoef] = nmatcoef;
444 matrixdata->
matcoef[nmatcoef++] = vals[j];
479 SCIPdebugMsg(scip,
"Checking whether symmetries are symmetries (generators: %u).\n", nperms);
486 for (j = 0; j < matrixdata->
nrhscoef; ++j)
491 for (j = 0; j < matrixdata->
nmatcoef; ++j)
498 assert( 0 <= rhs && rhs < matrixdata->
nrhscoef );
505 for (j = 0; j < matrixdata->
npermvars; ++j)
509 for (p = 0; p < nperms; ++p)
515 SCIPdebugMsg(scip,
"Verifying automorphism group generator #%d ...\n", p);
519 for (j = 0; j < matrixdata->
npermvars; ++j)
523 SCIPdebugMsg(scip,
"Permutation does not fix types %u, moving variable %d.\n", fixedtype, j);
529 for (r1 = 0; r1 < matrixdata->
nrhscoef; ++r1)
535 assert( 0 <= j && j < matrixdata->nmatcoef );
536 assert( matrixdata->
matrhsidx[j] == r1 );
539 while ( j < matrixdata->nmatcoef && matrixdata->
matrhsidx[j] == r1 )
545 assert( 0 <= varidx && varidx < matrixdata->npermvars );
546 if ( varidx != matrixdata->
matvaridx[j] )
549 permrow[varidx] = matrixdata->
matcoef[j];
558 for (r2 = 0; r2 < matrixdata->
nrhscoef; ++r2)
564 assert( 0 <= j && j < matrixdata->nmatcoef );
565 assert( matrixdata->
matrhsidx[j] == r2 );
592 while ( j < matrixdata->nmatcoef && matrixdata->
matrhsidx[j] == r1 )
596 permrow[varidx] = 0.0;
616 int nhandleconss = 0;
618 assert( scip != NULL );
673 int nuniquevararray = 0;
682 assert( scip != NULL );
683 assert( npermvars != NULL );
684 assert( permvars != NULL );
685 assert( permvarsobj != NULL );
686 assert( nperms != NULL );
687 assert( nmaxperms != NULL );
688 assert( perms != NULL );
689 assert( log10groupsize != NULL );
690 assert( success != NULL );
710 if ( nconss == 0 || nvars == 0 )
717 assert( conss != NULL );
723 if ( nactiveconss == 0 )
731 assert( nhandleconss <= nactiveconss );
732 if ( nhandleconss < nactiveconss )
739 SCIPdebugMsg(scip,
"Detecting %ssymmetry on %d variables and %d constraints.\n", local ?
"local " :
"", nvars, nactiveconss);
743 assert( vars != NULL );
774 for (c = 0; c < nconss; ++c)
776 const char* conshdlrname;
783 assert( cons != NULL );
791 assert( conshdlr != NULL );
794 assert( conshdlrname != NULL );
797 if ( strcmp(conshdlrname,
"linear") == 0 )
803 else if ( strcmp(conshdlrname,
"setppc") == 0 )
824 else if ( strcmp(conshdlrname,
"xor") == 0 )
834 for (j = 0; j < nconsvars; ++j)
836 assert( curconsvars[j] != NULL );
837 consvars[j] = curconsvars[j];
845 consvars[nconsvars] = var;
846 consvals[nconsvars++] = 2.0;
848 assert( nconsvars <= nallvars );
853 else if ( strcmp(conshdlrname,
"and") == 0 )
863 for (j = 0; j < nconsvars; ++j)
865 assert( curconsvars[j] != NULL );
866 consvars[j] = curconsvars[j];
872 consvals[nconsvars++] = 2.0;
873 assert( nconsvars <= nallvars );
878 else if ( strcmp(conshdlrname,
"or") == 0 )
888 for (j = 0; j < nconsvars; ++j)
890 assert( curconsvars[j] != NULL );
891 consvars[j] = curconsvars[j];
897 consvals[nconsvars++] = 2.0;
898 assert( nconsvars <= nallvars );
903 else if ( strcmp(conshdlrname,
"logicor") == 0 )
908 else if ( strcmp(conshdlrname,
"knapsack") == 0 )
916 for (j = 0; j < nconsvars; ++j)
918 assert( nconsvars <= nallvars );
923 else if ( strcmp(conshdlrname,
"varbound") == 0 )
934 else if ( strcmp(conshdlrname,
"bounddisjunction") == 0 )
940 SCIPerrorMessage(
"Cannot determine symmetries for constraint <%s> of constraint handler <%s>.\n",
947 SCIPerrorMessage(
"Cannot determine symmetries for constraint <%s> of constraint handler <%s>.\n",
952 assert( matrixdata.
nrhscoef <= 2 * nactiveconss );
969 assert( vartypemap != NULL );
980 for (j = 0; j < nvars; ++j)
985 assert( var != NULL );
999 vt = &uniquevararray[nuniquevararray];
1000 assert( nuniquevararray <= matrixdata.
nuniquevars );
1022 SCIPdebugMsg(scip,
"Detected variable <%s> of new type (probindex: %d, obj: %g, lb: %g, ub: %g, type: %d) - color %d.\n",
1037 for (j = 0; j < matrixdata.
nmatcoef; ++j)
1041 idx = matrixdata.
matidx[j];
1042 assert( 0 <= idx && idx < matrixdata.
nmatcoef );
1044 val = matrixdata.
matcoef[idx];
1047 if ( !
SCIPisEQ(scip, val, oldcoef) )
1064 for (j = 0; j < matrixdata.
nrhscoef; ++j)
1069 idx = matrixdata.
rhsidx[j];
1070 assert( 0 <= idx && idx < matrixdata.
nrhscoef );
1072 val = matrixdata.
rhscoef[idx];
1075 if ( sense != oldsense )
1081 if ( !
SCIPisEQ(scip, val, oldcoef) )
1084 SCIPdebugMsg(scip,
"Detected new rhs type %f, type: %u - color: %d\n", val, sense, matrixdata.
nuniquerhs);
1099 SCIPdebugMsg(scip,
"Number of detected different variables: %d (total: %d).\n", matrixdata.
nuniquevars, nvars);
1137 for (j = 0; j < nvars; ++j)
1144 for (j = 0; j < nvars; ++j)
1163 assert( scip != NULL );
1164 assert( presoldata != NULL );
1166 assert( ! presoldata->computedsym );
1167 assert( presoldata->npermvars == 0 );
1168 assert( presoldata->permvars == NULL );
1169 assert( presoldata->permvarsobj == NULL );
1170 assert( presoldata->nperms == 0 );
1171 assert( presoldata->nmaxperms == 0 );
1172 assert( presoldata->perms == NULL );
1174 presoldata->computedsym =
TRUE;
1180 assert( usesymmetry );
1209 assert( nhandleconss <= nconss );
1210 if ( nhandleconss < nconss )
1214 " Deactivated symmetry handling methods, since SCIP was built without symmetry detector (SYM=none).\n");
1218 else if ( ! (type & presoldata->symspecrequire) )
1221 " (%.1fs) symmetry computation skipped: type (bin %c, int %c, cont %c) does not match requirements (bin %c, int %c, cont %c)\n",
1226 (presoldata->symspecrequire & (
int)
SYM_SPEC_BINARY) != 0 ?
'+' :
'-',
1228 (presoldata->symspecrequire & (
int)
SYM_SPEC_REAL) != 0 ?
'+' :
'-');
1235 " (%.1fs) symmetry computation skipped: there exist constraints that cannot be handled by symmetry methods\n",
1241 " (%.1fs) symmetry computation started: requiring (bin %c, int %c, cont %c), (fixed: bin %c, int %c, cont %c)\n",
1243 (presoldata->symspecrequire & (
int)
SYM_SPEC_BINARY) != 0 ?
'+' :
'-',
1245 (presoldata->symspecrequire & (
int)
SYM_SPEC_REAL) != 0 ?
'+' :
'-',
1246 (presoldata->symspecrequirefixed & (
int) SYM_SPEC_BINARY) != 0 ?
'+' :
'-',
1247 (presoldata->symspecrequirefixed & (
int) SYM_SPEC_INTEGER) != 0 ?
'+' :
'-',
1248 (presoldata->symspecrequirefixed & (
int) SYM_SPEC_REAL) != 0 ?
'+' :
'-');
1250 if ( presoldata->symspecrequire & presoldata->symspecrequirefixed )
1255 maxgenerators = presoldata->maxgenerators;
1259 &presoldata->npermvars, &presoldata->permvars, &presoldata->permvarsobj, &presoldata->nperms, &presoldata->nmaxperms, &presoldata->perms,
1260 &presoldata->log10groupsize, &presoldata->successful) );
1263 if ( ! presoldata->successful )
1265 else if ( presoldata->nperms == 0 )
1269 assert( presoldata->nperms > 0 );
1271 if ( maxgenerators == 0 )
1274 " (%.1fs) symmetry computation finished: %d generators found (max: -, log10 of symmetry group size: %.1f)\n",
1280 " (%.1fs) symmetry computation finished: %d generators found (max: %u, log10 of symmetry group size: %.1f)\n",
1281 SCIPgetSolvingTime(scip), presoldata->nperms, maxgenerators, presoldata->log10groupsize);
1286 " (%.1fs) turning off presolver <domcol>, constraint handler <components>, and propagator <dualfix> for remaining computations in order to avoid conflicts\n",
1299 presoldata->changeddefaultparams =
TRUE;
1317 assert(
scip != NULL );
1318 assert( presol != NULL );
1339 assert(
scip != NULL );
1340 assert( presol != NULL );
1344 assert( presoldata != NULL );
1349 if ( ! presoldata->computepresolved && ! presoldata->computedsym && presoldata->symtype != 0 )
1366 assert(
scip != NULL );
1367 assert( presol != NULL );
1373 assert( presoldata != NULL );
1377 for (i = 0; i < presoldata->nperms; ++i)
1384 presoldata->symtype = 0;
1385 presoldata->symspecrequire = 0;
1386 presoldata->symspecrequirefixed = 0;
1387 presoldata->npermvars = 0;
1388 presoldata->nperms = 0;
1389 presoldata->nmaxperms = 0;
1390 presoldata->computedsym =
FALSE;
1391 presoldata->successful =
FALSE;
1394 if ( presoldata->changeddefaultparams )
1401 presoldata->changeddefaultparams =
FALSE;
1414 assert(
scip != NULL );
1415 assert( presol != NULL );
1421 assert( presoldata != NULL );
1433 assert(
scip != NULL );
1434 assert( presol != NULL );
1436 assert( result != NULL );
1451 assert(
scip != NULL );
1452 assert( presol != NULL );
1470 assert( presoldata != NULL );
1473 if ( presoldata->computepresolved && ! presoldata->computedsym && presoldata->symtype != 0 )
1496 assert( presoldata != NULL );
1498 presoldata->symtype = 0;
1499 presoldata->symspecrequire = 0;
1500 presoldata->symspecrequirefixed = 0;
1501 presoldata->npermvars = 0;
1502 presoldata->permvars = NULL;
1503 presoldata->permvarsobj = NULL;
1504 presoldata->perms = NULL;
1505 presoldata->nperms = 0;
1506 presoldata->nmaxperms = 0;
1507 presoldata->computedsym =
FALSE;
1508 presoldata->successful =
FALSE;
1509 presoldata->changeddefaultparams =
FALSE;
1514 assert( presol != NULL );
1525 "Should the symmetry be computed after presolving (otherwise before presol)?",
1530 "limit on the number of generators that should be produced within symmetry detection (0 = no limit)",
1535 "Should all symmetries be checked after computation?",
1561 assert( scip != NULL );
1562 assert( npermvars != NULL );
1563 assert( permvars != NULL );
1564 assert( nperms != NULL );
1565 assert( perms != NULL );
1569 if ( presol == NULL )
1574 assert( presol != NULL );
1578 assert( presoldata != NULL );
1580 if ( ! presoldata->computedsym )
1585 SCIPerrorMessage(
"Cannot call symmetry detection outside of presolving.\n");
1593 *npermvars = presoldata->npermvars;
1594 *permvars = presoldata->permvars;
1595 *nperms = presoldata->nperms;
1596 *perms = presoldata->perms;
1597 if ( log10groupsize != NULL )
1598 *log10groupsize = presoldata->log10groupsize;
1613 assert( scip != NULL );
1614 assert( permvarsobj != NULL );
1618 if ( presol == NULL )
1623 assert( presol != NULL );
1627 assert( presoldata != NULL );
1629 *permvarsobj = presoldata->permvarsobj;
1646 assert( scip != NULL );
1650 if ( presol == NULL )
1655 assert( presol != NULL );
1659 assert( presoldata != NULL );
1662 if ( ( presoldata->symtype & ~ symtype ) != 0 )
1664 SCIPerrorMessage(
"Conflicting symmetry handling methods are activated.\n");
1668 presoldata->symtype |= symtype;
1669 presoldata->symspecrequire |= type;
1670 presoldata->symspecrequirefixed |= fixedtype;
1685 assert( scip != NULL );
1686 assert( afterpresolve != NULL );
1690 if ( presol == NULL )
1695 assert( presol != NULL );
1699 assert( presoldata != NULL );
1701 *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)
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)
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)
#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