GCG 4.1.1 (dev)

Generic Column Generation

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

Detailed Description

greedy column selection primal heuristic

Author
Christian Puchert

Definition in file heur_greedycolsel.c.

#include <assert.h>
#include "gcg/heur_greedycolsel.h"
#include "gcg/gcg.h"
#include "gcg/pricer_gcg.h"

Go to the source code of this file.

Data Structures

struct  SCIP_HeurData

Macros

#define HEUR_NAME   "greedycolsel"
#define HEUR_DESC   "greedy column selection heuristic"
#define HEUR_DISPCHAR   'e'
#define HEUR_PRIORITY   0
#define HEUR_FREQ   1
#define HEUR_FREQOFS   0
#define HEUR_MAXDEPTH   -1
#define HEUR_TIMING   SCIP_HEURTIMING_DURINGLPLOOP | SCIP_HEURTIMING_DURINGPRICINGLOOP
#define HEUR_USESSUBSCIP   FALSE
#define DEFAULT_MINCOLUMNS   200
#define DEFAULT_USEOBJ   FALSE
#define heurCopyGreedycolsel   NULL
#define heurInitsolGreedycolsel   NULL
#define heurExitsolGreedycolsel   NULL

Functions

static int getViolationChange (SCIP *scip, SCIP_Real *activities, SCIP_VAR *mastervar)
static SCIP_RETCODE getBestMastervar (GCG *gcg, SCIP_SOL *mastersol, SCIP_Real *activities, int *blocknr, SCIP_Bool *ignored, SCIP_Bool useobj, int *index, int *violchange)
static SCIP_RETCODE updateActivities (SCIP *scip, SCIP_Real *activities, SCIP_VAR *mastervar)
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 (heurFreeGreedycolsel)
static SCIP_DECL_HEURINIT (heurInitGreedycolsel)
static SCIP_DECL_HEUREXIT (heurExitGreedycolsel)
static SCIP_DECL_HEUREXEC (heurExecGreedycolsel)
SCIP_RETCODE GCGincludeHeurGreedycolsel (GCG *gcg)

Macro Definition Documentation

◆ HEUR_NAME

#define HEUR_NAME   "greedycolsel"

Definition at line 43 of file heur_greedycolsel.c.

◆ HEUR_DESC

#define HEUR_DESC   "greedy column selection heuristic"

Definition at line 44 of file heur_greedycolsel.c.

◆ HEUR_DISPCHAR

#define HEUR_DISPCHAR   'e'

Definition at line 45 of file heur_greedycolsel.c.

◆ HEUR_PRIORITY

#define HEUR_PRIORITY   0

Definition at line 46 of file heur_greedycolsel.c.

◆ HEUR_FREQ

#define HEUR_FREQ   1

Definition at line 47 of file heur_greedycolsel.c.

◆ HEUR_FREQOFS

#define HEUR_FREQOFS   0

Definition at line 48 of file heur_greedycolsel.c.

◆ HEUR_MAXDEPTH

#define HEUR_MAXDEPTH   -1

Definition at line 49 of file heur_greedycolsel.c.

◆ HEUR_TIMING

Definition at line 51 of file heur_greedycolsel.c.

◆ HEUR_USESSUBSCIP

#define HEUR_USESSUBSCIP   FALSE

Definition at line 52 of file heur_greedycolsel.c.

◆ DEFAULT_MINCOLUMNS

#define DEFAULT_MINCOLUMNS   200

minimum number of columns to regard in the master problem

Definition at line 54 of file heur_greedycolsel.c.

Referenced by GCGincludeHeurGreedycolsel(), and GCGincludeHeurRelaxcolsel().

◆ DEFAULT_USEOBJ

#define DEFAULT_USEOBJ   FALSE

use objective coefficients as tie breakers

Definition at line 55 of file heur_greedycolsel.c.

Referenced by GCGincludeHeurGreedycolsel().

◆ heurCopyGreedycolsel

#define heurCopyGreedycolsel   NULL

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

Definition at line 339 of file heur_greedycolsel.c.

Referenced by GCGincludeHeurGreedycolsel().

◆ heurInitsolGreedycolsel

#define heurInitsolGreedycolsel   NULL

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

Definition at line 418 of file heur_greedycolsel.c.

Referenced by GCGincludeHeurGreedycolsel().

◆ heurExitsolGreedycolsel

#define heurExitsolGreedycolsel   NULL

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

Definition at line 422 of file heur_greedycolsel.c.

Referenced by GCGincludeHeurGreedycolsel().

Function Documentation

◆ getViolationChange()

int getViolationChange ( SCIP * scip,
SCIP_Real * activities,
SCIP_VAR * mastervar )
static

how would the number of violated rows change if mastervar were increased?

Definition at line 88 of file heur_greedycolsel.c.

References activities, assert(), and getViolationChange().

Referenced by getBestMastervar(), and getViolationChange().

◆ getBestMastervar()

SCIP_RETCODE getBestMastervar ( GCG * gcg,
SCIP_SOL * mastersol,
SCIP_Real * activities,
int * blocknr,
SCIP_Bool * ignored,
SCIP_Bool useobj,
int * index,
int * violchange )
static

◆ updateActivities()

SCIP_RETCODE updateActivities ( SCIP * scip,
SCIP_Real * activities,
SCIP_VAR * mastervar )
static

update activities

Definition at line 215 of file heur_greedycolsel.c.

References activities, assert(), and updateActivities().

◆ searchZeroMastervar()

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 267 of file heur_greedycolsel.c.

References GCGmasterVarGetNOrigvars(), GCGmasterVarGetOrigvals(), GCGvarGetBlock(), i, j, mastervars, nmastervars, SCIP_CALL(), and searchZeroMastervar().

Referenced by getZeroMastervar(), getZeroMastervar(), searchZeroMastervar(), and searchZeroMastervar().

◆ getZeroMastervar()

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 313 of file heur_greedycolsel.c.

References getZeroMastervar(), heurdata, SCIP_CALL(), searchZeroMastervar(), and SCIP_HeurData::zerovars.

Referenced by getZeroMastervar(), getZeroMastervar(), SCIP_DECL_HEUREXEC(), and SCIP_DECL_HEUREXEC().

◆ SCIP_DECL_HEURFREE()

SCIP_DECL_HEURFREE ( heurFreeGreedycolsel )
static

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

Definition at line 343 of file heur_greedycolsel.c.

References assert(), and heurdata.

◆ SCIP_DECL_HEURINIT()

SCIP_DECL_HEURINIT ( heurInitGreedycolsel )
static

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

Definition at line 364 of file heur_greedycolsel.c.

References assert(), SCIP_HeurData::gcg, GCGgetNPricingprobs(), heurdata, i, SCIP_HeurData::lastncols, SCIP_HeurData::maxzerovars, SCIP_CALL(), and SCIP_HeurData::zerovars.

◆ SCIP_DECL_HEUREXIT()

SCIP_DECL_HEUREXIT ( heurExitGreedycolsel )
static

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

Definition at line 399 of file heur_greedycolsel.c.

References assert(), heurdata, SCIP_HeurData::maxzerovars, and SCIP_HeurData::zerovars.

◆ SCIP_DECL_HEUREXEC()

◆ GCGincludeHeurGreedycolsel()