Detailed Description
Restricted Master Heuristic.
Definition in file heur_restmaster.c.
#include <assert.h>#include "gcg/heur_restmaster.h"#include "gcg/gcg.h"#include "gcg/pricer_gcg.h"#include "scip/scipdefplugins.h"Go to the source code of this file.
Data Structures | |
| struct | SCIP_HeurData |
Macros | |
| #define | HEUR_NAME "restmaster" |
| #define | HEUR_DESC "LNS heuristic for the master problem that fixes some master variables to zero" |
| #define | HEUR_DISPCHAR 'P' |
| #define | HEUR_PRIORITY 100 |
| #define | HEUR_FREQ 30 |
| #define | HEUR_FREQOFS 0 |
| #define | HEUR_MAXDEPTH -1 |
| #define | HEUR_TIMING SCIP_HEURTIMING_DURINGLPLOOP | SCIP_HEURTIMING_DURINGPRICINGLOOP |
| #define | HEUR_USESSUBSCIP TRUE |
| #define | DEFAULT_MAXNODES 5000LL |
| #define | DEFAULT_MINFIXINGRATE 0.5 |
| #define | DEFAULT_MINIMPROVE 0.01 |
| #define | DEFAULT_MINNODES 500LL |
| #define | DEFAULT_NODESOFS 500LL |
| #define | DEFAULT_NODESQUOT 0.1 |
| #define | DEFAULT_USELPROWS FALSE |
| #define | DEFAULT_COPYCUTS TRUE |
| #define | DEFAULT_PBHEUR FALSE |
| #define | heurCopyRestmaster NULL |
| #define | heurExitRestmaster NULL |
| #define | heurInitsolRestmaster NULL |
| #define | heurExitsolRestmaster NULL |
Functions | |
| static SCIP_RETCODE | setupSubproblem (SCIP *scip, SCIP *restmaster, SCIP_VAR **restmastervars, SCIP_Real minfixingrate, SCIP_Bool uselprows, SCIP_Bool pbheur, SCIP_Bool *success) |
| static SCIP_RETCODE | createNewSol (SCIP *origprob, SCIP *scip, SCIP *restmaster, SCIP_VAR **restmastervars, SCIP_HEUR *heur, SCIP_SOL *restmastersol, SCIP_Bool *success) |
| static | SCIP_DECL_HEURFREE (heurFreeRestmaster) |
| static | SCIP_DECL_HEURINIT (heurInitRestmaster) |
| static | SCIP_DECL_HEUREXEC (heurExecRestmaster) |
| SCIP_RETCODE | GCGincludeHeurRestmaster (GCG *gcg) |
Macro Definition Documentation
◆ HEUR_NAME
| #define HEUR_NAME "restmaster" |
Definition at line 46 of file heur_restmaster.c.
◆ HEUR_DESC
| #define HEUR_DESC "LNS heuristic for the master problem that fixes some master variables to zero" |
Definition at line 47 of file heur_restmaster.c.
◆ HEUR_DISPCHAR
| #define HEUR_DISPCHAR 'P' |
Definition at line 48 of file heur_restmaster.c.
◆ HEUR_PRIORITY
| #define HEUR_PRIORITY 100 |
Definition at line 49 of file heur_restmaster.c.
◆ HEUR_FREQ
| #define HEUR_FREQ 30 |
Definition at line 50 of file heur_restmaster.c.
◆ HEUR_FREQOFS
| #define HEUR_FREQOFS 0 |
Definition at line 51 of file heur_restmaster.c.
◆ HEUR_MAXDEPTH
| #define HEUR_MAXDEPTH -1 |
Definition at line 52 of file heur_restmaster.c.
◆ HEUR_TIMING
| #define HEUR_TIMING SCIP_HEURTIMING_DURINGLPLOOP | SCIP_HEURTIMING_DURINGPRICINGLOOP |
Definition at line 53 of file heur_restmaster.c.
◆ HEUR_USESSUBSCIP
| #define HEUR_USESSUBSCIP TRUE |
Definition at line 54 of file heur_restmaster.c.
◆ DEFAULT_MAXNODES
| #define DEFAULT_MAXNODES 5000LL |
maximum number of nodes to regard in the subproblem
Definition at line 56 of file heur_restmaster.c.
◆ DEFAULT_MINFIXINGRATE
| #define DEFAULT_MINFIXINGRATE 0.5 |
minimum percentage of integer variables that have to be fixed
Definition at line 57 of file heur_restmaster.c.
◆ DEFAULT_MINIMPROVE
| #define DEFAULT_MINIMPROVE 0.01 |
factor by which restricted master should at least improve the incumbent
Definition at line 58 of file heur_restmaster.c.
◆ DEFAULT_MINNODES
| #define DEFAULT_MINNODES 500LL |
minimum number of nodes to regard in the subproblem
Definition at line 59 of file heur_restmaster.c.
◆ DEFAULT_NODESOFS
| #define DEFAULT_NODESOFS 500LL |
number of nodes added to the contingent of the total nodes
Definition at line 60 of file heur_restmaster.c.
◆ DEFAULT_NODESQUOT
| #define DEFAULT_NODESQUOT 0.1 |
subproblem nodes in relation to nodes of the original problem
Definition at line 61 of file heur_restmaster.c.
◆ DEFAULT_USELPROWS
| #define DEFAULT_USELPROWS FALSE |
should subproblem be created out of the rows in the LP rows, otherwise, the copy constructor of the constraints handlers are used
Definition at line 63 of file heur_restmaster.c.
◆ DEFAULT_COPYCUTS
| #define DEFAULT_COPYCUTS TRUE |
if DEFAULT_USELPROWS is FALSE, then should all active cuts from the cutpool of the original scip be copied to constraints of the subscip
Definition at line 65 of file heur_restmaster.c.
◆ DEFAULT_PBHEUR
| #define DEFAULT_PBHEUR FALSE |
default value for using the restricted master heuristic as price-and-branch heuristic? (this changes the HEUR_TIMING to SCIP_HEURTIMING_AFTERNODE, and it changes the HEUR_FREQ to 0.
Definition at line 70 of file heur_restmaster.c.
◆ heurCopyRestmaster
| #define heurCopyRestmaster NULL |
copy method for primal heuristic plugins (called when SCIP copies plugins)
Definition at line 277 of file heur_restmaster.c.
◆ heurExitRestmaster
| #define heurExitRestmaster NULL |
deinitialization method of primal heuristic (called before transformed problem is freed)
Definition at line 330 of file heur_restmaster.c.
◆ heurInitsolRestmaster
| #define heurInitsolRestmaster NULL |
solving process initialization method of primal heuristic (called when branch and bound process is about to begin)
Definition at line 334 of file heur_restmaster.c.
◆ heurExitsolRestmaster
| #define heurExitsolRestmaster NULL |
solving process deinitialization method of primal heuristic (called before branch and bound process data is freed)
Definition at line 338 of file heur_restmaster.c.
Function Documentation
◆ setupSubproblem()
|
static |
set up the restricted master problem by fixing master variables to zero
- Parameters
-
scip SCIP data structure for master problem restmaster SCIP data structure for restricted master problem restmastervars the variables of the restricted minfixingrate percentage of integer variables that have to be fixed uselprows should subproblem be created out of the rows in the LP rows? pbheur use heuristic as price-and-branch heuristic? success pointer to store whether the problem was created successfully
Definition at line 106 of file heur_restmaster.c.
References FALSE, MAX, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPaddCons(), SCIPallocBufferArray, SCIPchgVarLbGlobal(), SCIPchgVarUbGlobal(), SCIPcolGetVar(), SCIPcreateConsLinear(), SCIPdebugMessage, SCIPfreeBufferArray, SCIPgetLPRowsData(), SCIPgetSolVal(), SCIPgetVarsData(), SCIPisFeasZero(), SCIPreleaseCons(), SCIProwGetCols(), SCIProwGetConstant(), SCIProwGetLhs(), SCIProwGetName(), SCIProwGetNNonz(), SCIProwGetRhs(), SCIProwGetVals(), SCIProwIsLocal(), SCIPvarGetProbindex(), and TRUE.
Referenced by SCIP_DECL_HEUREXEC().
◆ createNewSol()
|
static |
creates a new solution for the original problem by translating the solution of the restricted master problem
- Parameters
-
origprob original SCIP data structure scip SCIP data structure of master problem restmaster SCIP structure of restricted master problem restmastervars the variables of the restricted master problem heur Restricted Master heuristic structure restmastersol solution of the restricted master problem success used to store whether new solution was found or not
Definition at line 223 of file heur_restmaster.c.
References FALSE, NULL, SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPallocBufferArray, SCIPcreateSol(), SCIPfreeBufferArray, SCIPgetNOrigVars(), SCIPgetSolVals(), SCIPgetVarsData(), SCIPsetSolVals(), SCIPtrySolFree(), and TRUE.
Referenced by SCIP_DECL_HEUREXEC().
◆ SCIP_DECL_HEURFREE()
|
static |
destructor of primal heuristic to free user data (called when SCIP is exiting)
Definition at line 281 of file heur_restmaster.c.
References NULL, SCIP_OKAY, SCIPfreeMemory, SCIPheurGetData(), and SCIPheurSetData().
◆ SCIP_DECL_HEURINIT()
|
static |
initialization method of primal heuristic (called after problem was transformed)
Definition at line 302 of file heur_restmaster.c.
References SCIP_HeurData::maxnodes, NULL, SCIP_HeurData::pbheur, SCIP_HEURTIMING_AFTERNODE, SCIP_OKAY, SCIPheurGetData(), SCIPheurSetFreq(), SCIPheurSetTimingmask(), and SCIP_HeurData::usednodes.
◆ SCIP_DECL_HEUREXEC()
|
static |
execution method of primal heuristic
Definition at line 343 of file heur_restmaster.c.
References SCIP_HeurData::copycuts, createNewSol(), FALSE, SCIP_HeurData::gcg, GCGgetOrigprob(), SCIP_HeurData::maxnodes, MIN, SCIP_HeurData::minfixingrate, SCIP_HeurData::minimprove, SCIP_HeurData::nodesofs, SCIP_HeurData::nodesquot, NULL, SCIP_HeurData::pbheur, SCIP_Bool, SCIP_CALL, SCIP_DELAYED, SCIP_DIDNOTFIND, SCIP_DIDNOTRUN, SCIP_FOUNDSOL, SCIP_Longint, SCIP_LONGINT_FORMAT, SCIP_LPSOLSTAT_OPTIMAL, SCIP_MAXSTRLEN, SCIP_OKAY, SCIP_PARAMSETTING_FAST, SCIP_PARAMSETTING_OFF, SCIP_Real, SCIPallocBufferArray, SCIPblkmem(), SCIPcopy(), SCIPcopyCuts(), SCIPcopyVars(), SCIPcreate(), SCIPcreateProb(), SCIPdebugMessage, SCIPfindBranchrule(), SCIPfindNodesel(), SCIPfree(), SCIPfreeBufferArray, SCIPgetBoolParam(), SCIPgetLowerbound(), SCIPgetLPSolstat(), SCIPgetMemUsed(), SCIPgetNConss(), SCIPgetNNodes(), SCIPgetNSols(), SCIPgetNVars(), SCIPgetProbName(), SCIPgetRealParam(), SCIPgetSols(), SCIPgetSolvingTime(), SCIPgetUpperbound(), SCIPgetVarsData(), SCIPhasCurrentNodeLP(), SCIPhashmapCreate(), SCIPhashmapFree(), SCIPhashmapGetImage(), SCIPheurGetData(), SCIPheurGetNBestSolsFound(), SCIPheurGetNCalls(), SCIPincludeDefaultPlugins(), SCIPisInfinity(), SCIPisParamFixed(), SCIPisStopped(), SCIPpresolve(), SCIPsetBoolParam(), SCIPsetIntParam(), SCIPsetLongintParam(), SCIPsetObjlimit(), SCIPsetPresolving(), SCIPsetRealParam(), SCIPsetSeparating(), SCIPsetSubscipsOff(), SCIPsnprintf(), SCIPsolve(), SCIPsumepsilon(), SCIPwarningMessage(), setupSubproblem(), TRUE, SCIP_HeurData::usednodes, and SCIP_HeurData::uselprows.
◆ GCGincludeHeurRestmaster()
| SCIP_RETCODE GCGincludeHeurRestmaster | ( | GCG * | gcg | ) |
creates the Restricted Master primal heuristic and includes it in SCIP
- Parameters
-
gcg GCG data structure
Definition at line 639 of file heur_restmaster.c.
References SCIP_HeurData::copycuts, DEFAULT_COPYCUTS, DEFAULT_MAXNODES, DEFAULT_MINFIXINGRATE, DEFAULT_MINIMPROVE, DEFAULT_MINNODES, DEFAULT_NODESOFS, DEFAULT_NODESQUOT, DEFAULT_PBHEUR, DEFAULT_USELPROWS, FALSE, SCIP_HeurData::gcg, GCGgetMasterprob(), HEUR_DESC, HEUR_DISPCHAR, HEUR_FREQ, HEUR_FREQOFS, HEUR_MAXDEPTH, HEUR_NAME, HEUR_PRIORITY, HEUR_TIMING, HEUR_USESSUBSCIP, heurCopyRestmaster, heurExitRestmaster, heurExitsolRestmaster, heurInitsolRestmaster, SCIP_HeurData::maxnodes, SCIP_HeurData::minfixingrate, SCIP_HeurData::minimprove, SCIP_HeurData::minnodes, SCIP_HeurData::nodesofs, SCIP_HeurData::nodesquot, NULL, SCIP_HeurData::pbheur, SCIP_CALL, SCIP_LONGINT_MAX, SCIP_OKAY, SCIPaddBoolParam(), SCIPaddLongintParam(), SCIPaddRealParam(), SCIPallocMemory, SCIPincludeHeur(), TRUE, and SCIP_HeurData::uselprows.
Referenced by GCGincludeMasterPlugins().