Detailed Description
DINS primal heuristic (according to Ghosh).
Definition in file heur_gcgdins.c.
#include <assert.h>#include <string.h>#include "gcg/heur_gcgdins.h"#include "gcg/gcg.h"#include "gcg/pricer_gcg.h"#include "scip/scipdefplugins.h"#include "scip/cons_linear.h"Go to the source code of this file.
Data Structures | |
| struct | SCIP_HeurData |
Macros | |
| #define | HEUR_NAME "gcgdins" |
| #define | HEUR_DESC "distance induced neighborhood search by Ghosh" |
| #define | HEUR_DISPCHAR 'D' |
| #define | HEUR_PRIORITY -1105000 |
| #define | HEUR_FREQ -1 |
| #define | HEUR_FREQOFS 0 |
| #define | HEUR_MAXDEPTH -1 |
| #define | HEUR_TIMING SCIP_HEURTIMING_AFTERNODE |
| #define | HEUR_USESSUBSCIP TRUE |
| #define | DEFAULT_NODESOFS 5000LL |
| #define | DEFAULT_MAXNODES 5000LL |
| #define | DEFAULT_MINNODES 500LL |
| #define | DEFAULT_MINIMPROVE 0.01 |
| #define | DEFAULT_NODESQUOT 0.05 |
| #define | DEFAULT_NWAITINGNODES 0LL |
| #define | DEFAULT_NEIGHBORHOODSIZE 18 |
| #define | DEFAULT_SOLNUM 5 |
| #define | DEFAULT_USELPROWS FALSE |
| #define | DEFAULT_COPYCUTS TRUE |
Functions | |
| static SCIP_RETCODE | createSubproblem (SCIP *scip, SCIP *subscip, SCIP_VAR **vars, SCIP_VAR **subvars, int nbinvars, int nintvars, SCIP_Bool uselprows, int *fixingcounter, int *zerocounter) |
| static SCIP_RETCODE | addLocalBranchingConstraint (SCIP *scip, SCIP *subscip, SCIP_VAR **subvars, SCIP_HEURDATA *heurdata, SCIP_Bool *fixed) |
| static SCIP_RETCODE | getRootRelaxSol (GCG *gcg, SCIP_SOL **rootsol) |
| static SCIP_RETCODE | createNewSol (SCIP *scip, SCIP *subscip, SCIP_VAR **subvars, SCIP_HEUR *heur, SCIP_SOL *subsol, SCIP_Bool *success) |
| static | SCIP_DECL_HEURFREE (heurFreeGcgdins) |
| static | SCIP_DECL_HEURINITSOL (heurInitsolGcgdins) |
| static | SCIP_DECL_HEUREXITSOL (heurExitsolGcgdins) |
| static | SCIP_DECL_HEUREXEC (heurExecGcgdins) |
| SCIP_RETCODE | GCGincludeHeurGcgdins (GCG *gcg) |
Macro Definition Documentation
◆ HEUR_NAME
| #define HEUR_NAME "gcgdins" |
Definition at line 47 of file heur_gcgdins.c.
◆ HEUR_DESC
| #define HEUR_DESC "distance induced neighborhood search by Ghosh" |
Definition at line 48 of file heur_gcgdins.c.
◆ HEUR_DISPCHAR
| #define HEUR_DISPCHAR 'D' |
Definition at line 49 of file heur_gcgdins.c.
◆ HEUR_PRIORITY
| #define HEUR_PRIORITY -1105000 |
Definition at line 50 of file heur_gcgdins.c.
◆ HEUR_FREQ
| #define HEUR_FREQ -1 |
Definition at line 51 of file heur_gcgdins.c.
◆ HEUR_FREQOFS
| #define HEUR_FREQOFS 0 |
Definition at line 52 of file heur_gcgdins.c.
◆ HEUR_MAXDEPTH
| #define HEUR_MAXDEPTH -1 |
Definition at line 53 of file heur_gcgdins.c.
◆ HEUR_TIMING
| #define HEUR_TIMING SCIP_HEURTIMING_AFTERNODE |
Definition at line 54 of file heur_gcgdins.c.
Referenced by GCGincludeDivingHeurMaster(), GCGincludeDivingHeurOrig(), GCGincludeHeurGcgdins(), GCGincludeHeurGcgfeaspump(), GCGincludeHeurGcgrens(), GCGincludeHeurGcgrins(), GCGincludeHeurGcgrounding(), GCGincludeHeurGcgshifting(), GCGincludeHeurGcgsimplerounding(), GCGincludeHeurGcgzirounding(), GCGincludeHeurGreedycolsel(), GCGincludeHeurRelaxcolsel(), GCGincludeHeurRestmaster(), GCGincludeHeurSetcover(), GCGincludeHeurXpcrossover(), GCGincludeHeurXprins(), and SCIPincludeHeurIPcolgen().
◆ HEUR_USESSUBSCIP
| #define HEUR_USESSUBSCIP TRUE |
does the heuristic use a secondary SCIP instance?
Definition at line 55 of file heur_gcgdins.c.
Referenced by GCGincludeDivingHeurMaster(), GCGincludeDivingHeurOrig(), GCGincludeHeurGcgdins(), GCGincludeHeurGcgfeaspump(), GCGincludeHeurGcgrens(), GCGincludeHeurGcgrins(), GCGincludeHeurGcgrounding(), GCGincludeHeurGcgshifting(), GCGincludeHeurGcgsimplerounding(), GCGincludeHeurGcgzirounding(), GCGincludeHeurGreedycolsel(), GCGincludeHeurRelaxcolsel(), GCGincludeHeurRestmaster(), GCGincludeHeurSetcover(), GCGincludeHeurXpcrossover(), GCGincludeHeurXprins(), and SCIPincludeHeurIPcolgen().
◆ DEFAULT_NODESOFS
| #define DEFAULT_NODESOFS 5000LL |
number of nodes added to the contingent of the total nodes
Definition at line 57 of file heur_gcgdins.c.
Referenced by GCGincludeHeurGcgdins(), GCGincludeHeurGcgrens(), GCGincludeHeurGcgrins(), GCGincludeHeurRestmaster(), GCGincludeHeurXpcrossover(), GCGincludeHeurXprins(), and SCIPincludeHeurIPcolgen().
◆ DEFAULT_MAXNODES
| #define DEFAULT_MAXNODES 5000LL |
maximum number of nodes to regard in the subproblem
Definition at line 58 of file heur_gcgdins.c.
Referenced by GCGincludeHeurGcgdins(), GCGincludeHeurGcgrens(), GCGincludeHeurGcgrins(), GCGincludeHeurRestmaster(), GCGincludeHeurXpcrossover(), GCGincludeHeurXprins(), GCGincludeSolverCliquer(), and SCIPincludeHeurIPcolgen().
◆ DEFAULT_MINNODES
| #define DEFAULT_MINNODES 500LL |
minimum number of nodes to regard in the subproblem
Definition at line 59 of file heur_gcgdins.c.
Referenced by GCGincludeHeurGcgdins(), GCGincludeHeurGcgrens(), GCGincludeHeurGcgrins(), GCGincludeHeurRestmaster(), GCGincludeHeurXpcrossover(), GCGincludeHeurXprins(), and SCIPincludeHeurIPcolgen().
◆ DEFAULT_MINIMPROVE
| #define DEFAULT_MINIMPROVE 0.01 |
factor by which DINS should at least improve the incumbent
Definition at line 60 of file heur_gcgdins.c.
Referenced by GCGincludeHeurGcgdins(), GCGincludeHeurGcgrens(), GCGincludeHeurGcgrins(), GCGincludeHeurRestmaster(), GCGincludeHeurXpcrossover(), GCGincludeHeurXprins(), and SCIPincludeHeurIPcolgen().
◆ DEFAULT_NODESQUOT
| #define DEFAULT_NODESQUOT 0.05 |
subproblem nodes in relation to nodes of the original problem
Definition at line 61 of file heur_gcgdins.c.
Referenced by GCGincludeHeurGcgdins(), GCGincludeHeurGcgrens(), GCGincludeHeurGcgrins(), GCGincludeHeurRestmaster(), GCGincludeHeurXpcrossover(), GCGincludeHeurXprins(), and SCIPincludeHeurIPcolgen().
◆ DEFAULT_NWAITINGNODES
| #define DEFAULT_NWAITINGNODES 0LL |
number of nodes without incumbent change that heuristic should wait
Definition at line 62 of file heur_gcgdins.c.
Referenced by GCGincludeHeurGcgdins(), and GCGincludeHeurGcgrins().
◆ DEFAULT_NEIGHBORHOODSIZE
| #define DEFAULT_NEIGHBORHOODSIZE 18 |
radius of the incumbents neighborhood to be searched
Definition at line 63 of file heur_gcgdins.c.
Referenced by GCGincludeHeurGcgdins(), and GCGincludeHeurGcgfeaspump().
◆ DEFAULT_SOLNUM
| #define DEFAULT_SOLNUM 5 |
number of pool-solutions to be checked for flag array update
Definition at line 64 of file heur_gcgdins.c.
Referenced by GCGincludeHeurGcgdins().
◆ DEFAULT_USELPROWS
| #define DEFAULT_USELPROWS FALSE |
should subproblem be created out of the rows in the LP rows, otherwise, the copy constructors of the constraints handlers are used
Definition at line 65 of file heur_gcgdins.c.
Referenced by GCGincludeHeurGcgdins(), GCGincludeHeurGcgrens(), GCGincludeHeurGcgrins(), GCGincludeHeurRestmaster(), and SCIPincludeHeurIPcolgen().
◆ 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 67 of file heur_gcgdins.c.
Referenced by GCGincludeHeurGcgdins(), GCGincludeHeurGcgfeaspump(), GCGincludeHeurGcgrens(), GCGincludeHeurGcgrins(), GCGincludeHeurRestmaster(), GCGincludeHeurXpcrossover(), GCGincludeHeurXprins(), and SCIPincludeHeurIPcolgen().
Function Documentation
◆ createSubproblem()
|
static |
creates a subproblem for subscip by fixing a number of variables
- Parameters
-
scip SCIP data structure of the original problem subscip SCIP data structure of the subproblem vars variables of the original problem subvars variables of the subproblem nbinvars number of binary variables of problem and subproblem nintvars number of general integer variables of problem and subproblem uselprows should subproblem be created out of the rows in the LP rows? fixingcounter number of integers that get actually fixed zerocounter number of variables fixed to zero
Definition at line 116 of file heur_gcgdins.c.
References assert(), createSubproblem(), i, j, nbinvars, nintvars, SCIP_CALL(), SCIPfreeBufferArray(), and vars.
Referenced by applyGcgrens(), createSubproblem(), createSubproblem(), createSubproblem(), SCIP_DECL_HEUREXEC(), and SCIP_DECL_HEUREXEC().
◆ addLocalBranchingConstraint()
|
static |
create the extra constraint of local branching and add it to subscip
- Parameters
-
scip SCIP data structure of the original problem subscip SCIP data structure of the subproblem subvars variables of the subproblem heurdata heuristic's data structure fixed TRUE --> include variable in LB constraint
Definition at line 282 of file heur_gcgdins.c.
References addLocalBranchingConstraint(), assert(), heurdata, i, nbinvars, SCIP_HeurData::neighborhoodsize, SCIP_CALL(), SCIPfreeBufferArray(), solval, and vars.
Referenced by addLocalBranchingConstraint(), addLocalBranchingConstraint(), if(), and SCIP_DECL_HEUREXEC().
◆ getRootRelaxSol()
|
static |
get relaxation solution of root node (in original variables)
- Parameters
-
gcg GCG data structure rootsol pointer to store root relaxation solution
Definition at line 360 of file heur_gcgdins.c.
References assert(), GCGgetMasterprob(), GCGtransformMastersolToOrigsol(), getRootRelaxSol(), i, masterprob, mastervars, nmastervars, rootsol, and SCIP_CALL().
Referenced by getRootRelaxSol(), getRootRelaxSol(), getRootRelaxSol(), and SCIP_DECL_HEUREXEC().
◆ createNewSol()
|
static |
creates a new solution for the original problem by copying the solution of the subproblem
- Parameters
-
scip original SCIP data structure subscip SCIP structure of the subproblem subvars the variables of the subproblem heur DINS heuristic structure subsol solution of the subproblem success used to store whether new solution was found or not
Definition at line 398 of file heur_gcgdins.c.
References assert(), createNewSol(), heurdata, nvars, SCIP_CALL(), SCIPfreeBufferArray(), success, and vars.
Referenced by applyGcgrens(), createNewSol(), createNewSol(), createNewSol(), createNewSol(), createNewSol(), createNewSol(), createNewSol(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXEC(), SCIP_DECL_HEUREXEC(), and solveRepairProblem().
◆ SCIP_DECL_HEURFREE()
|
static |
destructor of primal heuristic to free user data (called when SCIP is exiting)
Definition at line 467 of file heur_gcgdins.c.
References assert(), heurdata, and SCIPfreeMemory().
◆ SCIP_DECL_HEURINITSOL()
|
static |
solving process initialization method of primal heuristic (called when branch and bound process is about to begin)
Definition at line 488 of file heur_gcgdins.c.
References assert(), SCIP_HeurData::delta, SCIP_HeurData::deltalength, SCIP_HeurData::firstrun, heurdata, i, SCIP_HeurData::lastnsolsfound, SCIP_HeurData::rootsol, SCIP_CALL(), and SCIP_HeurData::usednodes.
◆ SCIP_DECL_HEUREXITSOL()
|
static |
solving process deinitialization method of primal heuristic (called before branch and bound process data is freed)
Definition at line 532 of file heur_gcgdins.c.
References assert(), SCIP_HeurData::delta, SCIP_HeurData::deltalength, heurdata, ncalls, SCIP_HeurData::rootsol, SCIP_CALL(), and SCIP_HeurData::usednodes.
◆ SCIP_DECL_HEUREXEC()
|
static |
execution method of primal heuristic
Definition at line 584 of file heur_gcgdins.c.
References addLocalBranchingConstraint(), assert(), SCIP_HeurData::copycuts, createNewSol(), createSubproblem(), cutoff, SCIP_HeurData::delta, SCIP_HeurData::deltalength, SCIP_HeurData::firstrun, SCIP_HeurData::gcg, GCGgetMasterprob(), getRootRelaxSol(), heurdata, i, j, SCIP_HeurData::lastnsolsfound, masterprob, SCIP_HeurData::maxnodes, SCIP_HeurData::minimprove, nbinvars, SCIP_HeurData::neighborhoodsize, nintvars, SCIP_HeurData::nodesofs, SCIP_HeurData::nodesquot, nsolsfound, nvars, SCIP_HeurData::nwaitingnodes, result, retcode, SCIP_HeurData::rootsol, SCIP_CALL(), SCIPdebugMessage(), SCIPfreeBufferArray(), SCIP_HeurData::solnum, solval, success, SCIP_HeurData::usednodes, SCIP_HeurData::uselprows, varmapfw, and vars.
◆ GCGincludeHeurGcgdins()
| SCIP_RETCODE GCGincludeHeurGcgdins | ( | GCG * | gcg | ) |
creates the GCG DINS primal heuristic and includes it in SCIP
creates the DINS primal heuristic and includes it in SCIP
- Parameters
-
gcg GCG data structure
Definition at line 1034 of file heur_gcgdins.c.
References assert(), SCIP_HeurData::copycuts, DEFAULT_COPYCUTS, DEFAULT_MAXNODES, DEFAULT_MINIMPROVE, DEFAULT_MINNODES, DEFAULT_NEIGHBORHOODSIZE, DEFAULT_NODESOFS, DEFAULT_NODESQUOT, DEFAULT_NWAITINGNODES, DEFAULT_SOLNUM, DEFAULT_USELPROWS, SCIP_HeurData::gcg, GCGgetOrigprob(), GCGincludeHeurGcgdins(), HEUR_DESC, HEUR_DISPCHAR, HEUR_FREQ, HEUR_FREQOFS, HEUR_MAXDEPTH, HEUR_NAME, HEUR_PRIORITY, HEUR_TIMING, HEUR_USESSUBSCIP, heurdata, SCIP_HeurData::maxnodes, SCIP_HeurData::minimprove, SCIP_HeurData::minnodes, SCIP_HeurData::neighborhoodsize, SCIP_HeurData::nodesofs, SCIP_HeurData::nodesquot, SCIP_HeurData::nwaitingnodes, origprob, SCIP_CALL(), SCIP_HeurData::solnum, and SCIP_HeurData::uselprows.
Referenced by GCGincludeGcgPlugins(), and GCGincludeHeurGcgdins().