|
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
heur.c
Go to the documentation of this file.
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
81 SCIP_CALL( SCIPsetHeurPriority(scip, (SCIP_HEUR*)paramdata, SCIPparamGetInt(param)) ); /*lint !e740*/
118 unsigned int timingmask, /**< positions in the node solving loop where heuristic should be executed */
120 SCIP_DECL_HEURCOPY ((*heurcopy)), /**< copy method of primal heuristic or NULL if you don't want to copy your plugin into sub-SCIPs */
124 SCIP_DECL_HEURINITSOL ((*heurinitsol)), /**< solving process initialization method of primal heuristic */
125 SCIP_DECL_HEUREXITSOL ((*heurexitsol)), /**< solving process deinitialization method of primal heuristic */
173 (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "frequency for calling primal heuristic <%s> (-1: never, 0: only at depth freqofs)", name);
177 (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "frequency offset for calling primal heuristic <%s>", name);
181 (void) SCIPsnprintf(paramdesc, SCIP_MAXSTRLEN, "maximal depth level to call primal heuristic <%s> (-1: no limit)", name);
350 if( ((heur->timingmask & SCIP_HEURTIMING_BEFOREPRESOL) && heurtiming == SCIP_HEURTIMING_BEFOREPRESOL)
351 || ((heur->timingmask & SCIP_HEURTIMING_DURINGPRESOLLOOP) && heurtiming == SCIP_HEURTIMING_DURINGPRESOLLOOP) )
353 /* heuristic may be executed before/during presolving. Do so, if it was not disabled by setting the frequency to -1 */
359 /* heuristic was skipped on intermediate pseudo nodes: check, if a node matching the execution frequency lies
368 /* heuristic may be executed on every node: check, if the current depth matches the execution frequency and offset */
369 execute = (heur->freq > 0 && depth >= heur->freqofs && (depth - heur->freqofs) % heur->freq == 0);
381 /* if the heuristic should be called after plunging but not during plunging, delay it if we are in plunging */
395 /* execute heuristic only if its timing mask fits the current point in the node solving process */
425 assert(depth >= 0 || heurtiming == SCIP_HEURTIMING_BEFOREPRESOL || heurtiming == SCIP_HEURTIMING_DURINGPRESOLLOOP);
445 SCIPdebugMessage("executing primal heuristic <%s> in depth %d (delaypos: %d)\n", heur->name, depth, heur->delaypos);
486 SCIPdebugMessage("delaying execution of primal heuristic <%s> in depth %d (delaypos: %d), heur was%s delayed before, had delaypos %d\n",
527 SCIP_DECL_HEURCOPY ((*heurcopy)) /**< copy callback of primal heuristic or NULL if you don't want to copy your plugin into sub-SCIPs */
571 SCIP_DECL_HEURINITSOL ((*heurinitsol)) /**< solving process initialization callback of primal heuristic */
582 SCIP_DECL_HEUREXITSOL ((*heurexitsol)) /**< solving process deinitialization callback of primal heuristic */
706 /** gets maximal depth level for calling primal heuristic (returns -1, if no depth limit exists) */
void SCIPheurSetInitsol(SCIP_HEUR *heur, SCIP_DECL_HEURINITSOL((*heurinitsol))) Definition: heur.c:569 Definition: type_result.h:33 Definition: type_result.h:47 Definition: type_result.h:34 internal methods for clocks and timing issues void SCIPheurSetExitsol(SCIP_HEUR *heur, SCIP_DECL_HEUREXITSOL((*heurexitsol))) Definition: heur.c:580 Definition: struct_primal.h:36 SCIP_RETCODE SCIPheurExec(SCIP_HEUR *heur, SCIP_SET *set, SCIP_PRIMAL *primal, int depth, int lpstateforkdepth, SCIP_HEURTIMING heurtiming, SCIP_Bool nodeinfeasible, int *ndelayedheurs, SCIP_RESULT *result) Definition: heur.c:402 Definition: struct_message.h:35 void SCIPheurSetPriority(SCIP_HEUR *heur, SCIP_SET *set, int priority) Definition: heur.c:662 internal methods for handling parameter settings SCIP_RETCODE SCIPheurCopyInclude(SCIP_HEUR *heur, SCIP_SET *set) Definition: heur.c:87 void SCIPclockEnableOrDisable(SCIP_CLOCK *clck, SCIP_Bool enable) Definition: clock.c:250 internal methods for collecting primal CIP solutions and primal informations #define SCIP_HEURTIMING_AFTERPSEUDOPLUNGE Definition: type_timing.h:64 Definition: type_retcode.h:44 Definition: struct_set.h:55 Definition: type_clock.h:34 Definition: type_result.h:35 Definition: type_retcode.h:42 void SCIPheurSetCopy(SCIP_HEUR *heur, SCIP_DECL_HEURCOPY((*heurcopy))) Definition: heur.c:525 Definition: type_retcode.h:33 SCIP_RETCODE SCIPsetHeurPriority(SCIP *scip, SCIP_HEUR *heur, int priority) Definition: scip.c:7147 void SCIPheurSetTimingmask(SCIP_HEUR *heur, SCIP_HEURTIMING timingmask) Definition: heur.c:631 internal methods for global SCIP settings #define SCIP_HEURTIMING_DURINGPRESOLLOOP Definition: type_timing.h:69 SCIP_RETCODE SCIPsetAddIntParam(SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata) Definition: set.c:2039 Definition: struct_heur.h:36 SCIP_RETCODE SCIPclockCreate(SCIP_CLOCK **clck, SCIP_CLOCKTYPE clocktype) Definition: clock.c:160 datastructures for primal heuristics public data structures and miscellaneous methods SCIP_Bool SCIPheurShouldBeExecuted(SCIP_HEUR *heur, int depth, int lpstateforkdepth, SCIP_HEURTIMING heurtiming, SCIP_Bool *delayed) Definition: heur.c:340 void SCIPheurSetFree(SCIP_HEUR *heur, SCIP_DECL_HEURFREE((*heurfree))) Definition: heur.c:536 void SCIPheurEnableOrDisableClocks(SCIP_HEUR *heur, SCIP_Bool enable) Definition: heur.c:757 SCIP_Longint SCIPheurGetNBestSolsFound(SCIP_HEUR *heur) Definition: heur.c:737 SCIP_RETCODE SCIPheurCreate(SCIP_HEUR **heur, SCIP_SET *set, SCIP_MESSAGEHDLR *messagehdlr, BMS_BLKMEM *blkmem, const char *name, const char *desc, char dispchar, int priority, int freq, int freqofs, int maxdepth, unsigned int timingmask, SCIP_Bool usessubscip, SCIP_DECL_HEURCOPY((*heurcopy)), SCIP_DECL_HEURFREE((*heurfree)), SCIP_DECL_HEURINIT((*heurinit)), SCIP_DECL_HEUREXIT((*heurexit)), SCIP_DECL_HEURINITSOL((*heurinitsol)), SCIP_DECL_HEUREXITSOL((*heurexitsol)), SCIP_DECL_HEUREXEC((*heurexec)), SCIP_HEURDATA *heurdata) Definition: heur.c:106 void SCIPheurSetExit(SCIP_HEUR *heur, SCIP_DECL_HEUREXIT((*heurexit))) Definition: heur.c:558 public methods for message output void SCIPheurSetInit(SCIP_HEUR *heur, SCIP_DECL_HEURINIT((*heurinit))) Definition: heur.c:547 common defines and data types used in all packages of SCIP internal methods for primal heuristics SCIP callable library. |