GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches
heur_gcgdins.c File Reference

Detailed Description

DINS primal heuristic (according to Ghosh).

Author
Robert Waniek
Christian Puchert

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

◆ HEUR_USESSUBSCIP

◆ DEFAULT_NODESOFS

#define DEFAULT_NODESOFS   5000LL

◆ DEFAULT_MAXNODES

#define DEFAULT_MAXNODES   5000LL

◆ DEFAULT_MINNODES

#define DEFAULT_MINNODES   500LL

◆ DEFAULT_MINIMPROVE

#define DEFAULT_MINIMPROVE   0.01

◆ 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()

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

creates a subproblem for subscip by fixing a number of variables

Parameters
scipSCIP data structure of the original problem
subscipSCIP data structure of the subproblem
varsvariables of the original problem
subvarsvariables of the subproblem
nbinvarsnumber of binary variables of problem and subproblem
nintvarsnumber of general integer variables of problem and subproblem
uselprowsshould subproblem be created out of the rows in the LP rows?
fixingcounternumber of integers that get actually fixed
zerocounternumber 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()

SCIP_RETCODE addLocalBranchingConstraint ( SCIP * scip,
SCIP * subscip,
SCIP_VAR ** subvars,
SCIP_HEURDATA * heurdata,
SCIP_Bool * fixed )
static

create the extra constraint of local branching and add it to subscip

Parameters
scipSCIP data structure of the original problem
subscipSCIP data structure of the subproblem
subvarsvariables of the subproblem
heurdataheuristic's data structure
fixedTRUE --> 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()

SCIP_RETCODE getRootRelaxSol ( GCG * gcg,
SCIP_SOL ** rootsol )
static

get relaxation solution of root node (in original variables)

Parameters
gcgGCG data structure
rootsolpointer 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()

SCIP_RETCODE createNewSol ( SCIP * scip,
SCIP * subscip,
SCIP_VAR ** subvars,
SCIP_HEUR * heur,
SCIP_SOL * subsol,
SCIP_Bool * success )
static

creates a new solution for the original problem by copying the solution of the subproblem

Parameters
sciporiginal SCIP data structure
subscipSCIP structure of the subproblem
subvarsthe variables of the subproblem
heurDINS heuristic structure
subsolsolution of the subproblem
successused 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()

SCIP_DECL_HEURFREE ( heurFreeGcgdins )
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()

SCIP_DECL_HEURINITSOL ( heurInitsolGcgdins )
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()

SCIP_DECL_HEUREXITSOL ( heurExitsolGcgdins )
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()

◆ GCGincludeHeurGcgdins()