GCG 4.1.1 (dev)

Generic Column Generation

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

Detailed Description

master LP diving heuristic that chooses fixings w.r.t. the fractionalities

Author
Tobias Achterberg
Christian Puchert

Definition in file heur_masterfracdiving.c.

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

Go to the source code of this file.

Macros

#define HEUR_NAME   "masterfracdiving"
#define HEUR_DESC   "master LP diving heuristic that chooses fixings w.r.t. the fractionalities"
#define HEUR_DISPCHAR   'f'
#define HEUR_PRIORITY   -1003000
#define HEUR_FREQ   10
#define HEUR_FREQOFS   3
#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 GCGincludeHeurMasterfracdiving (GCG *gcg)

Variables

static SCIP_Real * lpcandssol
SCIP_Real * lpcandsfrac
int nlpcands
SCIP_Real bestobjgain = SCIPinfinity(masterprob)
SCIP_Real bestfrac = SCIP_INVALID
SCIP_Bool bestcandmayrounddown = TRUE
SCIP_Bool bestcandmayroundup = TRUE
int c
SCIP * masterprob = GCGgetMasterprob(gcg)
* bestcandmayround = bestcandmayroundup || bestcandmayrounddown
return SCIP_OKAY

Macro Definition Documentation

◆ HEUR_NAME

#define HEUR_NAME   "masterfracdiving"

Definition at line 44 of file heur_masterfracdiving.c.

◆ HEUR_DESC

#define HEUR_DESC   "master LP diving heuristic that chooses fixings w.r.t. the fractionalities"

Definition at line 45 of file heur_masterfracdiving.c.

◆ HEUR_DISPCHAR

#define HEUR_DISPCHAR   'f'

Definition at line 46 of file heur_masterfracdiving.c.

◆ HEUR_PRIORITY

#define HEUR_PRIORITY   -1003000

Definition at line 47 of file heur_masterfracdiving.c.

◆ HEUR_FREQ

#define HEUR_FREQ   10

Definition at line 48 of file heur_masterfracdiving.c.

◆ HEUR_FREQOFS

#define HEUR_FREQOFS   3

Definition at line 49 of file heur_masterfracdiving.c.

◆ HEUR_MAXDEPTH

#define HEUR_MAXDEPTH   -1

Definition at line 50 of file heur_masterfracdiving.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]

◆ for()

◆ GCGincludeHeurMasterfracdiving()

SCIP_RETCODE GCGincludeHeurMasterfracdiving ( GCG * gcg)

creates the masterfracdiving heuristic and includes it in GCG

Parameters
gcgGCG data structure

Definition at line 181 of file heur_masterfracdiving.c.

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

Referenced by GCGincludeHeurMasterfracdiving(), 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. fractionality:

  • prefer variables that may not be rounded without destroying LP feasibility:
    • of these variables, round least fractional variable in corresponding direction
  • if all remaining fractional variables may be rounded without destroying LP feasibility:
    • round variable with least increasing objective value
  • binary variables are preferred

Definition at line 69 of file heur_masterfracdiving.c.

◆ lpcandsfrac

SCIP_Real* lpcandsfrac

Definition at line 70 of file heur_masterfracdiving.c.

◆ nlpcands

int nlpcands

Definition at line 71 of file heur_masterfracdiving.c.

◆ bestobjgain

bestobjgain = SCIPinfinity(masterprob)

Definition at line 72 of file heur_masterfracdiving.c.

◆ bestfrac

bestfrac = SCIP_INVALID

Definition at line 73 of file heur_masterfracdiving.c.

◆ bestcandmayrounddown

bestcandmayrounddown = TRUE

Definition at line 74 of file heur_masterfracdiving.c.

◆ bestcandmayroundup

bestcandmayroundup = TRUE

Definition at line 75 of file heur_masterfracdiving.c.

◆ c

int c

Definition at line 76 of file heur_masterfracdiving.c.

◆ masterprob

SCIP* masterprob = GCGgetMasterprob(gcg)

Definition at line 77 of file heur_masterfracdiving.c.

◆ bestcandmayround

* bestcandmayround = bestcandmayroundup || bestcandmayrounddown

Definition at line 170 of file heur_masterfracdiving.c.

◆ SCIP_OKAY

return SCIP_OKAY

Definition at line 172 of file heur_masterfracdiving.c.