HEUR_NAME " heuristic"
92#define WAITFORNEWSOL 1 111 intneighborhoodsize;
114 intcurneighborhoodsize;
116 intemptyneighborhoodsize;
156assert(subscip !=
NULL);
157assert(heur !=
NULL);
160assert(heurdata !=
NULL);
167assert( bestsol !=
NULL);
175lhs = (
SCIP_Real)heurdata->emptyneighborhoodsize + 1.0;
176rhs = (
SCIP_Real)heurdata->curneighborhoodsize;
179 for( i = 0; i < nbinvars; i++ )
183 if( subvars[i] ==
NULL)
192consvals[nconsvars] = -1.0;
197consvals[nconsvars] = 1.0;
199consvars[nconsvars] = subvars[i];
207lhs, rhs,
TRUE,
TRUE,
TRUE,
TRUE,
TRUE,
FALSE,
FALSE,
TRUE,
TRUE,
FALSE) );
226cutoff =
MIN(upperbound, cutoff );
245assert(eventhdlr !=
NULL);
246assert(eventdata !=
NULL);
248assert(event !=
NULL);
252assert(heurdata !=
NULL);
274assert(heur !=
NULL);
289assert( heur !=
NULL);
294assert( heurdata !=
NULL);
310assert( heur !=
NULL);
315assert( heurdata !=
NULL);
319heurdata->lastsol =
NULL;
320heurdata->usednodes = 0;
321heurdata->curneighborhoodsize = heurdata->neighborhoodsize;
322heurdata->curminnodes = heurdata->minnodes;
323heurdata->emptyneighborhoodsize = 0;
350assert(subscip !=
NULL);
351assert(heur !=
NULL);
354assert(heurdata !=
NULL);
365heurdata->copycuts, &success,
NULL) );
367 SCIPdebugMsg(
scip,
"Copying SCIP was %ssuccessful.\n", success ?
"":
"not ");
379 if( eventhdlr ==
NULL)
389 for(i = 0; i < nvars; ++i)
395heurdata->nodelimit = nsubnodes;
402 if( !heurdata->uselprows )
404assert(eventhdlr !=
NULL);
412heurdata->curneighborhoodsize, nsubnodes);
420 if( !heurdata->uselprows )
422assert(eventhdlr !=
NULL);
452heurdata->callstatus =
EXECUTE;
453heurdata->curneighborhoodsize = (heurdata->emptyneighborhoodsize + heurdata->curneighborhoodsize)/2;
454heurdata->curminnodes *= 2;
455 SCIPdebugMsg(
scip,
" -> node limit reached: reduced neighborhood to %d, increased minnodes to %d\n",
456heurdata->curneighborhoodsize, heurdata->curminnodes);
457 if( heurdata->curneighborhoodsize <= heurdata->emptyneighborhoodsize )
460 SCIPdebugMsg(
scip,
" -> new neighborhood was already proven to be empty: wait for new solution\n");
466heurdata->emptyneighborhoodsize = heurdata->curneighborhoodsize;
467heurdata->curneighborhoodsize += heurdata->curneighborhoodsize/2;
468heurdata->curneighborhoodsize =
MAX(heurdata->curneighborhoodsize, heurdata->emptyneighborhoodsize + 2);
469heurdata->callstatus =
EXECUTE;
470 SCIPdebugMsg(
scip,
" -> neighborhood is empty: increased neighborhood to %d\n", heurdata->curneighborhoodsize);
513assert(heur !=
NULL);
515assert(result !=
NULL);
521assert( heurdata !=
NULL);
534assert(bestsol !=
NULL);
549 if( heurdata->lastsol != bestsol )
551heurdata->curneighborhoodsize = heurdata->neighborhoodsize;
552heurdata->curminnodes = heurdata->minnodes;
553heurdata->emptyneighborhoodsize = 0;
554heurdata->callstatus =
EXECUTE;
555heurdata->lastsol = bestsol;
570maxnnodes += heurdata->nodesofs;
573nsubnodes = maxnnodes - heurdata->usednodes;
574nsubnodes =
MIN(nsubnodes, heurdata->maxnodes);
577 if( nsubnodes < heurdata->curminnodes )
624assert(heur !=
NULL);
633 "number of nodes added to the contingent of the total nodes",
637 "radius (using Manhattan metric) of the incumbent's neighborhood to be searched",
641 "contingent of sub problem nodes in relation to the number of nodes of the original problem",
645 "factor by which the limit on the number of LP depends on the node limit",
649 "minimum number of nodes required to start the subproblem",
653 "maximum number of nodes to regard in the subproblem",
657 "number of nodes without incumbent change that heuristic should wait",
661 "factor by which localbranching should at least improve the incumbent",
665 "should subproblem be created out of the rows in the LP rows?",
669 "if uselprows == FALSE, should all active cuts from cutpool be copied to constraints in subproblem?",
673 "limit on number of improving incumbent solutions in sub-CIP",
Constraint handler for linear constraints in their most general form, .
#define SCIP_CALL_ABORT(x)
#define SCIP_LONGINT_FORMAT
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 SCIPtranslateSubSols(SCIP *scip, SCIP *subscip, SCIP_HEUR *heur, SCIP_VAR **subvars, SCIP_Bool *success, int *solindex)
SCIP_RETCODE SCIPsetCommonSubscipParams(SCIP *sourcescip, SCIP *subscip, SCIP_Longint nsubnodes, SCIP_Longint nstallnodes, int bestsollimit)
SCIP_RETCODE SCIPcheckCopyLimits(SCIP *sourcescip, SCIP_Bool *success)
SCIP_Bool SCIPisStopped(SCIP *scip)
SCIP_RETCODE SCIPfree(SCIP **scip)
SCIP_RETCODE SCIPcreate(SCIP **scip)
SCIP_STATUS SCIPgetStatus(SCIP *scip)
const char * SCIPgetProbName(SCIP *scip)
SCIP_RETCODE SCIPsetObjlimit(SCIP *scip, SCIP_Real objlimit)
SCIP_RETCODE SCIPgetVarsData(SCIP *scip, SCIP_VAR ***vars, int *nvars, int *nbinvars, int *nintvars, int *nimplvars, int *ncontvars)
SCIP_RETCODE SCIPaddCons(SCIP *scip, SCIP_CONS *cons)
int SCIPgetNBinVars(SCIP *scip)
void SCIPhashmapFree(SCIP_HASHMAP **hashmap)
void * SCIPhashmapGetImage(SCIP_HASHMAP *hashmap, void *origin)
SCIP_RETCODE SCIPhashmapCreate(SCIP_HASHMAP **hashmap, BMS_BLKMEM *blkmem, int mapsize)
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)
SCIP_RETCODE SCIPincludeHeurLocalbranching(SCIP *scip)
SCIP_RETCODE SCIPreleaseCons(SCIP *scip, SCIP_CONS **cons)
SCIP_RETCODE SCIPincludeEventhdlrBasic(SCIP *scip, SCIP_EVENTHDLR **eventhdlrptr, const char *name, const char *desc, SCIP_DECL_EVENTEXEC((*eventexec)), SCIP_EVENTHDLRDATA *eventhdlrdata)
const char * SCIPeventhdlrGetName(SCIP_EVENTHDLR *eventhdlr)
SCIP_EVENTTYPE SCIPeventGetType(SCIP_EVENT *event)
SCIP_RETCODE SCIPcatchEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int *filterpos)
SCIP_RETCODE SCIPdropEvent(SCIP *scip, SCIP_EVENTTYPE eventtype, SCIP_EVENTHDLR *eventhdlr, SCIP_EVENTDATA *eventdata, int filterpos)
SCIP_RETCODE SCIPsetHeurCopy(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURCOPY((*heurcopy)))
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 SCIPsetHeurFree(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURFREE((*heurfree)))
SCIP_Longint SCIPheurGetNBestSolsFound(SCIP_HEUR *heur)
SCIP_Longint SCIPheurGetNCalls(SCIP_HEUR *heur)
SCIP_RETCODE SCIPsetHeurInit(SCIP *scip, SCIP_HEUR *heur, SCIP_DECL_HEURINIT((*heurinit)))
const char * SCIPheurGetName(SCIP_HEUR *heur)
void SCIPheurSetData(SCIP_HEUR *heur, SCIP_HEURDATA *heurdata)
#define SCIPallocBufferArray(scip, ptr, num)
#define SCIPfreeBufferArray(scip, ptr)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_SOL * SCIPgetBestSol(SCIP *scip)
int SCIPgetNSols(SCIP *scip)
SCIP_HEUR * SCIPsolGetHeur(SCIP_SOL *sol)
SCIP_Bool SCIPsolIsOriginal(SCIP_SOL *sol)
SCIP_Longint SCIPgetSolNodenum(SCIP *scip, SCIP_SOL *sol)
SCIP_Real SCIPgetSolVal(SCIP *scip, SCIP_SOL *sol, SCIP_VAR *var)
SCIP_RETCODE SCIPtransformProb(SCIP *scip)
SCIP_RETCODE SCIPinterruptSolve(SCIP *scip)
SCIP_RETCODE SCIPsolve(SCIP *scip)
SCIP_Real SCIPgetUpperbound(SCIP *scip)
SCIP_Longint SCIPgetNNodes(SCIP *scip)
SCIP_RETCODE SCIPprintStatistics(SCIP *scip, FILE *file)
SCIP_Real SCIPgetLowerbound(SCIP *scip)
SCIP_Longint SCIPgetNLPs(SCIP *scip)
SCIP_RETCODE SCIPcopyLargeNeighborhoodSearch(SCIP *sourcescip, SCIP *subscip, SCIP_HASHMAP *varmap, const char *suffix, SCIP_VAR **fixedvars, SCIP_Real *fixedvals, int nfixedvars, SCIP_Bool uselprows, SCIP_Bool copycuts, SCIP_Bool *success, SCIP_Bool *valid)
SCIP_Bool SCIPisFeasEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPsumepsilon(SCIP *scip)
SCIP_VARTYPE SCIPvarGetType(SCIP_VAR *var)
int SCIPsnprintf(char *t, int len, const char *s,...)
#define DEFAULT_NODESQUOT
#define DEFAULT_NWAITINGNODES
static SCIP_DECL_HEURCOPY(heurCopyLocalbranching)
#define DEFAULT_NEIGHBORHOODSIZE
static SCIP_RETCODE addLocalbranchingConstraintAndObjcutoff(SCIP *scip, SCIP *subscip, SCIP_HEUR *heur, SCIP_VAR **subvars)
static SCIP_DECL_EVENTEXEC(eventExecLocalbranching)
#define DEFAULT_MINIMPROVE
#define DEFAULT_USELPROWS
static SCIP_RETCODE setupAndSolveSubscipLocalbranching(SCIP *scip, SCIP *subscip, SCIP_HEUR *heur, SCIP_Longint nsubnodes, SCIP_RESULT *result)
static SCIP_DECL_HEURFREE(heurFreeLocalbranching)
#define DEFAULT_BESTSOLLIMIT
static SCIP_DECL_HEURINIT(heurInitLocalbranching)
static SCIP_DECL_HEUREXEC(heurExecLocalbranching)
Local branching heuristic according to Fischetti and Lodi.
methods commonly used by primal heuristics
memory allocation routines
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
public methods for managing events
public methods for primal heuristics
public methods for message output
public data structures and miscellaneous methods
public methods for primal CIP solutions
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 event handler plugins and event handlers
public methods for primal heuristic plugins and divesets
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 solutions
public methods for querying solving statistics
struct SCIP_EventData SCIP_EVENTDATA
#define SCIP_EVENTTYPE_LPSOLVED
struct SCIP_HeurData SCIP_HEURDATA
enum SCIP_Result SCIP_RESULT
enum SCIP_Retcode SCIP_RETCODE
@ SCIP_STATUS_TOTALNODELIMIT
@ SCIP_STATUS_BESTSOLLIMIT
@ SCIP_STATUS_PRIMALLIMIT
@ SCIP_STATUS_USERINTERRUPT
@ SCIP_STATUS_STALLNODELIMIT
@ SCIP_STATUS_RESTARTLIMIT
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4