Detailed Description
LNS heuristic using a clique partition to restrict the search neighborhood.
clique primal heuristic
More details about the heuristic can be found in
Structure-Based Primal Heuristics for Mixed Integer Programming
Gerald Gamrath, Timo Berthold, Stefan Heinz, and Michael Winkler
Optimization in the Real World, Volume 13 of the series Mathematics for Industry, pp 37-53
Preliminary version available as ZIB-Report 15-26.
Definition in file heur_clique.c.
#include "blockmemshell/memory.h"
#include "scip/cons_logicor.h"
#include "scip/heur_clique.h"
#include "scip/heur_locks.h"
#include "scip/pub_heur.h"
#include "scip/pub_implics.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/pub_misc_sort.h"
#include "scip/pub_var.h"
#include "scip/scip_branch.h"
#include "scip/scip_cons.h"
#include "scip/scip_copy.h"
#include "scip/scip_general.h"
#include "scip/scip_heur.h"
#include "scip/scip_lp.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_prob.h"
#include "scip/scip_probing.h"
#include "scip/scip_sol.h"
#include "scip/scip_solve.h"
#include "scip/scip_solvingstats.h"
#include "scip/scip_timing.h"
#include "scip/scip_tree.h"
#include "scip/scip_var.h"
#include <string.h>
Go to the source code of this file.
Macros | |
#define | HEUR_NAME "clique" |
#define | HEUR_DESC "LNS heuristic using a clique partition to restrict the search neighborhood" |
#define | HEUR_DISPCHAR SCIP_HEURDISPCHAR_PROP |
#define | HEUR_PRIORITY 5000 |
#define | HEUR_FREQ 0 |
#define | HEUR_FREQOFS 0 |
#define | HEUR_MAXDEPTH -1 |
#define | HEUR_TIMING SCIP_HEURTIMING_BEFORENODE |
#define | HEUR_USESSUBSCIP TRUE |
#define | DEFAULT_MAXNODES 5000LL |
#define | DEFAULT_MININTFIXINGRATE 0.65 |
#define | DEFAULT_MINMIPFIXINGRATE 0.65 |
#define | DEFAULT_MINIMPROVE 0.01 |
#define | DEFAULT_MINNODES 500LL |
#define | DEFAULT_NODESOFS 500LL |
#define | DEFAULT_NODESQUOT 0.1 |
#define | DEFAULT_MAXPROPROUNDS 2 |
#define | DEFAULT_MAXBACKTRACKS 10 |
#define | DEFAULT_COPYCUTS TRUE |
#define | DEFAULT_USELOCKFIXINGS FALSE |
Functions | |
static | SCIP_DECL_SORTINDCOMP (compCliquesSize) |
static int | getCliqueUnfixedVars (SCIP_CLIQUE *clique) |
static SCIP_RETCODE | applyCliqueFixings (SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_Bool enabledconflicts, SCIP_VAR **onefixvars, SCIP_Shortbool *onefixvals, int *nonefixvars, SCIP_Bool *cutoff) |
static | SCIP_DECL_HEURCOPY (heurCopyClique) |
static | SCIP_DECL_HEURFREE (heurFreeClique) |
static | SCIP_DECL_HEURINIT (heurInitClique) |
static | SCIP_DECL_HEUREXEC (heurExecClique) |
SCIP_RETCODE | SCIPincludeHeurClique (SCIP *scip) |
Macro Definition Documentation
◆ HEUR_NAME
#define HEUR_NAME "clique" |
Definition at line 76 of file heur_clique.c.
◆ HEUR_DESC
#define HEUR_DESC "LNS heuristic using a clique partition to restrict the search neighborhood" |
Definition at line 77 of file heur_clique.c.
◆ HEUR_DISPCHAR
#define HEUR_DISPCHAR SCIP_HEURDISPCHAR_PROP |
Definition at line 78 of file heur_clique.c.
◆ HEUR_PRIORITY
#define HEUR_PRIORITY 5000 |
Definition at line 79 of file heur_clique.c.
◆ HEUR_FREQ
#define HEUR_FREQ 0 |
Definition at line 80 of file heur_clique.c.
◆ HEUR_FREQOFS
#define HEUR_FREQOFS 0 |
Definition at line 81 of file heur_clique.c.
◆ HEUR_MAXDEPTH
#define HEUR_MAXDEPTH -1 |
Definition at line 82 of file heur_clique.c.
◆ HEUR_TIMING
#define HEUR_TIMING SCIP_HEURTIMING_BEFORENODE |
Definition at line 83 of file heur_clique.c.
◆ HEUR_USESSUBSCIP
#define HEUR_USESSUBSCIP TRUE |
does the heuristic use a secondary SCIP instance?
Definition at line 84 of file heur_clique.c.
◆ DEFAULT_MAXNODES
#define DEFAULT_MAXNODES 5000LL |
maximum number of nodes to regard in the subproblem
Definition at line 86 of file heur_clique.c.
◆ DEFAULT_MININTFIXINGRATE
#define DEFAULT_MININTFIXINGRATE 0.65 |
minimum percentage of integer variables that have to be fixed
Definition at line 87 of file heur_clique.c.
◆ DEFAULT_MINMIPFIXINGRATE
#define DEFAULT_MINMIPFIXINGRATE 0.65 |
minimum percentage of variables that have to be fixed within sub-SCIP (integer and continuous)
Definition at line 89 of file heur_clique.c.
◆ DEFAULT_MINIMPROVE
#define DEFAULT_MINIMPROVE 0.01 |
factor by which clique heuristic should at least improve the incumbent
Definition at line 91 of file heur_clique.c.
◆ DEFAULT_MINNODES
#define DEFAULT_MINNODES 500LL |
minimum number of nodes to regard in the subproblem
Definition at line 92 of file heur_clique.c.
◆ DEFAULT_NODESOFS
#define DEFAULT_NODESOFS 500LL |
number of nodes added to the contingent of the total nodes
Definition at line 93 of file heur_clique.c.
◆ DEFAULT_NODESQUOT
#define DEFAULT_NODESQUOT 0.1 |
subproblem nodes in relation to nodes of the original problem
Definition at line 94 of file heur_clique.c.
◆ DEFAULT_MAXPROPROUNDS
#define DEFAULT_MAXPROPROUNDS 2 |
maximum number of propagation rounds during probing
Definition at line 95 of file heur_clique.c.
◆ DEFAULT_MAXBACKTRACKS
#define DEFAULT_MAXBACKTRACKS 10 |
maximum number of backtracks during the fixing process
Definition at line 96 of file heur_clique.c.
◆ DEFAULT_COPYCUTS
#define DEFAULT_COPYCUTS TRUE |
should all active cuts from the cutpool of the original scip be copied to constraints of the subscip
Definition at line 98 of file heur_clique.c.
◆ DEFAULT_USELOCKFIXINGS
#define DEFAULT_USELOCKFIXINGS FALSE |
should more variables be fixed based on variable locks if the fixing rate was not reached?
Definition at line 100 of file heur_clique.c.
Function Documentation
◆ SCIP_DECL_SORTINDCOMP()
|
static |
comparison method for sorting cliques by their size
Definition at line 135 of file heur_clique.c.
◆ getCliqueUnfixedVars()
|
static |
Definition at line 143 of file heur_clique.c.
References SCIPcliqueGetNVars(), SCIPcliqueGetVars(), SCIPvarGetLbLocal(), and SCIPvarGetUbLocal().
Referenced by applyCliqueFixings().
◆ applyCliqueFixings()
|
static |
apply clique fixing using probing
- Parameters
-
scip original SCIP data structure heurdata structure containing heurdata enabledconflicts was conflict analysis enabled before the heuristic call? onefixvars array to store all variables which are fixed to one in the cliques onefixvals array to store the values of all variables fixed to one in the cliques nonefixvars pointer to store the number of variables fixed to one cutoff pointer to store whether the propagation stopped with infeasibility
Definition at line 170 of file heur_clique.c.
References FALSE, getCliqueUnfixedVars(), NULL, SCIP_Bool, SCIP_CALL, SCIP_CONFTYPE_PROPAGATION, SCIP_LONGINT_FORMAT, SCIP_MAXSTRLEN, SCIP_MAXTREEDEPTH, SCIP_OKAY, SCIP_Real, SCIPaddConflict(), SCIPallocBufferArray, SCIPallocClearBufferArray, SCIPbacktrackProbing(), SCIPcliqueGetNVars(), SCIPcliqueGetValues(), SCIPcliqueGetVars(), SCIPcreateConsLogicor(), SCIPdebugMsg, SCIPdebugPrintCons, SCIPfixVarProbing(), SCIPfreeBufferArray, SCIPgetCliques(), SCIPgetDepth(), SCIPgetFocusNode(), SCIPgetNBinVars(), SCIPgetNCliques(), SCIPgetNegatedVar(), SCIPgetNNodes(), SCIPgetProbingDepth(), SCIPinfinity(), SCIPisStopped(), SCIPnewProbingNode(), SCIPpropagateProbing(), SCIPsnprintf(), SCIPsort(), SCIPvarGetLbLocal(), SCIPvarGetName(), SCIPvarGetObj(), SCIPvarGetUbLocal(), and TRUE.
Referenced by SCIP_DECL_HEUREXEC().
◆ SCIP_DECL_HEURCOPY()
|
static |
copy method for primal heuristic plugins (called when SCIP copies plugins)
Definition at line 516 of file heur_clique.c.
References HEUR_NAME, NULL, SCIP_CALL, SCIP_OKAY, SCIPheurGetName(), and SCIPincludeHeurClique().
◆ SCIP_DECL_HEURFREE()
|
static |
destructor of primal heuristic to free user data (called when SCIP is exiting)
Definition at line 530 of file heur_clique.c.
References HEUR_NAME, NULL, SCIP_OKAY, SCIPfreeBlockMemory, SCIPheurGetData(), SCIPheurGetName(), and SCIPheurSetData().
◆ SCIP_DECL_HEURINIT()
|
static |
initialization method of primal heuristic (called after problem was transformed)
Definition at line 551 of file heur_clique.c.
References HEUR_NAME, NULL, SCIP_OKAY, SCIPheurGetData(), and SCIPheurGetName().
◆ SCIP_DECL_HEUREXEC()
|
static |
execution method of primal heuristic
Definition at line 570 of file heur_clique.c.
References applyCliqueFixings(), FALSE, HEUR_NAME, MIN, NULL, SCIP_Bool, SCIP_CALL, SCIP_CALL_ABORT, SCIP_CONFTYPE_INFEASLP, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_FOUNDSOL, SCIP_Longint, SCIP_LONGINT_FORMAT, SCIP_LPSOLSTAT_ERROR, SCIP_LPSOLSTAT_INFEASIBLE, SCIP_LPSOLSTAT_OBJLIMIT, SCIP_LPSOLSTAT_OPTIMAL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_PARAMSETTING_FAST, SCIP_PARAMSETTING_OFF, SCIP_Real, SCIP_Shortbool, SCIP_STATUS_INFEASIBLE, SCIP_VERBLEVEL_FULL, SCIPaddConflict(), SCIPaddConsNode(), SCIPallColsInLP(), SCIPallocBufferArray, SCIPapplyLockFixings(), SCIPblkmem(), SCIPcheckCopyLimits(), SCIPconstructLP(), SCIPcopyConsCompression(), SCIPcopyCuts(), SCIPcopyLimits(), SCIPcreate(), SCIPcreateConsLogicor(), SCIPcreateSol(), SCIPcutoffNode(), SCIPdebug, SCIPdebugMsg, SCIPdebugPrintCons, SCIPenableVarHistory(), SCIPendProbing(), SCIPfindBranchrule(), SCIPflushLP(), SCIPfree(), SCIPfreeBufferArray, SCIPfreeBufferArrayNull, SCIPfreeSol(), SCIPgetBoolParam(), SCIPgetCurrentNode(), SCIPgetFocusNode(), SCIPgetLowerbound(), SCIPgetLPObjval(), SCIPgetLPSolstat(), SCIPgetNBinVars(), SCIPgetNCliques(), SCIPgetNConss(), SCIPgetNegatedVar(), SCIPgetNLPCols(), SCIPgetNLPIterations(), SCIPgetNNodes(), SCIPgetNPseudoBranchCands(), SCIPgetNSols(), SCIPgetNUnfixedLPCols(), SCIPgetNVars(), SCIPgetSolOrigObj(), SCIPgetSolvingTime(), SCIPgetStatus(), SCIPgetUpperbound(), SCIPgetVarsData(), SCIPhasCurrentNodeLP(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPheurGetData(), SCIPheurGetName(), SCIPheurGetNBestSolsFound(), SCIPheurGetNCalls(), SCIPinProbing(), SCIPisInfinity(), SCIPisLPConstructed(), SCIPisLPSolBasic(), SCIPisParamFixed(), SCIPisStopped(), SCIPlinkLPSol(), SCIPpresolve(), SCIPprintSol(), SCIPprintStatistics(), SCIPreleaseCons(), SCIProundSol(), SCIPsetBoolParam(), SCIPsetIntParam(), SCIPsetLongintParam(), SCIPsetObjlimit(), SCIPsetPresolving(), SCIPsetSeparating(), SCIPsetSubscipsOff(), SCIPsnprintf(), SCIPsnprintfProbingStats(), SCIPsolve(), SCIPsolveProbingLP(), SCIPstartProbing(), SCIPsumepsilon(), SCIPtranslateSubSols(), SCIPtrySol(), SCIPverbMessage(), SCIPwarningMessage(), and TRUE.