81#define HEUR_NAME "padm"
82#define HEUR_DESC "penalty alternating direction method primal heuristic"
83#define HEUR_DISPCHAR SCIP_HEURDISPCHAR_LNS
84#define HEUR_PRIORITY 70000
87#define HEUR_MAXDEPTH -1
88#define HEUR_TIMING SCIP_HEURTIMING_BEFORENODE | SCIP_HEURTIMING_AFTERNODE
89#define HEUR_USESSUBSCIP TRUE
92#define DEFAULT_MINNODES 50LL
93#define DEFAULT_MAXNODES 5000LL
94#define DEFAULT_NODEFAC 0.8
95#define DEFAULT_ADMIT 4
96#define DEFAULT_PENALTYIT 100
97#define DEFAULT_GAP 2.0
186 int penaltyiterations;
212 block = &problem->blocks[problem->nblocks];
218 block->
number = problem->nblocks;
277 (*problem)->scip =
scip;
278 (*problem)->nblocks = 0;
296 scip = (*problem)->scip;
300 for(
c = nblocks - 1;
c >= 0; --
c )
304 if( (*problem)->blocks !=
NULL )
397 for(
i = 0;
i < nconss; ++
i )
418 if( !(*success) || newcons ==
NULL)
456 scip = problem->scip;
482 for(
i = 0;
i < nsubscipvars;
i++ )
530 for(
b = 0;
b < nblocks;
b++ )
537 for(
b = 0;
b < nblocks;
b++ )
539 block = &(*problem)->blocks[
b];
544 blockconss = &(sortedconss[nhandledconss]);
545 nblockconss = consssize[
b + 1];
551 nhandledconss += nblockconss;
639 sol = sols[nsols - 1];
664 diff = side - solval;
693 SCIPdebugMsg(subscip,
"Correcting solution successful\n");
759 for( v = 0; v <
nvars; v++ )
800 for( v = 0; v <
nvars; v++ )
874 SET* linkvartoblocks,
875 SET* blocktolinkvars,
889 shift = maxpenalty / 2.0;
892 offset = range / 2.0 + lowestslack;
893 flatness = maxpenalty / 10.0;
895 for(
b = 0;
b < problem->nblocks;
b++ )
897 for(
i = 0;
i < blocktolinkvars[
b].
size;
i++ )
900 linkvaridx = blocktolinkvars[
b].
indexes[
i];
902 for( k = 0; k < linkvartoblocks[linkvaridx].
size; k++ )
905 b2 = linkvartoblocks[linkvaridx].
indexes[k];
921 binfoout->
slackposobjcoeff = ((oldcoeff - shift) / (flatness +
REALABS(oldcoeff - shift))) * range / 2.0 + offset;
925 binfoout->
slacknegobjcoeff = ((oldcoeff - shift) / (flatness +
REALABS(oldcoeff - shift))) * range / 2.0 + offset;
949 *time =
MAX(0.0, (timelim - solvingtime));
1008 SET* linkvartoblocks;
1009 SET* blocktolinkvars;
1015 int* alllinkvartoblocks;
1040 int increasedslacks;
1041 int blockinfolistfill;
1058 assigneddecomp =
NULL;
1063 alllinkvartoblocks =
NULL;
1065 linkvartoblocks =
NULL;
1066 blocktolinkvars =
NULL;
1067 tmpcouplingvars =
NULL;
1068 tmpcouplingcoef =
NULL;
1070 blockinfolist =
NULL;
1089#ifdef PADM_WRITE_PROBLEMS
1100 SCIPwarningMessage(
scip,
"Heuristic %s does not support multiaggregation when the original problem is used.\nPlease turn multiaggregation off to use this feature.\n",
HEUR_NAME);
1109 decomp = alldecomps[0];
1126 decomp = alldecomps[0];
1139 if( nconss == 0 ||
nvars == 0 || nblocks <= 1 )
1141 SCIPdebugMsg(
scip,
"problem has no constraints, no variables or less than two blocks\n");
1150 SCIPdebugMsg(
scip,
"The estimated memory usage for %d blocks is too large.\n", nblocks);
1187 decomp = assigneddecomp;
1218 if( numlinkvars == 0 )
1242 for(
i = 0;
i < numlinkvars;
i++ )
1243 linkvartoblocks[
i].indexes =
NULL;
1244 for(
i = 0;
i < problem->nblocks;
i++ )
1245 blocktolinkvars[
i].indexes =
NULL;
1257 linkvartoblocks[
b].
indexes = &alllinkvartoblocks[
b * problem->nblocks];
1258 linkvartoblocks[
b].
size = 0;
1264 for(
i = 0;
i < numlinkvars;
i++ )
1273 for(
b = 0;
b < problem->nblocks;
b++ )
1279 linkvartoblocks[
i].
size = k + 1;
1295 for(
i = 0;
i < numlinkvars; ++
i)
1296 varonlyobj[
i] =
TRUE;
1299 for(
b = 0;
b < problem->nblocks;
b++ )
1302 blocktolinkvars[
b].
size = 0;
1305 for(
i = 0;
i < numlinkvars;
i++ )
1316 blocktolinkvars[
b].
size = k + 1;
1323 for(
b = 0;
b < problem->nblocks;
b++ )
1332 tmpcouplingcoef[0] = 1.0;
1333 tmpcouplingcoef[1] = 1.0;
1334 tmpcouplingcoef[2] = -1.0;
1338 for(
b = 0;
b < problem->nblocks;
b++ )
1340 for(
i = 0;
i < blocktolinkvars[
b].
size;
i++ )
1342 int linkvaridx = blocktolinkvars[
b].
indexes[
i];
1343 for( k = 0; k < linkvartoblocks[linkvaridx].
size; k++ )
1345 if( linkvartoblocks[linkvaridx].indexes[k] !=
b )
1353 blockinfolistfill = 0;
1357 for(
b = 0;
b < problem->nblocks;
b++ )
1366 for(
i = 0;
i < nblockvars;
i++ )
1372 for(
i = 0;
i < blocktolinkvars[
b].
size;
i++ )
1375 linkvaridx = blocktolinkvars[
b].
indexes[
i];
1377 for( k = 0; k < linkvartoblocks[linkvaridx].
size; k++ )
1380 b2 = linkvartoblocks[linkvaridx].
indexes[k];
1386 binfo = &blockinfolist[blockinfolistfill];
1387 blockinfolistfill++;
1392 j = (problem->blocks[
b]).ncoupling;
1396 (problem->blocks[
b]).slackspos[j] =
NULL;
1398 &((problem->blocks[
b]).slackspos[j]), name,
1401 assert((problem->blocks[
b]).slackspos[j] !=
NULL);
1403 binfo->
slackposvar = (problem->blocks[
b]).slackspos[j];
1407 (problem->blocks[
b]).slacksneg[j] =
NULL;
1409 &((problem->blocks[
b]).slacksneg[j]), name,
1412 assert((problem->blocks[
b]).slacksneg[j] !=
NULL);
1414 binfo->
slacknegvar = (problem->blocks[
b]).slacksneg[j];
1417 tmpcouplingvars[0] = binfo->
linkvar;
1424 (problem->blocks[
b]).couplingcons[j] =
NULL;
1433 initval =
MAX(lb, 0.0);
1436 name,
COUPLINGSIZE, tmpcouplingvars, tmpcouplingcoef, initval, initval) );
1452 name,
COUPLINGSIZE, tmpcouplingvars, tmpcouplingcoef, initval, initval) );
1459 assert((problem->blocks[
b]).couplingcons[j] !=
NULL);
1462 (problem->blocks[
b]).ncoupling++;
1472#ifdef PADM_WRITE_PROBLEMS
1474 for(
b = 0;
b < problem->nblocks;
b++ )
1488 if(
obj > slackthreshold )
1489 slackthreshold =
obj;
1506 increasedslacks = 0;
1512 while( !solved && piter < heurdata->penaltyiterations && istimeleft )
1515 solutionsdiffer =
TRUE;
1519 while( solutionsdiffer && aiter < heurdata->admiterations && istimeleft )
1522 solutionsdiffer =
FALSE;
1523 SCIPdebugMsg(
scip,
"%d\t%d\t%d\t%s\n", piter, aiter, increasedslacks, info);
1526 for(
b = 0;
b < problem->nblocks;
b++ )
1528 for(
i = 0;
i < blocktolinkvars[
b].
size;
i++ )
1531 linkvaridx = blocktolinkvars[
b].
indexes[
i];
1533 for( k = 0; k < linkvartoblocks[linkvaridx].
size; k++ )
1536 b2 = linkvartoblocks[linkvaridx].
indexes[k];
1581#ifdef PADM_WRITE_PROBLEMS
1582 SCIPdebugMsg(
scip,
"write subscip of block %d in piter=%d and aiter=%d\n",
b, piter, aiter);
1596 if( nodesleft < heurdata->minnodes )
1605 iteration = ((piter - 1) *
heurdata->admiterations) + aiter;
1632 SCIPdebugMsg(
scip,
"Block is optimal or reached gaplimit or nodelimit.\n");
1636 SCIPdebugMsg(
scip,
"Block reached time limit with at least one feasible solution.\n");
1640 for(
i = 0;
i < blocktolinkvars[
b].
size;
i++ )
1643 linkvaridx = blocktolinkvars[
b].
indexes[
i];
1645 for( k = 0; k < linkvartoblocks[linkvaridx].
size; k++ )
1648 b2 = linkvartoblocks[linkvaridx].
indexes[k];
1670 solutionsdiffer =
TRUE;
1680 for(
i = 0;
i < blocktolinkvars[
b].
size;
i++ )
1683 linkvaridx = blocktolinkvars[
b].
indexes[
i];
1685 for( k = 0; k < linkvartoblocks[linkvaridx].
size; k++ )
1688 b2 = linkvartoblocks[linkvaridx].
indexes[k];
1712 SCIPdebugMsg(
scip,
"Block reached time limit. No optimal solution available.\n");
1734 increasedslacks = 0;
1736 for(
b = 0;
b < problem->nblocks;
b++ )
1738 for(
i = 0;
i < blocktolinkvars[
b].
size;
i++ )
1741 linkvaridx = blocktolinkvars[
b].
indexes[
i];
1743 for( k = 0; k < linkvartoblocks[linkvaridx].
size; k++ )
1746 b2 = linkvartoblocks[linkvaridx].
indexes[k];
1801 if( doscaling &&
heurdata->scaling )
1806 increasedslacks = 0;
1813 if( (aiter == 1 && solutionsdiffer ==
FALSE) || (doscaling &&
heurdata->scaling) )
1818 if( newgap >= mingap )
1820 if( doscaling &&
heurdata->scaling )
1831 for(
b = 0;
b < problem->nblocks;
b++ )
1843 assert(increasedslacks == 0);
1848 for(
b = 0;
b < problem->nblocks;
b++ )
1857 blockvars = (problem->blocks[
b]).subvars;
1858 nblockvars = (problem->blocks[
b]).nsubvars;
1861 for(
i = 0;
i < nblockvars;
i++ )
1867 solval = blocksolvals[
i];
1873 for(
i = 0;
i < numlinkvars;
i++ )
1947 if( problem !=
NULL )
1949 for(
b = 0;
b < problem->nblocks;
b++ )
1951 BLOCK curr_block = problem->blocks[
b];
1952 for(
i = 0;
i < (problem->blocks[
b]).ncoupling;
i++ )
1961 if( htable !=
NULL )
1964 if( blockinfolist !=
NULL )
1967 if( tmpcouplingcoef !=
NULL )
1970 if( tmpcouplingvars !=
NULL )
1973 if( problem !=
NULL )
1975 for(
b = problem->nblocks - 1;
b >= 0;
b-- )
1977 if( problem->blocks[
b].couplingcons !=
NULL )
1986 if( varonlyobj !=
NULL )
1989 if( problem !=
NULL && blocktolinkvars !=
NULL )
1991 for(
b = problem->nblocks -1;
b >= 0;
b-- )
1993 if( blocktolinkvars[
b].indexes !=
NULL )
1998 if( linkvars !=
NULL )
2001 if( alllinkvartoblocks !=
NULL )
2004 if( blocktolinkvars !=
NULL )
2007 if( linkvartoblocks !=
NULL )
2010 if( assigneddecomp !=
NULL )
2013 if( consssize !=
NULL )
2016 if( conslabels !=
NULL )
2019 if( varlabels !=
NULL )
2022 if( sortedconss !=
NULL )
2025 if( problem !=
NULL )
2065 "maximum number of nodes to regard in all subproblems",
2069 "minimum number of nodes to regard in one subproblem",
2085 "should the problem get reoptimized with the original objective function?", &
heurdata->reoptimize,
FALSE,
TRUE,
NULL,
NULL) );
2094 "should the original problem be used? This is only for testing and not recommended!", &
heurdata->original,
TRUE,
FALSE,
NULL,
NULL) );
2097 "should the heuristic run before or after the processing of the node? (0: before, 1: after, 2: both)",
Constraint handler for linear constraints in their most general form, .
#define SCIP_DEFAULT_EPSILON
#define SCIP_STRINGEQ(name, reference, retcode)
#define SCIP_CALL_ABORT(x)
SCIP_Real SCIPgetRhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPchgRhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real rhs)
SCIP_Real SCIPgetLhsLinear(SCIP *scip, SCIP_CONS *cons)
SCIP_RETCODE SCIPcreateConsBasicLinear(SCIP *scip, SCIP_CONS **cons, const char *name, int nvars, SCIP_VAR **vars, SCIP_Real *vals, SCIP_Real lhs, SCIP_Real rhs)
SCIP_RETCODE SCIPchgLhsLinear(SCIP *scip, SCIP_CONS *cons, SCIP_Real lhs)
SCIP_RETCODE SCIPcopyOrigConsCompression(SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *suffix, SCIP_VAR **fixedvars, SCIP_Real *fixedvals, int nfixedvars, SCIP_Bool enablepricing, SCIP_Bool threadsafe, SCIP_Bool passmessagehdlr, SCIP_Bool *valid)
SCIP_RETCODE SCIPcopyConsCompression(SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *suffix, SCIP_VAR **fixedvars, SCIP_Real *fixedvals, int nfixedvars, SCIP_Bool global, SCIP_Bool enablepricing, SCIP_Bool threadsafe, SCIP_Bool passmessagehdlr, SCIP_Bool *valid)
SCIP_RETCODE SCIPgetConsCopy(SCIP *sourcescip, SCIP *targetscip, SCIP_CONS *sourcecons, SCIP_CONS **targetcons, SCIP_CONSHDLR *sourceconshdlr, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, const char *name, 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_Bool global, SCIP_Bool *valid)
SCIP_RETCODE SCIPcopyProb(SCIP *sourcescip, SCIP *targetscip, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_Bool global, const char *name)
SCIP_RETCODE SCIPtranslateSubSol(SCIP *scip, SCIP *subscip, SCIP_SOL *subsol, SCIP_HEUR *heur, SCIP_VAR **subvars, SCIP_SOL **newsol)
SCIP_RETCODE SCIPcopyLimits(SCIP *sourcescip, SCIP *targetscip)
void SCIPgetDecomps(SCIP *scip, SCIP_DECOMP ***decomps, int *ndecomps, SCIP_Bool original)
SCIP_RETCODE SCIPdecompSetVarsLabels(SCIP_DECOMP *decomp, SCIP_VAR **vars, int *labels, int nvars)
int SCIPdecompGetNBlocks(SCIP_DECOMP *decomp)
SCIP_RETCODE SCIPcomputeDecompVarsLabels(SCIP *scip, SCIP_DECOMP *decomp, SCIP_CONS **conss, int nconss)
SCIP_RETCODE SCIPdecompSetConsLabels(SCIP_DECOMP *decomp, SCIP_CONS **conss, int *labels, int nconss)
SCIP_RETCODE SCIPassignDecompLinkConss(SCIP *scip, SCIP_DECOMP *decomp, SCIP_CONS **conss, int nconss, int *nskipconss)
void SCIPfreeDecomp(SCIP *scip, SCIP_DECOMP **decomp)
SCIP_RETCODE SCIPcomputeDecompStats(SCIP *scip, SCIP_DECOMP *decomp, SCIP_Bool uselimits)
void SCIPdecompGetConsLabels(SCIP_DECOMP *decomp, SCIP_CONS **conss, int *labels, int nconss)
SCIP_RETCODE SCIPdecompGetConssSize(SCIP_DECOMP *decomp, int *consssize, int nlabels)
SCIP_RETCODE SCIPcreateDecomp(SCIP *scip, SCIP_DECOMP **decomp, int nblocks, SCIP_Bool original, SCIP_Bool benderslabels)
int SCIPdecompGetNBorderVars(SCIP_DECOMP *decomp)
void SCIPdecompGetVarsLabels(SCIP_DECOMP *decomp, SCIP_VAR **vars, int *labels, int nvars)
SCIP_Bool SCIPdecompUseBendersLabels(SCIP_DECOMP *decomp)
int SCIPdecompGetNBorderConss(SCIP_DECOMP *decomp)
SCIP_RETCODE SCIPfree(SCIP **scip)
SCIP_RETCODE SCIPcreate(SCIP **scip)
SCIP_STATUS SCIPgetStatus(SCIP *scip)
SCIP_RETCODE SCIPaddVar(SCIP *scip, SCIP_VAR *var)
int SCIPgetNIntVars(SCIP *scip)
const char * SCIPgetProbName(SCIP *scip)
SCIP_RETCODE SCIPwriteOrigProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
int SCIPgetNOrigBinVars(SCIP *scip)
int SCIPgetNOrigConss(SCIP *scip)
SCIP_VAR ** SCIPgetOrigVars(SCIP *scip)
int SCIPgetNOrigIntVars(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 SCIPgetNOrigVars(SCIP *scip)
SCIP_CONS ** SCIPgetOrigConss(SCIP *scip)
SCIP_RETCODE SCIPwriteTransProblem(SCIP *scip, const char *filename, const char *extension, SCIP_Bool genericnames)
int SCIPgetNBinVars(SCIP *scip)
SCIP_VAR * SCIPfindVar(SCIP *scip, const char *name)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
void SCIPhashtableFree(SCIP_HASHTABLE **hashtable)
#define SCIPhashFour(a, b, c, d)
SCIP_RETCODE SCIPhashtableSafeInsert(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)
static INLINE uint32_t SCIPrealHashCode(double x)
SCIP_Longint SCIPhashtableGetNElements(SCIP_HASHTABLE *hashtable)
void SCIPwarningMessage(SCIP *scip, const char *formatstr,...)
SCIP_RETCODE SCIPgetBoolParam(SCIP *scip, const char *name, SCIP_Bool *value)
SCIP_RETCODE SCIPaddLongintParam(SCIP *scip, const char *name, const char *desc, SCIP_Longint *valueptr, SCIP_Bool isadvanced, SCIP_Longint defaultvalue, SCIP_Longint minvalue, SCIP_Longint maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_Bool SCIPisParamFixed(SCIP *scip, const char *name)
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 SCIPsetLongintParam(SCIP *scip, const char *name, SCIP_Longint value)
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 SCIPsetIntParam(SCIP *scip, const char *name, int value)
SCIP_RETCODE SCIPsetSubscipsOff(SCIP *scip, SCIP_Bool quiet)
SCIP_RETCODE SCIPgetRealParam(SCIP *scip, const char *name, SCIP_Real *value)
SCIP_RETCODE SCIPsetPresolving(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
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)
SCIP_RETCODE SCIPsetBoolParam(SCIP *scip, const char *name, SCIP_Bool value)
SCIP_RETCODE SCIPsetRealParam(SCIP *scip, const char *name, SCIP_Real value)
SCIP_RETCODE SCIPsetSeparating(SCIP *scip, SCIP_PARAMSETTING paramsetting, SCIP_Bool quiet)
SCIP_RETCODE SCIPincludeHeurPADM(SCIP *scip)
SCIP_Bool SCIPconsIsDynamic(SCIP_CONS *cons)
SCIP_CONSHDLR * SCIPconsGetHdlr(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsInitial(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsChecked(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsDeleted(SCIP_CONS *cons)
SCIP_RETCODE SCIPgetConsVars(SCIP *scip, SCIP_CONS *cons, SCIP_VAR **vars, int varssize, SCIP_Bool *success)
SCIP_Bool SCIPconsIsEnforced(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsActive(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsPropagated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsModifiable(SCIP_CONS *cons)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_Bool SCIPconsIsSeparated(SCIP_CONS *cons)
SCIP_Bool SCIPconsIsRemovable(SCIP_CONS *cons)
SCIP_RETCODE SCIPsetHeurFree(SCIP *scip, SCIP_HEUR *heur,)
SCIP_HEURDATA * SCIPheurGetData(SCIP_HEUR *heur)
SCIP_RETCODE SCIPincludeHeurBasic(SCIP *scip, SCIP_HEUR **heur, const char *name, const char *desc, char dispchar, int priority, int freq, int freqofs, int maxdepth, SCIP_HEURTIMING timingmask, SCIP_Bool usessubscip, SCIP_DECL_HEUREXEC((*heurexec)), SCIP_HEURDATA *heurdata)
SCIP_RETCODE SCIPsetHeurCopy(SCIP *scip, SCIP_HEUR *heur,)
void SCIPheurMarkExact(SCIP_HEUR *heur)
SCIP_Real SCIPheurGetTime(SCIP_HEUR *heur)
const char * SCIPheurGetName(SCIP_HEUR *heur)
void SCIPheurSetData(SCIP_HEUR *heur, SCIP_HEURDATA *heurdata)
SCIP_Longint SCIPgetMemExternEstim(SCIP *scip)
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
SCIP_Longint SCIPgetMemUsed(SCIP *scip)
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPduplicateMemoryArray(scip, ptr, source, num)
#define SCIPfreeMemoryArray(scip, ptr)
#define SCIPduplicateBufferArray(scip, ptr, source, num)
#define SCIPallocBlockMemoryArray(scip, ptr, num)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
SCIP_RETCODE SCIPaddSolFree(SCIP *scip, SCIP_SOL **sol, SCIP_Bool *stored)
int SCIPgetNSols(SCIP *scip)
SCIP_RETCODE SCIPcreateOrigSol(SCIP *scip, SCIP_SOL **sol, SCIP_HEUR *heur)
SCIP_RETCODE SCIPgetSolVals(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
SCIP_RETCODE SCIPsetSolVals(SCIP *scip, SCIP_SOL *sol, int nvars, SCIP_VAR **vars, SCIP_Real *vals)
SCIP_SOL ** SCIPgetSols(SCIP *scip)
SCIP_RETCODE SCIPtrySolFree(SCIP *scip, SCIP_SOL **sol, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkbounds, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored)
SCIP_Real SCIPgetSolOrigObj(SCIP *scip, SCIP_SOL *sol)
SCIP_RETCODE SCIPsetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var, SCIP_Real val)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_RETCODE SCIPtransformProb(SCIP *scip)
SCIP_RETCODE SCIPfreeTransform(SCIP *scip)
SCIP_RETCODE SCIPsolve(SCIP *scip)
SCIP_Longint SCIPgetNNodes(SCIP *scip)
SCIP_Real SCIPgetSolvingTime(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPround(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbOriginal(SCIP_VAR *var)
SCIP_Real SCIPvarGetObj(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_RETCODE SCIPreleaseVar(SCIP *scip, SCIP_VAR **var)
SCIP_Bool SCIPdoNotMultaggr(SCIP *scip)
SCIP_Bool SCIPvarIsIntegral(SCIP_VAR *var)
SCIP_Real SCIPvarGetLPSol(SCIP_VAR *var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIP_RETCODE SCIPcreateVarBasic(SCIP *scip, SCIP_VAR **var, const char *name, SCIP_Real lb, SCIP_Real ub, SCIP_Real obj, SCIP_VARTYPE vartype)
SCIP_RETCODE SCIPchgVarObj(SCIP *scip, SCIP_VAR *var, SCIP_Real newobj)
void SCIPsortIntPtr(int *intarray, void **ptrarray, int len)
int SCIPsnprintf(char *t, int len, const char *s,...)
SCIPfreeSol(scip, &heurdata->sol))
SCIPcreateSol(scip, &heurdata->sol, heur))
assert(minobj< SCIPgetCutoffbound(scip))
static SCIP_RETCODE getTimeLeft(SCIP *scip, SCIP_Real *time)
static SCIP_RETCODE initProblem(SCIP *scip, PROBLEM **problem, int nblocks)
static SCIP_RETCODE blockCreateSubscip(BLOCK *block, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, SCIP_CONS **conss, int nconss, SCIP_Bool useorigprob, SCIP_Bool *success)
static SCIP_RETCODE initBlock(PROBLEM *problem)
static SCIP_RETCODE createSubscip(SCIP *scip, SCIP **subscip)
static SCIP_RETCODE assignLinking(SCIP *scip, SCIP_DECOMP *newdecomp, SCIP_VAR **vars, SCIP_CONS **sortedconss, int *varlabels, int *conslabels, int nvars, int nconss, int nlinkconss)
static SCIP_RETCODE copyToSubscip(SCIP *scip, SCIP *subscip, const char *name, SCIP_CONS **conss, SCIP_HASHMAP *varmap, SCIP_HASHMAP *consmap, int nconss, SCIP_Bool useorigprob, SCIP_Bool *success)
static SCIP_RETCODE reuseSolution(SCIP *subscip, BLOCK *block)
static SCIP_RETCODE createAndSplitProblem(SCIP *scip, SCIP_CONS **sortedconss, int nconss, int *consssize, int nblocks, PROBLEM **problem, SCIP_Bool useorigprob, SCIP_Bool *success)
static SCIP_RETCODE scalePenalties(PROBLEM *problem, SET *linkvartoblocks, SET *blocktolinkvars, SCIP_HASHTABLE *htable, SCIP_Real maxpenalty)
#define DEFAULT_PENALTYIT
static SCIP_RETCODE freeBlock(BLOCK *block)
struct blockinfo BLOCKINFO
static SCIP_RETCODE reoptimize(SCIP *scip, SCIP_HEUR *heur, SCIP_SOL *sol, SCIP_VAR **vars, int nvars, SCIP_VAR **linkvars, int nlinkvars, SCIP_SOL **newsol, SCIP_Bool *success)
static SCIP_RETCODE freeProblem(PROBLEM **problem, int nblocks)
methods commonly used by primal heuristics
memory allocation routines
public methods for managing constraints
public methods for primal heuristics
public methods for message output
public data structures and miscellaneous methods
methods for selecting k-medians
public methods for primal CIP solutions
public methods for branch and bound tree
public methods for problem variables
public methods for branching rule plugins and branching
public methods for constraint handler plugins and constraints
public methods for problem copies
public methods for decompositions
public methods for primal heuristic plugins and divesets
public methods for the LP relaxation, rows and columns
public methods for memory management
public methods for message handling
public methods for node selector plugins
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for random numbers
public methods for solutions
public methods for querying solving statistics
public methods for statistics table plugins
public methods for timing
public methods for the branch-and-bound tree
public methods for SCIP variables
SCIP_RETCODE SCIPincludeDefaultPlugins(SCIP *scip)
SCIP_CONS ** couplingcons
SCIP_Real slackposobjcoeff
SCIP_Real slacknegobjcoeff
struct SCIP_Cons SCIP_CONS
#define SCIP_DECOMP_LINKVAR
struct SCIP_Decomp SCIP_DECOMP
#define SCIP_DECOMP_LINKCONS
#define SCIP_DECL_HEURCOPY(x)
struct SCIP_HeurData SCIP_HEURDATA
struct SCIP_Heur SCIP_HEUR
#define SCIP_DECL_HEURFREE(x)
#define SCIP_DECL_HEUREXEC(x)
struct SCIP_HashMap SCIP_HASHMAP
#define SCIP_DECL_HASHKEYEQ(x)
#define SCIP_DECL_HASHKEYVAL(x)
struct SCIP_HashTable SCIP_HASHTABLE
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_STATUS_BESTSOLLIMIT
enum SCIP_Status SCIP_STATUS
#define SCIP_HEURTIMING_AFTERNODE
#define SCIP_HEURTIMING_BEFORENODE
@ SCIP_VARTYPE_CONTINUOUS