GCG 4.1.1 (dev)

Generic Column Generation

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

Detailed Description

LNS heuristic that combines the incumbent with the LP optimum.

Author
Timo Berthold
Christian Puchert

Definition in file heur_gcgrins.c.

#include <assert.h>
#include <string.h>
#include "gcg/heur_gcgrins.h"
#include "gcg/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   "gcgrins"
#define HEUR_DESC   "relaxation induced neighborhood search by Danna, Rothberg, and Le Pape"
#define HEUR_DISPCHAR   'N'
#define HEUR_PRIORITY   -1101000
#define HEUR_FREQ   20
#define HEUR_FREQOFS   5
#define HEUR_MAXDEPTH   -1
#define HEUR_TIMING   SCIP_HEURTIMING_AFTERNODE
#define HEUR_USESSUBSCIP   TRUE
#define DEFAULT_NODESOFS   500
#define DEFAULT_MAXNODES   5000
#define DEFAULT_MINNODES   500
#define DEFAULT_MINIMPROVE   0.01
#define DEFAULT_MINFIXINGRATE   0.0
#define DEFAULT_NODESQUOT   0.1
#define DEFAULT_NWAITINGNODES   200
#define DEFAULT_USELPROWS   FALSE
#define DEFAULT_COPYCUTS   TRUE

Functions

static SCIP_RETCODE createSubproblem (SCIP *scip, SCIP *subscip, SCIP_VAR **subvars, SCIP_Real minfixingrate, SCIP_Bool uselprows, SCIP_Real *intfixingrate, SCIP_Real *zerofixingrate, SCIP_Bool *success)
static SCIP_RETCODE createNewSol (SCIP *scip, SCIP *subscip, SCIP_VAR **subvars, SCIP_HEUR *heur, SCIP_SOL *subsol, SCIP_Bool *success)
static SCIP_DECL_HEURFREE (heurFreeGcgrins)
static SCIP_DECL_HEURINIT (heurInitGcgrins)
static SCIP_DECL_HEUREXEC (heurExecGcgrins)
SCIP_RETCODE GCGincludeHeurGcgrins (GCG *gcg)

Macro Definition Documentation

◆ HEUR_NAME

#define HEUR_NAME   "gcgrins"

Definition at line 46 of file heur_gcgrins.c.

◆ HEUR_DESC

#define HEUR_DESC   "relaxation induced neighborhood search by Danna, Rothberg, and Le Pape"

Definition at line 47 of file heur_gcgrins.c.

◆ HEUR_DISPCHAR

#define HEUR_DISPCHAR   'N'

Definition at line 48 of file heur_gcgrins.c.

◆ HEUR_PRIORITY

#define HEUR_PRIORITY   -1101000

Definition at line 49 of file heur_gcgrins.c.

◆ HEUR_FREQ

#define HEUR_FREQ   20

Definition at line 50 of file heur_gcgrins.c.

◆ HEUR_FREQOFS

#define HEUR_FREQOFS   5

Definition at line 51 of file heur_gcgrins.c.

◆ HEUR_MAXDEPTH

#define HEUR_MAXDEPTH   -1

Definition at line 52 of file heur_gcgrins.c.

◆ HEUR_TIMING

#define HEUR_TIMING   SCIP_HEURTIMING_AFTERNODE

Definition at line 53 of file heur_gcgrins.c.

◆ HEUR_USESSUBSCIP

#define HEUR_USESSUBSCIP   TRUE

does the heuristic use a secondary SCIP instance?

Definition at line 54 of file heur_gcgrins.c.

◆ DEFAULT_NODESOFS

#define DEFAULT_NODESOFS   500

number of nodes added to the contingent of the total nodes

Definition at line 56 of file heur_gcgrins.c.

◆ DEFAULT_MAXNODES

#define DEFAULT_MAXNODES   5000

maximum number of nodes to regard in the subproblem

Definition at line 57 of file heur_gcgrins.c.

◆ DEFAULT_MINNODES

#define DEFAULT_MINNODES   500

minimum number of nodes to regard in the subproblem

Definition at line 58 of file heur_gcgrins.c.

◆ DEFAULT_MINIMPROVE

#define DEFAULT_MINIMPROVE   0.01

factor by which RINS should at least improve the incumbent

Definition at line 59 of file heur_gcgrins.c.

◆ DEFAULT_MINFIXINGRATE

#define DEFAULT_MINFIXINGRATE   0.0

minimum percentage of integer variables that have to be fixed

Definition at line 60 of file heur_gcgrins.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_gcgrins.c.

◆ DEFAULT_NWAITINGNODES

#define DEFAULT_NWAITINGNODES   200

number of nodes without incumbent change that heuristic should wait

Definition at line 62 of file heur_gcgrins.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_gcgrins.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_gcgrins.c.

Function Documentation

◆ createSubproblem()

SCIP_RETCODE createSubproblem ( SCIP * scip,
SCIP * subscip,
SCIP_VAR ** subvars,
SCIP_Real minfixingrate,
SCIP_Bool uselprows,
SCIP_Real * intfixingrate,
SCIP_Real * zerofixingrate,
SCIP_Bool * success )
static

creates a subproblem for subscip by fixing a number of variables

Parameters
sciporiginal SCIP data structure
subscipSCIP data structure for the subproblem
subvarsthe variables of the subproblem
minfixingratepercentage of integer variables that have to be fixed
uselprowsshould subproblem be created out of the rows in the LP rows?
intfixingratepercentage of integers that get actually fixed
zerofixingratepercentage of variables fixed to zero
successpointer to store whether the problem was created successfully

Definition at line 108 of file heur_gcgrins.c.

References assert(), createSubproblem(), i, j, nbinvars, nintvars, nvars, SCIP_CALL(), SCIPfreeBufferArray(), solval, success, and vars.

◆ 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
heurRINS heuristic structure
subsolsolution of the subproblem
successused to store whether new solution was found or not

Definition at line 245 of file heur_gcgrins.c.

References assert(), createNewSol(), heurdata, nvars, SCIP_CALL(), SCIPfreeBufferArray(), success, and vars.

◆ SCIP_DECL_HEURFREE()

SCIP_DECL_HEURFREE ( heurFreeGcgrins )
static

destructor of primal heuristic to free user data (called when SCIP is exiting)

Definition at line 313 of file heur_gcgrins.c.

References assert(), heurdata, and SCIPfreeMemory().

◆ SCIP_DECL_HEURINIT()

SCIP_DECL_HEURINIT ( heurInitGcgrins )
static

initialization method of primal heuristic (called after problem was transformed)

Definition at line 334 of file heur_gcgrins.c.

References assert(), heurdata, and SCIP_HeurData::usednodes.

◆ SCIP_DECL_HEUREXEC()

◆ GCGincludeHeurGcgrins()