Detailed Description
DINS primal heuristic (according to Ghosh)
Definition in file heur_gcgdins.c.
#include <assert.h>
#include <string.h>
#include "heur_gcgdins.h"
#include "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 (SCIP *scip, 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 | SCIPincludeHeurGcgdins (SCIP *scip) |
Macro Definition Documentation
◆ HEUR_NAME
#define HEUR_NAME "gcgdins" |
Definition at line 45 of file heur_gcgdins.c.
◆ HEUR_DESC
#define HEUR_DESC "distance induced neighborhood search by Ghosh" |
Definition at line 46 of file heur_gcgdins.c.
◆ HEUR_DISPCHAR
#define HEUR_DISPCHAR 'D' |
Definition at line 47 of file heur_gcgdins.c.
◆ HEUR_PRIORITY
#define HEUR_PRIORITY -1105000 |
Definition at line 48 of file heur_gcgdins.c.
◆ HEUR_FREQ
#define HEUR_FREQ -1 |
Definition at line 49 of file heur_gcgdins.c.
◆ HEUR_FREQOFS
#define HEUR_FREQOFS 0 |
Definition at line 50 of file heur_gcgdins.c.
◆ HEUR_MAXDEPTH
#define HEUR_MAXDEPTH -1 |
Definition at line 51 of file heur_gcgdins.c.
◆ HEUR_TIMING
#define HEUR_TIMING SCIP_HEURTIMING_AFTERNODE |
Definition at line 52 of file heur_gcgdins.c.
◆ HEUR_USESSUBSCIP
#define HEUR_USESSUBSCIP TRUE |
does the heuristic use a secondary SCIP instance?
Definition at line 53 of file heur_gcgdins.c.
◆ DEFAULT_NODESOFS
#define DEFAULT_NODESOFS 5000LL |
number of nodes added to the contingent of the total nodes
Definition at line 55 of file heur_gcgdins.c.
◆ DEFAULT_MAXNODES
#define DEFAULT_MAXNODES 5000LL |
maximum number of nodes to regard in the subproblem
Definition at line 56 of file heur_gcgdins.c.
◆ DEFAULT_MINNODES
#define DEFAULT_MINNODES 500LL |
minimum number of nodes to regard in the subproblem
Definition at line 57 of file heur_gcgdins.c.
◆ DEFAULT_MINIMPROVE
#define DEFAULT_MINIMPROVE 0.01 |
factor by which DINS should at least improve the incumbent
Definition at line 58 of file heur_gcgdins.c.
◆ DEFAULT_NODESQUOT
#define DEFAULT_NODESQUOT 0.05 |
subproblem nodes in relation to nodes of the original problem
Definition at line 59 of file heur_gcgdins.c.
◆ DEFAULT_NWAITINGNODES
#define DEFAULT_NWAITINGNODES 0LL |
number of nodes without incumbent change that heuristic should wait
Definition at line 60 of file heur_gcgdins.c.
◆ DEFAULT_NEIGHBORHOODSIZE
#define DEFAULT_NEIGHBORHOODSIZE 18 |
radius of the incumbents neighborhood to be searched
Definition at line 61 of file heur_gcgdins.c.
◆ DEFAULT_SOLNUM
#define DEFAULT_SOLNUM 5 |
number of pool-solutions to be checked for flag array update
Definition at line 62 of file heur_gcgdins.c.
◆ 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 63 of file heur_gcgdins.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_gcgdins.c.
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 113 of file heur_gcgdins.c.
Referenced by 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 279 of file heur_gcgdins.c.
Referenced by SCIP_DECL_HEUREXEC().
◆ getRootRelaxSol()
|
static |
get relaxation solution of root node (in original variables)
- Parameters
-
scip SCIP data structure rootsol pointer to store root relaxation solution
Definition at line 357 of file heur_gcgdins.c.
References GCGgetMasterprob(), and GCGtransformMastersolToOrigsol().
Referenced by 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 395 of file heur_gcgdins.c.
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 464 of file heur_gcgdins.c.
◆ SCIP_DECL_HEURINITSOL()
|
static |
solving process initialization method of primal heuristic (called when branch and bound process is about to begin)
Definition at line 485 of file heur_gcgdins.c.
◆ SCIP_DECL_HEUREXITSOL()
|
static |
solving process deinitialization method of primal heuristic (called before branch and bound process data is freed)
Definition at line 529 of file heur_gcgdins.c.
◆ SCIP_DECL_HEUREXEC()
|
static |
execution method of primal heuristic
Definition at line 581 of file heur_gcgdins.c.
References addLocalBranchingConstraint(), createNewSol(), createSubproblem(), GCGgetMasterprob(), and getRootRelaxSol().
◆ SCIPincludeHeurGcgdins()
SCIP_RETCODE SCIPincludeHeurGcgdins | ( | SCIP * | scip | ) |
creates the GCG DINS primal heuristic and includes it in SCIP
- Parameters
-
scip SCIP data structure
Definition at line 1030 of file heur_gcgdins.c.
References DEFAULT_COPYCUTS, DEFAULT_MAXNODES, DEFAULT_MINIMPROVE, DEFAULT_MINNODES, DEFAULT_NEIGHBORHOODSIZE, DEFAULT_NODESOFS, DEFAULT_NODESQUOT, DEFAULT_NWAITINGNODES, DEFAULT_SOLNUM, DEFAULT_USELPROWS, HEUR_DESC, HEUR_DISPCHAR, HEUR_FREQ, HEUR_FREQOFS, HEUR_MAXDEPTH, HEUR_NAME, HEUR_PRIORITY, HEUR_TIMING, and HEUR_USESSUBSCIP.
Referenced by SCIPincludeGcgPlugins().