62#define SEPA_NAME "zerohalf"
63#define SEPA_DESC "{0,1/2}-cuts separator"
64#define SEPA_PRIORITY -6000
66#define SEPA_MAXBOUNDDIST 1.0
67#define SEPA_USESSUBSCIP FALSE
68#define SEPA_DELAY FALSE
70#define DEFAULT_MAXROUNDS 5
71#define DEFAULT_MAXROUNDSROOT 20
72#define DEFAULT_MAXSEPACUTS 20
73#define DEFAULT_MAXSEPACUTSROOT 100
74#define DEFAULT_MAXCUTCANDS 2000
75#define DEFAULT_MAXSLACK 0.0
76#define DEFAULT_MAXSLACKROOT 0.0
77#define DEFAULT_GOODSCORE 1.0
79#define DEFAULT_BADSCORE 0.5
80#define DEFAULT_MINVIOL 0.1
81#define DEFAULT_DYNAMICCUTS TRUE
82#define DEFAULT_MAXROWDENSITY 0.05
83#define DEFAULT_DENSITYOFFSET 100
84#define DEFAULT_INITSEED 0x5EED
85#define DEFAULT_OBJPARALWEIGHT 0.0
86#define DEFAULT_EFFICACYWEIGHT 1.0
87#define DEFAULT_DIRCUTOFFDISTWEIGHT 0.0
88#define DEFAULT_GOODMAXPARALL 0.1
89#define DEFAULT_MAXPARALL 0.1
93#define MAXSCALE 1000.0
96#define MAXREDUCTIONROUNDS 100
97#define BOUNDSWITCH 0.5
98#define MAXAGGRLEN(nvars) ((int)(0.1*(nvars)+1000))
108#define ROWIND_TYPE unsigned int
114#define UNIQUE_INDEX(rowind) (3*(rowind).index + (rowind).type)
209#define COLINFO_GET_MOD2COL(x) ((MOD2_COL*) (((uintptr_t)(x)) & ~((uintptr_t)1)))
210#define COLINFO_GET_RHSOFFSET(x) ((int) (((uintptr_t)(x)) & ((uintptr_t)1)))
211#define COLINFO_CREATE(mod2col, rhsoffset) ((void*) (((uintptr_t)(mod2col)) | ((uintptr_t)(rhsoffset))))
270 if( slack1iszero && !slack2iszero )
272 if( slack2iszero && !slack1iszero )
274 if( !slack1iszero && !slack2iszero )
323 *sval = val * scalar;
324 downval = floor(*sval);
330 if( downviol < upviol )
362 assert(sign == +1 || sign == -1);
375 for(
i = 0;
i < rowlen; ++
i )
383 transrowvars[transrowlen] = probindex;
384 transrowvals[transrowlen] = sign * rowvals[
i];
385 intvarpos[probindex] = ++transrowlen;
391 for(
i = 0;
i < rowlen; ++
i )
410 val = sign * rowvals[
i];
430 if( closestvbdind >= 0 && (
SCIPisGT(
scip, closestvbd, closestbound) || (localbound &&
SCIPisSumEQ(
scip, closestvbd, closestbound))) )
435 closestbound = closestvbd;
458 if( closestvbdind >= 0 && (
SCIPisLT(
scip, closestvbd, closestbound) || (localbound &&
SCIPisSumEQ(
scip, closestvbd, closestbound))) )
463 closestbound = closestvbd;
471 if( closestvbdind >= 0 )
476 coef = val * vbdcoef;
477 transrowrhs -= val * vbdconst;
482 transrowvals[pos] += coef;
487 transrowvals[transrowlen] = coef;
493 local = local || localbound;
494 transrowrhs -= val * closestbound;
503 for(
i = 0;
i < transrowlen;)
505 intvarpos[transrowvars[
i]] = 0;
509 transrowvals[
i] = transrowvals[transrowlen];
510 transrowvars[
i] = transrowvars[transrowlen];
516 if( transrowlen <= 1 )
542 transrowrhs *= intscalar;
548 for(
i = 0;
i < transrowlen; ++
i )
558 if( intval < newval )
568 transrowrhs += (intval - newval) * lb;
580 transrowrhs += (intval - newval) * ub;
584 slack -= solval * intval;
585 transrowvals[
i] = intval;
593 if( slack <= maxslack )
595 introw->
rhs = floorrhs;
596 introw->
slack = slack;
597 introw->
vals = transrowvals;
598 introw->
varinds = transrowvars;
599 introw->
len = transrowlen;
600 introw->
size = rowlen;
601 introw->
local = local;
650 for(
i = 0;
i < nrows; ++
i )
674 lhsslack = activity - lhs;
681 rhsslack = rhs - activity;
683 if( rhsslack > maxslack && lhsslack > maxslack )
690 if( rhsslack <= maxslack )
695 rowlen, rowvals, rowcols, rhs, intvarpos, introw, &success) );
697 assert(success == 1 || success == 0);
701 if( lhsslack <= maxslack )
706 rowlen, rowvals, rowcols, -lhs, intvarpos, introw, &success) );
708 assert(success == 1 || success == 0);
743 mod2matrix->
cols[col->
pos] = col;
785 for(
i = 0;
i < nslots; ++
i )
869 for(
i = 0;
i < rowlen; ++
i )
881 row->
rhs = (row->
rhs + rhsoffset) % 2;
950 for(
i = 0;
i < introw->
len; ++
i )
962 row->
rhs = (row->
rhs + rhsoffset) % 2;
997 for(
i = 0;
i < mod2matrix->
ncols; ++
i )
1003 for(
i = 0;
i < mod2matrix->
nrows; ++
i )
1054 mod2matrix->
ncols = 0;
1057 mod2matrix->
nrows = 0;
1063 for(
i = 0;
i < nintvars; ++
i )
1118 for(
i = 0;
i < nrows; ++
i )
1146 lhsslack = activity - lhs;
1155 rhsslack = rhs - activity;
1159 if( rhsslack <= maxslack && lhsslack <= maxslack )
1161 if( lhsmod2 == rhsmod2 )
1180 else if( rhsslack <= maxslack )
1186 else if( lhsslack <= maxslack )
1226 for(
i = 0;
i < nslotscol1; ++
i )
1251 for(
i = 0;
i < nslots; ++
i )
1253 if( rows[
i] !=
NULL )
1299 signature = row->
rhs;
1316 int position = row->
pos;
1325 --mod2matrix->
nrows;
1326 mod2matrix->
rows[position] = mod2matrix->
rows[mod2matrix->
nrows];
1327 mod2matrix->
rows[position]->
pos = position;
1358 position = col->
pos;
1361 --mod2matrix->
ncols;
1362 mod2matrix->
cols[position] = mod2matrix->
cols[mod2matrix->
ncols];
1363 mod2matrix->
cols[position]->
pos = position;
1369 for(
i = 0;
i < nslots; ++
i )
1371 if( rows[
i] !=
NULL )
1392 SCIPhashGetKeyStandard, columnsEqual, columnGetSignature,
NULL) );
1394 for(
i = 0;
i < mod2matrix->
ncols; )
1398 if( nnonzrows == 0 )
1402 else if( nnonzrows == 1 )
1410 while( rows[j] ==
NULL )
1434 if( identicalcol !=
NULL )
1436 assert(identicalcol != col);
1459#define NONZERO(x) (COPYSIGN(1e-100, (x)) + (x))
1484 for(
i = 0;
i < rowlen; ++
i )
1490 val = tmpcoefs[probindex];
1493 nonzeroinds[(*nnz)++] = probindex;
1496 val += weight * rowvals[
i];
1497 tmpcoefs[probindex] =
NONZERO(val);
1529 for(
i = 0;
i < introw->
len; ++
i )
1531 int probindex = introw->
varinds[
i];
1536 nonzeroinds[(*nnz)++] = probindex;
1539 val += 0.5 * introw->
vals[
i];
1540 tmpcoefs[probindex] =
NONZERO(val);
1543 *cutrhs += 0.5 * introw->
rhs;
1545 *cutrank =
MAX(*cutrank, introw->
rank);
1546 *cutislocal = *cutislocal || introw->
local;
1573 for(
i = 0;
i < cutnnz; ++
i )
1576 return (activity - cutrhs) /
MAX(1e-6, norm);
1587 viol = 1.0 - row->
slack;
1602 viol = 1.0 - row->
slack;
1682 addTransRow(tmpcoefs, &cutrhs, cutinds, &cutnnz, &cutrank, &cutislocal, introw);
1691 if( cutnnz > maxaggrlen )
1694 for(
i = 0;
i < cutnnz; ++
i )
1703 for(
i = 0;
i < cutnnz; )
1711 if(
REALABS(coef - floorcoef) > 0.1 )
1784 if( floorcoef == 0.0 )
1787 cutinds[
i] = cutinds[cutnnz];
1791 cutcoefs[
i] = floorcoef;
1814 assert(allowlocal || !cutislocal);
1827 for( v = 0; v < cutnnz; ++v )
1882 SCIPhashGetKeyStandard, rowsEqual, rowGetSignature,
NULL) );
1884 for(
i = 0;
i < mod2matrix->
nrows; )
1902 if( identicalrow !=
NULL )
1904 assert(identicalrow != row);
1910 if( identicalrow->
slack <= row->slack )
1926 assert(mod2matrix->
rows[row->pos] == row && mod2matrix->
rows[identicalrow->pos] == identicalrow);
1927 assert(identicalrow->pos ==
i);
1985 row->
rhs ^= rowtoadd->
rhs;
1993 row->
slack = newslack;
2051 while(
i < row->nnonzcols && j < rowtoadd->nnonzcols )
2067 newnonzcols[k++] = rowtoadd->
nonzcols[j++];
2077 while( j < rowtoadd->nnonzcols )
2080 newnonzcols[k++] = rowtoadd->
nonzcols[j++];
2230 if( mod2matrix.
nrows == 0 )
2243 ncancel = mod2matrix.
nrows;
2252 if( mod2matrix.
ncols == 0 )
2258 for(
i = 0;
i < ncancel; ++
i )
2291 for( j = 0; j < nslots; ++j )
2293 if( rows[j] !=
NULL && rows[j] != row )
2294 nonzrows[nnonzrows++] = rows[j];
2297 for( j = 0; j < nnonzrows; ++j )
2343 sepadata->ncuts, 0, maxsepacuts, &nselectedcuts) );
2347 if(
i < nselectedcuts )
2453 "maximal number of zerohalf separation rounds per node (-1: unlimited)",
2456 "separating/" SEPA_NAME "/maxroundsroot",
2457 "maximal number of zerohalf separation rounds in the root node (-1: unlimited)",
2461 "maximal number of zerohalf cuts separated per separation round",
2465 "initial seed used for random tie-breaking in cut selection",
2468 "separating/" SEPA_NAME "/maxsepacutsroot",
2469 "maximal number of zerohalf cuts separated per separation round in the root node",
2473 "maximal number of zerohalf cuts considered per separation round",
2477 "maximal slack of rows to be used in aggregation",
2480 "separating/" SEPA_NAME "/maxslackroot",
2481 "maximal slack of rows to be used in aggregation in the root node",
2485 "threshold for score of cut relative to best score to be considered good, so that less strict filtering is applied",
2489 "threshold for score of cut relative to best score to be discarded",
2492 "separating/" SEPA_NAME "/objparalweight",
2493 "weight of objective parallelism in cut score calculation",
2496 "separating/" SEPA_NAME "/efficacyweight",
2497 "weight of efficacy in cut score calculation",
2500 "separating/" SEPA_NAME "/dircutoffdistweight",
2501 "weight of directed cutoff distance in cut score calculation",
2504 "separating/" SEPA_NAME "/goodmaxparall",
2505 "maximum parallelism for good cuts",
2509 "maximum parallelism for non-good cuts",
2513 "minimal violation to generate zerohalfcut for",
2517 "should generated cuts be removed from the LP if they are no longer tight?",
2520 "separating/" SEPA_NAME "/maxrowdensity",
2521 "maximal density of row to be used in aggregation",
2524 "separating/" SEPA_NAME "/densityoffset",
2525 "additional number of variables allowed in row on top of density",
#define DEFAULT_EFFICACYWEIGHT
#define DEFAULT_MAXROUNDSROOT
#define DEFAULT_MAXSEPACUTSROOT
#define DEFAULT_MAXSEPACUTS
#define DEFAULT_MAXROUNDS
#define DEFAULT_OBJPARALWEIGHT
#define DEFAULT_DIRCUTOFFDISTWEIGHT
#define SCIP_DEFAULT_EPSILON
#define SCIP_LONGINT_FORMAT
SCIP_RETCODE SCIPselectCutsHybrid(SCIP *scip, SCIP_ROW **cuts, SCIP_ROW **forcedcuts, SCIP_RANDNUMGEN *randnumgen, SCIP_Real goodscorefac, SCIP_Real badscorefac, SCIP_Real goodmaxparall, SCIP_Real maxparall, SCIP_Real dircutoffdistweight, SCIP_Real efficacyweight, SCIP_Real objparalweight, SCIP_Real intsupportweight, int ncuts, int nforcedcuts, int maxselectedcuts, int *nselectedcuts)
SCIP_Bool SCIPisStopped(SCIP *scip)
int SCIPgetNContVars(SCIP *scip)
int SCIPgetNVars(SCIP *scip)
SCIP_VAR ** SCIPgetVars(SCIP *scip)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapInsert(SCIP_HASHMAP *hashmap, void *origin, void *image)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
void SCIPhashsetFree(SCIP_HASHSET **hashset, BMS_BLKMEM *blkmem)
SCIP_Bool SCIPhashsetExists(SCIP_HASHSET *hashset, void *element)
void ** SCIPhashsetGetSlots(SCIP_HASHSET *hashset)
int SCIPhashsetGetNElements(SCIP_HASHSET *hashset)
int SCIPhashsetGetNSlots(SCIP_HASHSET *hashset)
SCIP_RETCODE SCIPhashsetInsert(SCIP_HASHSET *hashset, BMS_BLKMEM *blkmem, void *element)
SCIP_RETCODE SCIPhashsetCreate(SCIP_HASHSET **hashset, BMS_BLKMEM *blkmem, int size)
SCIP_RETCODE SCIPhashsetRemove(SCIP_HASHSET *hashset, void *element)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
SCIP_Bool SCIPhashtableExists(SCIP_HASHTABLE *hashtable, void *element)
SCIP_RETCODE SCIPhashtableCreate(SCIP_HASHTABLE **hashtable, BMS_BLKMEM *blkmem, int tablesize, SCIP_DECL_HASHGETKEY((*hashgetkey)), SCIP_DECL_HASHKEYEQ((*hashkeyeq)), SCIP_DECL_HASHKEYVAL((*hashkeyval)), void *userptr)
void * SCIPhashtableRetrieve(SCIP_HASHTABLE *hashtable, void *key)
SCIP_RETCODE SCIPhashtableRemove(SCIP_HASHTABLE *hashtable, void *element)
SCIP_RETCODE SCIPhashtableInsert(SCIP_HASHTABLE *hashtable, void *element)
#define SCIPhashSignature64(a)
SCIP_RETCODE SCIPcalcIntegralScalar(SCIP_Real *vals, int nvals, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Longint maxdnom, SCIP_Real maxscale, SCIP_Real *intscalar, SCIP_Bool *success)
SCIP_Real SCIPrelDiff(SCIP_Real val1, SCIP_Real val2)
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_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)
void SCIPswapInts(int *value1, int *value2)
void SCIPswapPointers(void **pointer1, void **pointer2)
int SCIPgetNLPBranchCands(SCIP *scip)
int SCIPcolGetVarProbindex(SCIP_COL *col)
SCIP_VAR * SCIPcolGetVar(SCIP_COL *col)
SCIP_Bool SCIPcolIsIntegral(SCIP_COL *col)
SCIP_RETCODE SCIPaddPoolCut(SCIP *scip, SCIP_ROW *row)
SCIP_Bool SCIPcutsTightenCoefficients(SCIP *scip, SCIP_Bool cutislocal, SCIP_Real *cutcoefs, SCIP_Real *cutrhs, int *cutinds, int *cutnnz, int *nchgcoefs)
SCIP_RETCODE SCIPaggrRowCreate(SCIP *scip, SCIP_AGGRROW **aggrrow)
SCIP_Bool SCIPisCutNew(SCIP *scip, SCIP_ROW *row)
SCIP_Bool SCIPisEfficacious(SCIP *scip, SCIP_Real efficacy)
void SCIPaggrRowFree(SCIP *scip, SCIP_AGGRROW **aggrrow)
SCIP_RETCODE SCIPaddRow(SCIP *scip, SCIP_ROW *row, SCIP_Bool forcecut, SCIP_Bool *infeasible)
SCIP_Real SCIPgetVectorEfficacyNorm(SCIP *scip, SCIP_Real *vals, int nvals)
SCIP_RETCODE SCIPgetLPColsData(SCIP *scip, SCIP_COL ***cols, int *ncols)
SCIP_RETCODE SCIPgetLPRowsData(SCIP *scip, SCIP_ROW ***rows, int *nrows)
SCIP_ROW ** SCIPgetLPRows(SCIP *scip)
int SCIPgetNLPRows(SCIP *scip)
SCIP_LPSOLSTAT SCIPgetLPSolstat(SCIP *scip)
int SCIPgetNLPCols(SCIP *scip)
#define SCIPfreeCleanBufferArray(scip, ptr)
#define SCIPallocCleanBufferArray(scip, ptr, num)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
#define SCIPensureBlockMemoryArray(scip, ptr, arraysizeptr, minsize)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPallocBufferArray(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 SCIPallocBlockMemory(scip, ptr)
SCIP_Bool SCIProwIsIntegral(SCIP_ROW *row)
SCIP_Real SCIProwGetLhs(SCIP_ROW *row)
SCIP_Bool SCIProwIsModifiable(SCIP_ROW *row)
SCIP_RETCODE SCIPcacheRowExtensions(SCIP *scip, SCIP_ROW *row)
int SCIProwGetNNonz(SCIP_ROW *row)
SCIP_COL ** SCIProwGetCols(SCIP_ROW *row)
SCIP_Real SCIProwGetRhs(SCIP_ROW *row)
int SCIProwGetNLPNonz(SCIP_ROW *row)
int SCIProwGetLPPos(SCIP_ROW *row)
SCIP_RETCODE SCIPflushRowExtensions(SCIP *scip, SCIP_ROW *row)
SCIP_Bool SCIProwIsLocal(SCIP_ROW *row)
SCIP_RETCODE SCIPaddVarToRow(SCIP *scip, SCIP_ROW *row, SCIP_VAR *var, SCIP_Real val)
SCIP_RETCODE SCIPreleaseRow(SCIP *scip, SCIP_ROW **row)
SCIP_RETCODE SCIPcreateEmptyRowSepa(SCIP *scip, SCIP_ROW **row, SCIP_SEPA *sepa, const char *name, SCIP_Real lhs, SCIP_Real rhs, SCIP_Bool local, SCIP_Bool modifiable, SCIP_Bool removable)
int SCIProwGetRank(SCIP_ROW *row)
void SCIProwChgRank(SCIP_ROW *row, int rank)
SCIP_Real SCIProwGetConstant(SCIP_ROW *row)
SCIP_Real * SCIProwGetVals(SCIP_ROW *row)
SCIP_Real SCIPgetRowSolActivity(SCIP *scip, SCIP_ROW *row, SCIP_SOL *sol)
SCIP_RETCODE SCIPincludeSepaBasic(SCIP *scip, SCIP_SEPA **sepa, const char *name, const char *desc, int priority, int freq, SCIP_Real maxbounddist, SCIP_Bool usessubscip, SCIP_Bool delay, SCIP_DECL_SEPAEXECLP((*sepaexeclp)), SCIP_DECL_SEPAEXECSOL((*sepaexecsol)), SCIP_SEPADATA *sepadata)
SCIP_RETCODE SCIPsetSepaFree(SCIP *scip, SCIP_SEPA *sepa,)
const char * SCIPsepaGetName(SCIP_SEPA *sepa)
int SCIPsepaGetNCallsAtNode(SCIP_SEPA *sepa)
SCIP_RETCODE SCIPsetSepaExitsol(SCIP *scip, SCIP_SEPA *sepa,)
SCIP_RETCODE SCIPsetSepaInitsol(SCIP *scip, SCIP_SEPA *sepa,)
SCIP_SEPADATA * SCIPsepaGetData(SCIP_SEPA *sepa)
void SCIPsepaSetData(SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata)
SCIP_RETCODE SCIPsetSepaCopy(SCIP *scip, SCIP_SEPA *sepa,)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_Longint SCIPgetNLPs(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisPositive(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasCeil(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasFloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisSumLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPround(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeasRound(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisSumEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeastol(SCIP *scip)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPepsilon(SCIP *scip)
SCIP_Real SCIPsumepsilon(SCIP *scip)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisSumGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real * SCIPvarGetVlbCoefs(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetUbGlobal(SCIP_VAR *var)
SCIP_RETCODE SCIPgetVarClosestVub(SCIP *scip, SCIP_VAR *var, SCIP_SOL *sol, SCIP_Real *closestvub, int *closestvubidx)
int SCIPvarGetProbindex(SCIP_VAR *var)
SCIP_Real * SCIPvarGetVlbConstants(SCIP_VAR *var)
SCIP_RETCODE SCIPgetVarClosestVlb(SCIP *scip, SCIP_VAR *var, SCIP_SOL *sol, SCIP_Real *closestvlb, int *closestvlbidx)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_VAR ** SCIPvarGetVlbVars(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbGlobal(SCIP_VAR *var)
SCIP_Real * SCIPvarGetVubConstants(SCIP_VAR *var)
SCIP_VAR ** SCIPvarGetVubVars(SCIP_VAR *var)
SCIP_Real * SCIPvarGetVubCoefs(SCIP_VAR *var)
void SCIPselectPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int k, int len)
SCIP_RETCODE SCIPincludeSepaZerohalf(SCIP *scip)
SCIP_Bool SCIPsortedvecFindPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), void *val, int len, int *pos)
void SCIPsortPtr(void **ptrarray, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIPfreeRandom(scip, &heurdata->randnumgen)
SCIPcreateRandom(scip, &heurdata->randnumgen, DEFAULT_RANDSEED, TRUE))
assert(minobj< SCIPgetCutoffbound(scip))
#define BMSallocBlockMemory(mem, ptr)
#define BMSclearMemory(ptr)
#define BMScopyMemoryArray(ptr, source, num)
#define BMSmoveMemoryArray(ptr, source, num)
struct BMS_BlkMem BMS_BLKMEM
#define DEFAULT_DYNAMICCUTS
#define DEFAULT_MAXSLACKROOT
#define DEFAULT_DENSITYOFFSET
#define SEPA_MAXBOUNDDIST
#define DEFAULT_MAXROWDENSITY
static SCIP_RETCODE computeMaxViolation(SCIP *scip, SCIP_SEPADATA *sepadata, SCIP_SOL *sol, SCIP_Real *maxviolation)
#define DEFAULT_GOODSCORE
#define DEFAULT_MAXPARALL
#define DEFAULT_GOODMAXPARALL
static SCIP_RETCODE mod2matrixPreprocessColumns(SCIP *scip, MOD2_MATRIX *mod2matrix, SCIP_SEPADATA *sepadata)
static void addOrigRow(SCIP *scip, SCIP_Real *tmpcoefs, SCIP_Real *cutrhs, int *nonzeroinds, int *nnz, int *cutrank, SCIP_Bool *cutislocal, SCIP_ROW *row, int sign)
#define COLINFO_GET_RHSOFFSET(x)
static SCIP_RETCODE transformNonIntegralRow(SCIP *scip, SCIP_SOL *sol, SCIP_Bool allowlocal, SCIP_Real maxslack, int sign, SCIP_Bool local, int rank, int rowlen, SCIP_Real *rowvals, SCIP_COL **rowcols, SCIP_Real rhs, int *intvarpos, TRANSINTROW *introw, SCIP_Bool *success)
struct Mod2Matrix MOD2_MATRIX
static SCIP_Real computeViolation(MOD2_ROW *row)
static SCIP_RETCODE mod2MatrixAddOrigRow(SCIP *scip, BMS_BLKMEM *blkmem, MOD2_MATRIX *mod2matrix, SCIP_HASHMAP *origcol2col, SCIP_ROW *origrow, SCIP_Real slack, ROWIND_TYPE side, int rhsmod2)
static SCIP_RETCODE generateZerohalfCut(SCIP *scip, SCIP_SOL *sol, MOD2_MATRIX *mod2matrix, SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata, SCIP_Bool allowlocal, MOD2_ROW *row)
static void destroyMod2Matrix(SCIP *scip, MOD2_MATRIX *mod2matrix)
#define MAXREDUCTIONROUNDS
static void getIntegralScalar(SCIP_Real val, SCIP_Real scalar, SCIP_Real mindelta, SCIP_Real maxdelta, SCIP_Real *sval, SCIP_Real *intval)
static void addTransRow(SCIP_Real *tmpcoefs, SCIP_Real *cutrhs, int *nonzeroinds, int *nnz, int *cutrank, SCIP_Bool *cutislocal, TRANSINTROW *introw)
static SCIP_RETCODE mod2matrixRemoveRow(SCIP *scip, MOD2_MATRIX *mod2matrix, MOD2_ROW *row)
static void mod2rowUnlinkCol(MOD2_ROW *row, MOD2_COL *col)
#define UNIQUE_INDEX(rowind)
#define COLINFO_GET_MOD2COL(x)
static SCIP_RETCODE buildMod2Matrix(SCIP *scip, SCIP_SOL *sol, SCIP_SEPADATA *sepadata, BMS_BLKMEM *blkmem, MOD2_MATRIX *mod2matrix, SCIP_Bool allowlocal, SCIP_Real maxslack)
struct TransIntRow TRANSINTROW
static SCIP_RETCODE mod2matrixPreprocessRows(SCIP *scip, SCIP_SOL *sol, MOD2_MATRIX *mod2matrix, SCIP_SEPA *sepa, SCIP_SEPADATA *sepadata, SCIP_Bool allowlocal)
static int mod2(SCIP *scip, SCIP_Real val)
static SCIP_Real computeMaxViolation(MOD2_ROW *row)
static SCIP_RETCODE mod2MatrixAddTransRow(SCIP *scip, MOD2_MATRIX *mod2matrix, SCIP_HASHMAP *origcol2col, int transrowind)
static SCIP_RETCODE doSeparation(SCIP *scip, SCIP_SEPA *sepa, SCIP_SOL *sol, SCIP_RESULT *result, SCIP_Bool allowlocal, int depth)
static void mod2matrixRemoveCol(SCIP *scip, MOD2_MATRIX *mod2matrix, MOD2_COL *col)
#define DEFAULT_MAXCUTCANDS
#define MAXAGGRLEN(nvars)
static SCIP_RETCODE mod2rowAddRow(SCIP *scip, BMS_BLKMEM *blkmem, MOD2_MATRIX *mod2matrix, MOD2_ROW *row, MOD2_ROW *rowtoadd)
static SCIP_RETCODE mod2MatrixAddCol(SCIP *scip, MOD2_MATRIX *mod2matrix, SCIP_HASHMAP *origvar2col, SCIP_VAR *origvar, SCIP_Real solval, int rhsoffset)
static SCIP_Real calcEfficacy(SCIP *scip, SCIP_SOL *sol, SCIP_Real *cutcoefs, SCIP_Real cutrhs, int *cutinds, int cutnnz)
static SCIP_RETCODE mod2colLinkRow(BMS_BLKMEM *blkmem, MOD2_COL *col, MOD2_ROW *row)
static SCIP_RETCODE mod2MatrixTransformContRows(SCIP *scip, SCIP_SOL *sol, SCIP_SEPADATA *sepadata, MOD2_MATRIX *mod2matrix, SCIP_Bool allowlocal, SCIP_Real maxslack)
#define COLINFO_CREATE(mod2col, rhsoffset)
static SCIP_RETCODE mod2colUnlinkRow(MOD2_COL *col, MOD2_ROW *row)
TRANSINTROW * transintrows
struct SCIP_AggrRow SCIP_AGGRROW
struct SCIP_HashMap SCIP_HASHMAP
#define SCIP_DECL_SORTPTRCOMP(x)
#define SCIP_DECL_HASHKEYEQ(x)
struct SCIP_RandNumGen SCIP_RANDNUMGEN
#define SCIP_DECL_HASHKEYVAL(x)
struct SCIP_HashSet SCIP_HASHSET
struct SCIP_HashTable SCIP_HASHTABLE
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
struct SCIP_SepaData SCIP_SEPADATA
#define SCIP_DECL_SEPAINITSOL(x)
#define SCIP_DECL_SEPAEXECSOL(x)
#define SCIP_DECL_SEPAEXECLP(x)
#define SCIP_DECL_SEPAFREE(x)
#define SCIP_DECL_SEPAEXITSOL(x)
struct SCIP_Sepa SCIP_SEPA
#define SCIP_DECL_SEPACOPY(x)