GCG 4.1.1 (dev)

Generic Column Generation

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

Detailed Description

LP diving heuristic that fixes variables with a large difference to their root solution.

Author
Tobias Achterberg
Christian Puchert

Definition in file heur_masterlinesdiving.c.

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

Go to the source code of this file.

Macros

#define HEUR_NAME   "masterlinesdiving"
#define HEUR_DESC   "master LP diving heuristic that chooses fixings following the line from root solution to current solution"
#define HEUR_DISPCHAR   'l'
#define HEUR_PRIORITY   -1006000
#define HEUR_FREQ   10
#define HEUR_FREQOFS   6
#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 GCGincludeHeurMasterlinesdiving (GCG *gcg)

Variables

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

Macro Definition Documentation

◆ HEUR_NAME

#define HEUR_NAME   "masterlinesdiving"

Definition at line 44 of file heur_masterlinesdiving.c.

◆ HEUR_DESC

#define HEUR_DESC   "master LP diving heuristic that chooses fixings following the line from root solution to current solution"

Definition at line 45 of file heur_masterlinesdiving.c.

◆ HEUR_DISPCHAR

#define HEUR_DISPCHAR   'l'

Definition at line 46 of file heur_masterlinesdiving.c.

◆ HEUR_PRIORITY

#define HEUR_PRIORITY   -1006000

Definition at line 47 of file heur_masterlinesdiving.c.

◆ HEUR_FREQ

#define HEUR_FREQ   10

Definition at line 48 of file heur_masterlinesdiving.c.

◆ HEUR_FREQOFS

#define HEUR_FREQOFS   6

Definition at line 49 of file heur_masterlinesdiving.c.

◆ HEUR_MAXDEPTH

#define HEUR_MAXDEPTH   -1

Definition at line 50 of file heur_masterlinesdiving.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 ( )

◆ GCGincludeHeurMasterlinesdiving()

SCIP_RETCODE GCGincludeHeurMasterlinesdiving ( GCG * gcg)

creates the masterlinesdiving heuristic and includes it in GCG

creates the masterlinesdiving primal heuristic and includes it in GCG

Parameters
gcgGCG data structure

Definition at line 141 of file heur_masterlinesdiving.c.

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

Referenced by GCGincludeHeurMasterlinesdiving(), 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. the root LP solution:

  • in the projected space of fractional variables, extend the line segment connecting the root solution and the current LP solution up to the point, where one of the fractional variables becomes integral
  • round this variable to the integral value

Definition at line 67 of file heur_masterlinesdiving.c.

◆ lpcandsfrac

SCIP_Real* lpcandsfrac

Definition at line 68 of file heur_masterlinesdiving.c.

◆ nlpcands

int nlpcands

Definition at line 69 of file heur_masterlinesdiving.c.

◆ bestdistquot

bestdistquot = SCIPinfinity(masterprob)

Definition at line 70 of file heur_masterlinesdiving.c.

◆ c

int c

Definition at line 71 of file heur_masterlinesdiving.c.

◆ masterprob

SCIP* masterprob = GCGgetMasterprob(gcg)

Definition at line 72 of file heur_masterlinesdiving.c.

◆ bestcandmayround

* bestcandmayround = TRUE

Definition at line 86 of file heur_masterlinesdiving.c.

◆ SCIP_OKAY

return SCIP_OKAY

Definition at line 132 of file heur_masterlinesdiving.c.