Scippy

GCG

Branch-and-Price & Column Generation for Everyone

heur_relaxcolsel.c File Reference

Detailed Description

relaxation based column selection primal heuristic

Author
Christian Puchert

Definition in file heur_relaxcolsel.c.

#include <assert.h>
#include "heur_relaxcolsel.h"
#include "gcg.h"
#include "pricer_gcg.h"

Go to the source code of this file.

Data Structures

struct  SCIP_HeurData
 

Macros

#define HEUR_NAME   "relaxcolsel"
 
#define HEUR_DESC   "column selection heuristic that tries to round a master LP solution in promising directions"
 
#define HEUR_DISPCHAR   'x'
 
#define HEUR_PRIORITY   -100
 
#define HEUR_FREQ   1
 
#define HEUR_FREQOFS   0
 
#define HEUR_MAXDEPTH   -1
 
#define HEUR_TIMING   SCIP_HEURTIMING_AFTERLPNODE
 
#define HEUR_USESSUBSCIP   FALSE
 
#define DEFAULT_MINCOLUMNS   200
 
#define heurCopyRelaxcolsel   NULL
 
#define heurInitsolRelaxcolsel   NULL
 
#define heurExitsolRelaxcolsel   NULL
 

Functions

static SCIP_RETCODE initializeStartsol (SCIP *scip, SCIP_SOL *mastersol, SCIP_SOL *origsol, int *blocknr, int *mastercands, SCIP_Real *candfracs, int *nmastercands, SCIP_Bool *success)
 
static SCIP_RETCODE searchZeroMastervar (SCIP *scip, int block, SCIP_VAR **zeromastervar)
 
static SCIP_RETCODE getZeroMastervar (SCIP *scip, SCIP_HEURDATA *heurdata, int block, SCIP_VAR **zeromastervar)
 
static SCIP_DECL_HEURFREE (heurFreeRelaxcolsel)
 
static SCIP_DECL_HEURINIT (heurInitRelaxcolsel)
 
static SCIP_DECL_HEUREXIT (heurExitRelaxcolsel)
 
static SCIP_DECL_HEUREXEC (heurExecRelaxcolsel)
 
SCIP_RETCODE SCIPincludeHeurRelaxcolsel (SCIP *scip)
 

Macro Definition Documentation

◆ HEUR_NAME

#define HEUR_NAME   "relaxcolsel"

Definition at line 42 of file heur_relaxcolsel.c.

◆ HEUR_DESC

#define HEUR_DESC   "column selection heuristic that tries to round a master LP solution in promising directions"

Definition at line 43 of file heur_relaxcolsel.c.

◆ HEUR_DISPCHAR

#define HEUR_DISPCHAR   'x'

Definition at line 44 of file heur_relaxcolsel.c.

◆ HEUR_PRIORITY

#define HEUR_PRIORITY   -100

Definition at line 45 of file heur_relaxcolsel.c.

◆ HEUR_FREQ

#define HEUR_FREQ   1

Definition at line 46 of file heur_relaxcolsel.c.

◆ HEUR_FREQOFS

#define HEUR_FREQOFS   0

Definition at line 47 of file heur_relaxcolsel.c.

◆ HEUR_MAXDEPTH

#define HEUR_MAXDEPTH   -1

Definition at line 48 of file heur_relaxcolsel.c.

◆ HEUR_TIMING

#define HEUR_TIMING   SCIP_HEURTIMING_AFTERLPNODE

Definition at line 49 of file heur_relaxcolsel.c.

◆ HEUR_USESSUBSCIP

#define HEUR_USESSUBSCIP   FALSE

Definition at line 50 of file heur_relaxcolsel.c.

◆ DEFAULT_MINCOLUMNS

#define DEFAULT_MINCOLUMNS   200

minimum number of columns to regard in the master problem

Definition at line 52 of file heur_relaxcolsel.c.

◆ heurCopyRelaxcolsel

#define heurCopyRelaxcolsel   NULL

copy method for primal heuristic plugins (called when SCIP copies plugins)

Definition at line 450 of file heur_relaxcolsel.c.

◆ heurInitsolRelaxcolsel

#define heurInitsolRelaxcolsel   NULL

solving process initialization method of primal heuristic (called when branch and bound process is about to begin)

Definition at line 534 of file heur_relaxcolsel.c.

◆ heurExitsolRelaxcolsel

#define heurExitsolRelaxcolsel   NULL

solving process deinitialization method of primal heuristic (called before branch and bound process data is freed)

Definition at line 538 of file heur_relaxcolsel.c.

Function Documentation

◆ initializeStartsol()

static SCIP_RETCODE initializeStartsol ( SCIP *  scip,
SCIP_SOL *  mastersol,
SCIP_SOL *  origsol,
int *  blocknr,
int *  mastercands,
SCIP_Real *  candfracs,
int *  nmastercands,
SCIP_Bool *  success 
)
static

◆ searchZeroMastervar()

static SCIP_RETCODE searchZeroMastervar ( SCIP *  scip,
int  block,
SCIP_VAR **  zeromastervar 
)
static

for a given block, search if there is a master variable corresponding to the zero solution;

Definition at line 373 of file heur_relaxcolsel.c.

References GCGmasterVarGetNOrigvars(), GCGmasterVarGetOrigvals(), and GCGvarGetBlock().

Referenced by getZeroMastervar().

◆ getZeroMastervar()

static SCIP_RETCODE getZeroMastervar ( SCIP *  scip,
SCIP_HEURDATA *  heurdata,
int  block,
SCIP_VAR **  zeromastervar 
)
static

for a given block, return the master variable corresponding to the zero solution, or NULL is there is no such variable available

Definition at line 425 of file heur_relaxcolsel.c.

References searchZeroMastervar().

Referenced by SCIP_DECL_HEUREXEC().

◆ SCIP_DECL_HEURFREE()

static SCIP_DECL_HEURFREE ( heurFreeRelaxcolsel  )
static

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

Definition at line 454 of file heur_relaxcolsel.c.

◆ SCIP_DECL_HEURINIT()

static SCIP_DECL_HEURINIT ( heurInitRelaxcolsel  )
static

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

Definition at line 475 of file heur_relaxcolsel.c.

References GCGgetNPricingprobs(), and GCGmasterGetOrigprob().

◆ SCIP_DECL_HEUREXIT()

static SCIP_DECL_HEUREXIT ( heurExitRelaxcolsel  )
static

deinitialization method of primal heuristic (called before transformed problem is freed)

Definition at line 515 of file heur_relaxcolsel.c.

◆ SCIP_DECL_HEUREXEC()

◆ SCIPincludeHeurRelaxcolsel()

SCIP_RETCODE SCIPincludeHeurRelaxcolsel ( SCIP *  scip)

creates the relaxation based column selection primal heuristic and includes it in SCIP

Parameters
scipSCIP data structure

Definition at line 970 of file heur_relaxcolsel.c.

References DEFAULT_MINCOLUMNS, HEUR_DESC, HEUR_DISPCHAR, HEUR_FREQ, HEUR_FREQOFS, HEUR_MAXDEPTH, HEUR_NAME, HEUR_PRIORITY, HEUR_TIMING, HEUR_USESSUBSCIP, heurCopyRelaxcolsel, heurExitsolRelaxcolsel, and heurInitsolRelaxcolsel.

Referenced by GCGincludeMasterPlugins().