Scippy

GCG

Branch-and-Price & Column Generation for Everyone

heur_gcglinesdiving.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_gcglinesdiving.c.

#include <assert.h>
#include <string.h>
#include "heur_gcglinesdiving.h"
#include "heur_origdiving.h"
#include "gcg.h"

Go to the source code of this file.

Data Structures

struct  GCG_DivingData
 

Macros

#define HEUR_NAME   "gcglinesdiving"
 
#define HEUR_DESC   "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

static SCIP_RETCODE getRootRelaxSol (SCIP *scip, SCIP_SOL **rootsol)
 
static GCG_DECL_DIVINGFREE (heurFreeGcglinesdiving)
 
static GCG_DECL_DIVINGINIT (heurInitGcglinesdiving)
 
static GCG_DECL_DIVINGEXIT (heurExitGcglinesdiving)
 
static GCG_DECL_DIVINGINITEXEC (heurInitexecGcglinesdiving)
 
static GCG_DECL_DIVINGSELECTVAR (heurSelectVarGcglinesdiving)
 
SCIP_RETCODE GCGincludeHeurGcglinesdiving (SCIP *scip)
 

Macro Definition Documentation

◆ HEUR_NAME

#define HEUR_NAME   "gcglinesdiving"

Definition at line 44 of file heur_gcglinesdiving.c.

◆ HEUR_DESC

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

Definition at line 45 of file heur_gcglinesdiving.c.

◆ HEUR_DISPCHAR

#define HEUR_DISPCHAR   'l'

Definition at line 46 of file heur_gcglinesdiving.c.

◆ HEUR_PRIORITY

#define HEUR_PRIORITY   -1006000

Definition at line 47 of file heur_gcglinesdiving.c.

◆ HEUR_FREQ

#define HEUR_FREQ   10

Definition at line 48 of file heur_gcglinesdiving.c.

◆ HEUR_FREQOFS

#define HEUR_FREQOFS   6

Definition at line 49 of file heur_gcglinesdiving.c.

◆ HEUR_MAXDEPTH

#define HEUR_MAXDEPTH   -1

Definition at line 50 of file heur_gcglinesdiving.c.

Function Documentation

◆ getRootRelaxSol()

static SCIP_RETCODE getRootRelaxSol ( SCIP *  scip,
SCIP_SOL **  rootsol 
)
static

get relaxation solution of root node (in original variables)

Parameters
scipSCIP data structure
rootsolpointer to store root relaxation solution

Definition at line 73 of file heur_gcglinesdiving.c.

References GCGgetMasterprob(), and GCGtransformMastersolToOrigsol().

Referenced by GCG_DECL_DIVINGINITEXEC().

◆ GCG_DECL_DIVINGFREE()

static GCG_DECL_DIVINGFREE ( heurFreeGcglinesdiving  )
static

destructor of diving heuristic to free user data (called when GCG is exiting)

Definition at line 116 of file heur_gcglinesdiving.c.

References GCGheurGetDivingDataOrig(), and GCGheurSetDivingDataOrig().

◆ GCG_DECL_DIVINGINIT()

static GCG_DECL_DIVINGINIT ( heurInitGcglinesdiving  )
static

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

Definition at line 135 of file heur_gcglinesdiving.c.

References GCG_DivingData::firstrun, GCGheurGetDivingDataOrig(), and GCG_DivingData::rootsol.

◆ GCG_DECL_DIVINGEXIT()

static GCG_DECL_DIVINGEXIT ( heurExitGcglinesdiving  )
static

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

Definition at line 155 of file heur_gcglinesdiving.c.

References GCG_DivingData::firstrun, GCGheurGetDivingDataOrig(), and GCG_DivingData::rootsol.

◆ GCG_DECL_DIVINGINITEXEC()

static GCG_DECL_DIVINGINITEXEC ( heurInitexecGcglinesdiving  )
static

execution initialization method of diving heuristic (called when execution of diving heuristic is about to begin)

Definition at line 177 of file heur_gcglinesdiving.c.

References GCG_DivingData::firstrun, GCGheurGetDivingDataOrig(), getRootRelaxSol(), and GCG_DivingData::rootsol.

◆ GCG_DECL_DIVINGSELECTVAR()

static GCG_DECL_DIVINGSELECTVAR ( heurSelectVarGcglinesdiving  )
static

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 207 of file heur_gcglinesdiving.c.

References GCGheurGetDivingDataOrig(), and GCG_DivingData::rootsol.

◆ GCGincludeHeurGcglinesdiving()

SCIP_RETCODE GCGincludeHeurGcglinesdiving ( SCIP *  scip)

creates the gcglinesdiving heuristic and includes it in GCG

Parameters
scipSCIP data structure

Definition at line 303 of file heur_gcglinesdiving.c.

References GCGincludeDivingHeurOrig(), HEUR_DESC, HEUR_DISPCHAR, HEUR_FREQ, HEUR_FREQOFS, HEUR_MAXDEPTH, HEUR_NAME, and HEUR_PRIORITY.

Referenced by SCIPincludeGcgPlugins().