GCG 4.1.1 (dev)

Generic Column Generation

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

Detailed Description

master LP diving heuristic that rounds variables with long column vectors

Author
Tobias Achterberg
Christian Puchert

Definition in file heur_mastervecldiving.c.

#include <assert.h>
#include <string.h>
#include "gcg/heur_mastervecldiving.h"
#include "gcg/heur_masterdiving.h"

Go to the source code of this file.

Macros

#define HEUR_NAME   "mastervecldiving"
#define HEUR_DESC   "master LP diving heuristic that rounds variables with long column vectors"
#define HEUR_DISPCHAR   'v'
#define HEUR_PRIORITY   -1003100
#define HEUR_FREQ   10
#define HEUR_FREQOFS   4
#define HEUR_MAXDEPTH   -1

Functions

 assert (masterprob !=NULL)
 assert (heur !=NULL)
 assert (bestcand !=NULL)
 assert (bestcandmayround !=NULL)
 SCIP_CALL (SCIPgetLPBranchCands(masterprob, &lpcands, &lpcandssol, &lpcandsfrac, &nlpcands, NULL, NULL))
 assert (lpcands !=NULL)
 assert (lpcandsfrac !=NULL)
 assert (lpcandssol !=NULL)
 for (c=0;c< nlpcands;++c)
SCIP_RETCODE GCGincludeHeurMastervecldiving (GCG *gcg)

Variables

static SCIP_Real * lpcandssol
SCIP_Real * lpcandsfrac
int nlpcands
SCIP_Real bestscore = SCIP_REAL_MAX
int c
SCIP * masterprob = GCGgetMasterprob(gcg)
* bestcandmayround = TRUE
return SCIP_OKAY

Macro Definition Documentation

◆ HEUR_NAME

#define HEUR_NAME   "mastervecldiving"

Definition at line 44 of file heur_mastervecldiving.c.

◆ HEUR_DESC

#define HEUR_DESC   "master LP diving heuristic that rounds variables with long column vectors"

Definition at line 45 of file heur_mastervecldiving.c.

◆ HEUR_DISPCHAR

#define HEUR_DISPCHAR   'v'

Definition at line 46 of file heur_mastervecldiving.c.

◆ HEUR_PRIORITY

#define HEUR_PRIORITY   -1003100

Definition at line 47 of file heur_mastervecldiving.c.

◆ HEUR_FREQ

#define HEUR_FREQ   10

Definition at line 48 of file heur_mastervecldiving.c.

◆ HEUR_FREQOFS

#define HEUR_FREQOFS   4

Definition at line 49 of file heur_mastervecldiving.c.

◆ HEUR_MAXDEPTH

#define HEUR_MAXDEPTH   -1

Definition at line 50 of file heur_mastervecldiving.c.

Function Documentation

◆ assert() [1/7]

assert ( masterprob ! = NULL)

References assert(), and masterprob.

◆ assert() [2/7]

assert ( heur ! = NULL)

References assert().

◆ assert() [3/7]

assert ( bestcand ! = NULL)

References assert().

◆ assert() [4/7]

assert ( bestcandmayround ! = NULL)

References assert(), and bestcandmayround.

◆ SCIP_CALL()

◆ assert() [5/7]

assert ( lpcands ! = NULL)

References assert(), and lpcands.

◆ assert() [6/7]

assert ( lpcandsfrac ! = NULL)

References assert(), and lpcandsfrac.

◆ assert() [7/7]

assert ( lpcandssol ! = NULL)

References assert(), and lpcandssol.

◆ for()

for ( )

◆ GCGincludeHeurMastervecldiving()

SCIP_RETCODE GCGincludeHeurMastervecldiving ( GCG * gcg)

creates the mastervecldiving heuristic and includes it in GCG

Parameters
gcgGCG data structure

Definition at line 149 of file heur_mastervecldiving.c.

References assert(), GCGincludeDivingHeurMaster(), GCGincludeHeurMastervecldiving(), HEUR_DESC, HEUR_DISPCHAR, HEUR_FREQ, HEUR_FREQOFS, HEUR_MAXDEPTH, HEUR_NAME, HEUR_PRIORITY, and SCIP_CALL().

Referenced by GCGincludeHeurMastervecldiving(), and GCGincludeMasterPlugins().

Variable Documentation

◆ lpcandssol

SCIP_Real* lpcandssol
Initial value:
{
static SCIP_VAR ** lpcands
struct SCIP_Var SCIP_VAR

variable selection method of diving heuristic; finds best candidate variable w.r.t. vector length:

  • round variables in direction where objective value gets worse; for zero objective coefficient, round upwards
  • round variable with least objective value deficit per row the variable appears in (we want to "fix" as many rows as possible with the least damage to the objective function)

Definition at line 68 of file heur_mastervecldiving.c.

◆ lpcandsfrac

SCIP_Real* lpcandsfrac

Definition at line 69 of file heur_mastervecldiving.c.

◆ nlpcands

int nlpcands

Definition at line 70 of file heur_mastervecldiving.c.

◆ bestscore

bestscore = SCIP_REAL_MAX

Definition at line 71 of file heur_mastervecldiving.c.

◆ c

int c

Definition at line 72 of file heur_mastervecldiving.c.

◆ masterprob

SCIP* masterprob = GCGgetMasterprob(gcg)

Definition at line 73 of file heur_mastervecldiving.c.

◆ bestcandmayround

* bestcandmayround = TRUE

Definition at line 87 of file heur_mastervecldiving.c.

◆ SCIP_OKAY

return SCIP_OKAY

Definition at line 140 of file heur_mastervecldiving.c.