heur.c File Reference Detailed Descriptionmethods for primal heuristics Definition in file heur.c. #include <assert.h> #include <string.h> #include "scip/def.h" #include "scip/set.h" #include "scip/clock.h" #include "scip/paramset.h" #include "scip/primal.h" #include "scip/scip.h" #include "scip/heur.h" #include "scip/pub_message.h" #include "scip/pub_misc.h" #include "scip/struct_heur.h" Go to the source code of this file. Function Documentation
compares two heuristics w. r. to their delay positions and their priority Definition at line 40 of file heur.c. References SCIP_Heur::delaypos, SCIP_Heur::freq, SCIP_Heur::ncalls, NULL, and SCIP_Heur::priority.
comparison method for sorting heuristics w.r.t. to their name Definition at line 64 of file heur.c. References SCIPheurGetName().
method to call, when the priority of a heuristic was changed Definition at line 71 of file heur.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPparamGetData(), SCIPparamGetInt(), and SCIPsetHeurPriority().
resets diving settings counters
Definition at line 85 of file heur.c. References SCIP_Diveset::maxdepth, SCIP_Diveset::maxsoldepth, SCIP_Diveset::mindepth, SCIP_Diveset::minsoldepth, SCIP_Diveset::nbestsolsfound, SCIP_Diveset::ncalls, SCIP_Diveset::nlpiterations, SCIP_Diveset::nlps, SCIP_Diveset::nsolcalls, SCIP_Diveset::nsolsfound, NULL, SCIP_Diveset::totaldepth, SCIP_Diveset::totalnbacktracks, SCIP_Diveset::totalnnodes, and SCIP_Diveset::totalsoldepth. Referenced by SCIPdivesetCreate(), and SCIPheurInit().
update diveset statistics and global diveset statistics
Definition at line 108 of file heur.c. References MAX, SCIP_Diveset::maxdepth, SCIP_Diveset::maxsoldepth, MIN, SCIP_Diveset::mindepth, SCIP_Diveset::minsoldepth, SCIP_Diveset::nbestsolsfound, SCIP_Diveset::ncalls, SCIP_Stat::ndivesetcalls, SCIP_Diveset::nsolcalls, SCIP_Diveset::nsolsfound, NULL, SCIP_Diveset::totaldepth, SCIP_Stat::totaldivesetdepth, SCIP_Diveset::totalnbacktracks, SCIP_Diveset::totalnnodes, and SCIP_Diveset::totalsoldepth. Referenced by SCIPupdateDivesetStats().
append diveset to heuristic array of divesets
Definition at line 146 of file heur.c. References BMSallocMemoryArray, BMSreallocMemoryArray, SCIP_Heur::divesets, SCIP_Diveset::heur, SCIP_Heur::ndivesets, NULL, SCIP_ALLOC, and SCIP_OKAY. Referenced by SCIPdivesetCreate().
create a set of diving heuristic settings
Definition at line 176 of file heur.c. References BMSallocMemory, BMSduplicateMemoryArray, FALSE, heurAddDiveset(), NULL, paramname, SCIP_ALLOC, SCIP_CALL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_REAL_MAX, SCIPdivesetReset(), SCIPheurGetName(), SCIPsetAddBoolParam(), SCIPsetAddIntParam(), SCIPsetAddRealParam(), SCIPsnprintf(), and TRUE. Referenced by SCIPcreateDiveset().
get the heuristic to which this diving setting belongs
Definition at line 302 of file heur.c. References SCIP_Diveset::heur.
get the working solution of this dive set
Definition at line 310 of file heur.c. References NULL, and SCIP_Diveset::sol.
set the working solution for this dive set
Definition at line 320 of file heur.c. References NULL, and SCIP_Diveset::sol. Referenced by SCIPperformGenericDivingAlgorithm().
get the name of the dive set
Definition at line 331 of file heur.c. References SCIP_Diveset::name, and NULL. Referenced by printHeuristicStatistics(), SCIPperformGenericDivingAlgorithm(), and solveLP().
get the minimum relative depth of the diving settings
Definition at line 341 of file heur.c. References SCIP_Diveset::minreldepth. Referenced by SCIPperformGenericDivingAlgorithm().
get the maximum relative depth of the diving settings
Definition at line 349 of file heur.c. References SCIP_Diveset::maxreldepth. Referenced by SCIPperformGenericDivingAlgorithm().
get the number of successful runs of the diving settings
Definition at line 357 of file heur.c. References SCIP_Diveset::nbestsolsfound, and SCIP_Diveset::nsolsfound. Referenced by SCIPperformGenericDivingAlgorithm().
get the number of calls to this dive set
Definition at line 365 of file heur.c. References SCIP_Diveset::ncalls, and NULL. Referenced by printHeuristicStatistics(), and SCIPperformGenericDivingAlgorithm().
get the number of calls successfully terminated at a feasible leaf node
Definition at line 375 of file heur.c. References SCIP_Diveset::nsolcalls, and NULL. Referenced by printHeuristicStatistics().
get the minimum depth reached by this dive set
Definition at line 385 of file heur.c. References SCIP_Diveset::mindepth, and NULL. Referenced by printHeuristicStatistics().
get the maximum depth reached by this dive set
Definition at line 395 of file heur.c. References SCIP_Diveset::maxdepth, and NULL. Referenced by printHeuristicStatistics().
get the average depth this dive set reached during execution
Definition at line 405 of file heur.c. References SCIP_Diveset::ncalls, NULL, SCIP_Real, and SCIP_Diveset::totaldepth. Referenced by printHeuristicStatistics().
get the minimum depth at which this dive set found a solution
Definition at line 415 of file heur.c. References SCIP_Diveset::minsoldepth, and NULL. Referenced by printHeuristicStatistics().
get the maximum depth at which this dive set found a solution
Definition at line 425 of file heur.c. References SCIP_Diveset::maxsoldepth, and NULL. Referenced by printHeuristicStatistics().
get the average depth at which this dive set found a solution
Definition at line 435 of file heur.c. References SCIP_Diveset::nsolcalls, NULL, SCIP_Real, and SCIP_Diveset::totalsoldepth. Referenced by printHeuristicStatistics().
get the total number of LP iterations used by this dive set
Definition at line 445 of file heur.c. References SCIP_Diveset::nlpiterations, and NULL. Referenced by printHeuristicStatistics(), SCIPperformGenericDivingAlgorithm(), and solveLP().
get the total number of probing nodes used by this dive set
Definition at line 455 of file heur.c. References NULL, and SCIP_Diveset::totalnnodes. Referenced by printHeuristicStatistics().
get the total number of backtracks performed by this dive set
Definition at line 465 of file heur.c. References NULL, and SCIP_Diveset::totalnbacktracks. Referenced by printHeuristicStatistics().
get the maximum LP iterations quotient of the diving settings
Definition at line 475 of file heur.c. References SCIP_Diveset::maxlpiterquot. Referenced by SCIPperformGenericDivingAlgorithm().
get the maximum LP iterations offset of the diving settings
Definition at line 483 of file heur.c. References SCIP_Diveset::maxlpiterofs. Referenced by SCIPperformGenericDivingAlgorithm().
get the maximum upper bound quotient parameter of the diving settings if no solution is available
Definition at line 491 of file heur.c. References SCIP_Diveset::maxdiveubquotnosol. Referenced by SCIPperformGenericDivingAlgorithm().
get the average quotient parameter of the diving settings if no solution is available
Definition at line 499 of file heur.c. References SCIP_Diveset::maxdiveavgquotnosol. Referenced by SCIPperformGenericDivingAlgorithm().
get the maximum upper bound quotient parameter of the diving settings if an incumbent solution exists
Definition at line 506 of file heur.c. References SCIP_Diveset::maxdiveubquot. Referenced by SCIPperformGenericDivingAlgorithm().
get the average upper bound quotient parameter of the diving settings if an incumbent solution exists
Definition at line 514 of file heur.c. References SCIP_Diveset::maxdiveavgquot. Referenced by SCIPperformGenericDivingAlgorithm().
should backtracking be applied?
Definition at line 522 of file heur.c. References SCIP_Diveset::backtrack. Referenced by SCIPperformGenericDivingAlgorithm().
returns the LP solve frequency for diving LPs (0: dynamically based on number of intermediate domain reductions)
Definition at line 530 of file heur.c. References SCIP_Diveset::lpsolvefreq, and NULL. Referenced by SCIPperformGenericDivingAlgorithm().
returns the domain reduction quotient for triggering an immediate resolve of the diving LP (0.0: always resolve)
Definition at line 540 of file heur.c. References SCIP_Diveset::lpresolvedomchgquot, and NULL. Referenced by SCIPperformGenericDivingAlgorithm().
should only LP branching candidates be considered instead of the slower but more general constraint handler diving variable selection?
Definition at line 552 of file heur.c. References NULL, and SCIP_Diveset::onlylpbranchcands. Referenced by SCIPperformGenericDivingAlgorithm().
returns TRUE if dive set supports diving of the specified type
Definition at line 562 of file heur.c. References SCIP_Diveset::divetypemask, and NULL. Referenced by getDiveBdChgsSOS1conflictgraph(), and getDiveBdChgsSOS1constraints().
update diveset LP statistics, should be called after every LP solved by this diving heuristic
Definition at line 573 of file heur.c. References SCIP_Stat::ndivesetlpiterations, SCIP_Stat::ndivesetlps, SCIP_Diveset::nlpiterations, and SCIP_Diveset::nlps. Referenced by SCIPupdateDivesetLPStats().
frees memory of a diveset
Definition at line 587 of file heur.c. References BMSfreeMemory, BMSfreeMemoryArray, and NULL. Referenced by SCIPheurFree().
get the candidate score and preferred rounding direction for a candidate variable
Definition at line 599 of file heur.c. References SCIP_Diveset::divetypemask, NULL, SCIP_CALL, and SCIP_OKAY. Referenced by SCIPgetDivesetScore().
copies the given primal heuristic to a new scip
Definition at line 624 of file heur.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPdebugMessage, and SCIPheurGetName(). Referenced by SCIPsetCopyPlugins().
creates a primal heuristic
Definition at line 643 of file heur.c. References BMSallocMemory, BMSduplicateMemoryArray, FALSE, NULL, paramname, SCIP_ALLOC, SCIP_CALL, SCIP_CLOCKTYPE_DEFAULT, SCIP_MAXSTRLEN, SCIP_OKAY, SCIPclockCreate(), SCIPsetAddIntParam(), SCIPsnprintf(), and TRUE. Referenced by SCIPincludeHeur(), and SCIPincludeHeurBasic().
calls destructor and frees memory of primal heuristic
Definition at line 728 of file heur.c. References BMSfreeMemory, BMSfreeMemoryArray, BMSfreeMemoryArrayNull, divesetFree(), NULL, SCIP_CALL, SCIP_OKAY, and SCIPclockFree().
initializes primal heuristic
Definition at line 762 of file heur.c. References SCIP_Heur::delaypos, SCIP_Heur::divesets, SCIP_Heur::heurclock, SCIP_Heur::initialized, SCIP_Heur::name, SCIP_Heur::nbestsolsfound, SCIP_Heur::ncalls, SCIP_Heur::ndivesets, SCIP_Heur::nsolsfound, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPclockReset(), SCIPclockStart(), SCIPclockStop(), SCIPdivesetReset(), SCIPerrorMessage, SCIP_Heur::setuptime, and TRUE. Referenced by SCIPsetInitPlugins().
calls exit method of primal heuristic
Definition at line 812 of file heur.c. References FALSE, SCIP_Heur::initialized, SCIP_Heur::name, NULL, SCIP_CALL, SCIP_INVALIDCALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIPerrorMessage, and SCIP_Heur::setuptime. Referenced by SCIPsetExitPlugins().
informs primal heuristic that the branch and bound process is being started
Definition at line 842 of file heur.c. References SCIP_Heur::delaypos, FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), and SCIP_Heur::setuptime. Referenced by SCIPsetExitprePlugins().
informs primal heuristic that the branch and bound process data is being freed
Definition at line 872 of file heur.c. References NULL, SCIP_CALL, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), and SCIP_Heur::setuptime. Referenced by SCIPsetInitsolPlugins().
should the heuristic be executed at the given depth, frequency, timing, ...
Definition at line 896 of file heur.c. References SCIP_Heur::delaypos, FALSE, SCIP_Heur::freq, SCIP_Heur::freqofs, SCIP_Heur::maxdepth, SCIP_Bool, SCIP_HEURTIMING_AFTERLPNODE, SCIP_HEURTIMING_AFTERLPPLUNGE, SCIP_HEURTIMING_AFTERPSEUDONODE, SCIP_HEURTIMING_AFTERPSEUDOPLUNGE, SCIP_HEURTIMING_BEFOREPRESOL, SCIP_HEURTIMING_DURINGPRESOLLOOP, SCIP_Heur::timingmask, and TRUE. Referenced by SCIPheurExec(), and SCIPprimalHeuristics().
calls execution method of primal heuristic
Definition at line 958 of file heur.c. References SCIP_Heur::delaypos, FALSE, SCIP_Heur::freq, SCIP_Heur::freqofs, SCIP_Heur::heurclock, SCIP_Heur::maxdepth, SCIP_Heur::name, SCIP_Primal::nbestsolsfound, SCIP_Heur::nbestsolsfound, SCIP_Heur::ncalls, SCIP_Primal::nsolsfound, SCIP_Heur::nsolsfound, NULL, SCIP_Bool, SCIP_CALL, SCIP_DELAYED, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_FOUNDSOL, SCIP_HEURTIMING_BEFOREPRESOL, SCIP_HEURTIMING_DURINGPRESOLLOOP, SCIP_INVALIDRESULT, SCIP_Longint, SCIP_OKAY, SCIPclockStart(), SCIPclockStop(), SCIPdebugMessage, SCIPerrorMessage, and SCIPheurShouldBeExecuted(). Referenced by SCIPprimalHeuristics().
gets user data of primal heuristic
Definition at line 1058 of file heur.c. References SCIP_Heur::heurdata, and NULL. Referenced by createSolFromNLP(), createSolFromSubScipSol(), SCIP_DECL_HEURCOPY(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXIT(), SCIP_DECL_HEUREXITSOL(), SCIP_DECL_HEURFREE(), SCIP_DECL_HEURINIT(), SCIP_DECL_HEURINITSOL(), SCIPaddLinearConsToNlpHeurSubNlp(), SCIPapplyHeurDualval(), SCIPapplyHeurSubNlp(), SCIPapplyProximity(), SCIPapplyRens(), SCIPapplyUndercover(), SCIPapplyZeroobj(), SCIPdeleteSubproblemProximity(), SCIPfindObjHeur(), SCIPgetObjHeur(), SCIPgetStartCandidateHeurSubNlp(), SCIPgetSubScipHeurSubNlp(), SCIPgetVarMappingScip2SubScipHeurSubNlp(), SCIPgetVarMappingSubScip2ScipHeurSubNlp(), SCIPheurPassIndicator(), SCIPheurPassSolAddSol(), SCIPheurPassSolTrySol(), SCIPreoptsolsGetNCheckedsols(), SCIPreoptsolsGetNImprovingsols(), SCIPresolveSolHeurSubNlp(), SCIPupdateStartpointHeurSubNlp(), solveSubNLP(), solveSubproblem(), and storeSolution().
sets user data of primal heuristic; user has to free old data in advance!
Definition at line 1068 of file heur.c. References SCIP_Heur::heurdata, and NULL. Referenced by presolveTwoOpt(), SCIP_DECL_HEUREXIT(), SCIP_DECL_HEUREXITSOL(), SCIP_DECL_HEURFREE(), SCIP_DECL_HEURINIT(), and SCIP_DECL_HEURINITSOL().
sets copy callback of primal heuristic
Definition at line 1081 of file heur.c. References NULL. Referenced by SCIPsetHeurCopy().
sets destructor callback of primal heuristic
Definition at line 1092 of file heur.c. References NULL. Referenced by SCIPsetHeurFree().
sets initialization callback of primal heuristic
Definition at line 1103 of file heur.c. References NULL. Referenced by SCIPsetHeurInit().
sets deinitialization callback of primal heuristic
Definition at line 1114 of file heur.c. References NULL. Referenced by SCIPsetHeurExit().
sets solving process initialization callback of primal heuristic
Definition at line 1125 of file heur.c. References NULL. Referenced by SCIPsetHeurInitsol().
sets solving process deinitialization callback of primal heuristic
Definition at line 1136 of file heur.c. References NULL. Referenced by SCIPsetHeurExitsol().
gets name of primal heuristic
Definition at line 1147 of file heur.c. References SCIP_Heur::name, and NULL. Referenced by createNewSol(), paramsetSetHeuristicsAggressive(), paramsetSetHeuristicsDefault(), paramsetSetHeuristicsOff(), presolve(), presolveRound(), printHeuristicStatistics(), printSolutionStatistics(), proposeFeasibleSolution(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_EVENTEXEC(), SCIP_DECL_HEURCOPY(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXIT(), SCIP_DECL_HEUREXITSOL(), SCIP_DECL_HEURFREE(), SCIP_DECL_HEURINIT(), SCIP_DECL_HEURINITSOL(), SCIP_DECL_SORTPTRCOMP(), SCIPaddLinearConsToNlpHeurSubNlp(), SCIPapplyProximity(), SCIPdivesetCreate(), SCIPgetStartCandidateHeurSubNlp(), SCIPgetSubScipHeurSubNlp(), SCIPgetVarMappingScip2SubScipHeurSubNlp(), SCIPgetVarMappingSubScip2ScipHeurSubNlp(), SCIPheurCopyInclude(), SCIPheurPassIndicator(), SCIPheurPassSolAddSol(), SCIPheurPassSolTrySol(), SCIPincludeDialogDefaultFix(), SCIPincludeDialogDefaultSet(), SCIPparamsetSetToSubscipsOff(), SCIPperformGenericDivingAlgorithm(), SCIPprimalHeuristics(), SCIPreoptAddSol(), SCIPsetSortPropsPresol(), and SCIPupdateStartpointHeurSubNlp().
gets description of primal heuristic
Definition at line 1157 of file heur.c. References SCIP_Heur::desc, and NULL. Referenced by SCIP_DECL_DIALOGEXEC(), SCIPincludeDialogDefaultFix(), and SCIPincludeDialogDefaultSet().
gets display character of primal heuristic
Definition at line 1167 of file heur.c. References SCIP_Heur::dispchar, and NULL. Referenced by SCIP_DECL_DIALOGEXEC(), and SCIP_DECL_DISPOUTPUT().
returns the timing mask of the heuristic
Definition at line 1177 of file heur.c. References NULL, and SCIP_Heur::timingmask.
sets new timing mask for heuristic
Definition at line 1187 of file heur.c. References NULL, and SCIP_Heur::timingmask. Referenced by SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXITSOL(), SCIP_DECL_HEURINIT(), and SCIP_DECL_HEURINITSOL(). does the heuristic use a secondary SCIP instance?
Definition at line 1198 of file heur.c. References NULL, and SCIP_Heur::usessubscip. Referenced by SCIPparamsetSetToSubscipsOff().
gets priority of primal heuristic
Definition at line 1208 of file heur.c. References NULL, and SCIP_Heur::priority. Referenced by SCIP_DECL_DIALOGEXEC(), and SCIPprimalHeuristics(). sets priority of primal heuristic
Definition at line 1218 of file heur.c. References FALSE, NULL, and SCIP_Heur::priority. Referenced by SCIPsetHeurPriority().
gets frequency of primal heuristic
Definition at line 1232 of file heur.c. References SCIP_Heur::freq, and NULL. Referenced by checkParameters(), SCIP_DECL_DIALOGEXEC(), SCIP_DECL_HEURINIT(), and SCIP_DECL_HEURINITSOL().
sets frequency of primal heuristic
Definition at line 1242 of file heur.c. References SCIP_Heur::freq, and NULL. Referenced by storeSolution().
gets frequency offset of primal heuristic
Definition at line 1253 of file heur.c. References SCIP_Heur::freqofs, and NULL. Referenced by SCIP_DECL_DIALOGEXEC(), SCIP_DECL_HEURINIT(), and SCIP_DECL_HEURINITSOL().
gets maximal depth level for calling primal heuristic (returns -1, if no depth limit exists)
Definition at line 1263 of file heur.c. References SCIP_Heur::maxdepth, and NULL.
gets the number of times, the heuristic was called and tried to find a solution
Definition at line 1273 of file heur.c. References SCIP_Heur::ncalls, and NULL. Referenced by applyVbounds(), printHeuristicStatistics(), SCIP_DECL_HEUREXEC(), and SCIPapplyZeroobj().
gets the number of primal feasible solutions found by this heuristic
Definition at line 1283 of file heur.c. References SCIP_Heur::nsolsfound, and NULL. Referenced by printHeuristicStatistics(), and SCIP_DECL_HEUREXEC().
gets the number of new best primal feasible solutions found by this heuristic
Definition at line 1293 of file heur.c. References SCIP_Heur::nbestsolsfound, and NULL. Referenced by applyVbounds(), and SCIP_DECL_HEUREXEC(). is primal heuristic initialized?
Definition at line 1303 of file heur.c. References SCIP_Heur::initialized, and NULL. enables or disables all clocks of
Definition at line 1313 of file heur.c. References SCIP_Heur::heurclock, NULL, SCIPclockEnableOrDisable(), and SCIP_Heur::setuptime. Referenced by SCIPsetSetReoptimizationParams(). gets time in seconds used in this heuristic for setting up for next stages
Definition at line 1325 of file heur.c. References NULL, SCIPclockGetTime(), and SCIP_Heur::setuptime. Referenced by printHeuristicStatistics(). gets time in seconds used in this heuristic
Definition at line 1335 of file heur.c. References SCIP_Heur::heurclock, NULL, and SCIPclockGetTime(). Referenced by printHeuristicStatistics().
returns array of divesets of this primal heuristic, or NULL if it has no divesets
Definition at line 1345 of file heur.c. References SCIP_Heur::divesets, and NULL. Referenced by printHeuristicStatistics().
returns the number of divesets of this primal heuristic
Definition at line 1355 of file heur.c. References SCIP_Heur::ndivesets, and NULL. Referenced by printHeuristicStatistics(). |