GCG 4.1.1 (dev)

Generic Column Generation

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

Detailed Description

simple and fast LP rounding heuristic

Author
Tobias Achterberg
Christian Puchert

Definition in file heur_gcgsimplerounding.c.

#include <assert.h>
#include <string.h>
#include "gcg/heur_gcgsimplerounding.h"
#include "gcg/gcg.h"

Go to the source code of this file.

Data Structures

struct  SCIP_HeurData

Macros

#define HEUR_NAME   "gcgsimplerounding"
#define HEUR_DESC   "simple and fast LP rounding heuristic on original variables"
#define HEUR_DISPCHAR   'r'
#define HEUR_PRIORITY   0
#define HEUR_FREQ   1
#define HEUR_FREQOFS   0
#define HEUR_MAXDEPTH   -1
#define HEUR_TIMING   SCIP_HEURTIMING_AFTERNODE
#define HEUR_USESSUBSCIP   FALSE
#define heurCopyGcgsimplerounding   NULL
#define heurExitsolGcgsimplerounding   NULL

Functions

static assert (strcmp(SCIPheurGetName(heur), HEUR_NAME)==0)
 assert (heurdata !=NULL)
 SCIPfreeMemory (scip, &heurdata)
 SCIP_CALL (SCIPcreateSol(scip, &heurdata->sol, heur))
 SCIP_CALL (SCIPfreeSol(scip, &heurdata->sol))
static SCIP_DECL_HEURINITSOL (heurInitsolGcgsimplerounding)
 assert (result !=NULL)
 assert (masterprob !=NULL)
 if (!SCIPisRelaxSolValid(scip))
 if (SCIPgetStage(masterprob), SCIP_STAGE_SOLVING||SCIPgetLPSolstat(masterprob) !=SCIP_LPSOLSTAT_OPTIMAL)
 if (heurdata->nroundablevars==0) return SCIP_OKAY
 if (heurdata->lastlp=nlps==heurdata->lastlp)
 if (c==nlpcands)
SCIP_RETCODE GCGincludeHeurGcgsimplerounding (GCG *gcg)

Variables

 heurdata = SCIPheurGetData(heur)
return SCIP_OKAY
heurdata lastlp = -1
heurdata nroundablevars = -1
SCIP_SOL * sol
SCIP_VAR ** lpcands
SCIP_Real * lpcandssol
SCIP_Longint nlps = SCIPgetNLPs(masterprob)
int nlpcands
int c
 masterprob = GCGgetMasterprob(heurdata->gcg)
* result = SCIP_DIDNOTRUN

Macro Definition Documentation

◆ HEUR_NAME

#define HEUR_NAME   "gcgsimplerounding"

Definition at line 44 of file heur_gcgsimplerounding.c.

◆ HEUR_DESC

#define HEUR_DESC   "simple and fast LP rounding heuristic on original variables"

Definition at line 45 of file heur_gcgsimplerounding.c.

◆ HEUR_DISPCHAR

#define HEUR_DISPCHAR   'r'

Definition at line 46 of file heur_gcgsimplerounding.c.

◆ HEUR_PRIORITY

#define HEUR_PRIORITY   0

Definition at line 47 of file heur_gcgsimplerounding.c.

◆ HEUR_FREQ

#define HEUR_FREQ   1

Definition at line 48 of file heur_gcgsimplerounding.c.

◆ HEUR_FREQOFS

#define HEUR_FREQOFS   0

Definition at line 49 of file heur_gcgsimplerounding.c.

◆ HEUR_MAXDEPTH

#define HEUR_MAXDEPTH   -1

Definition at line 50 of file heur_gcgsimplerounding.c.

◆ HEUR_TIMING

#define HEUR_TIMING   SCIP_HEURTIMING_AFTERNODE

Definition at line 51 of file heur_gcgsimplerounding.c.

◆ HEUR_USESSUBSCIP

#define HEUR_USESSUBSCIP   FALSE

Definition at line 52 of file heur_gcgsimplerounding.c.

◆ heurCopyGcgsimplerounding

#define heurCopyGcgsimplerounding   NULL

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

Definition at line 72 of file heur_gcgsimplerounding.c.

Referenced by GCGincludeHeurGcgsimplerounding().

◆ heurExitsolGcgsimplerounding

#define heurExitsolGcgsimplerounding   NULL

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

Definition at line 145 of file heur_gcgsimplerounding.c.

Referenced by GCGincludeHeurGcgsimplerounding().

Function Documentation

◆ assert() [1/4]

assert ( strcmp(SCIPheurGetName(heur), HEUR_NAME) = =0)

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

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

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

References assert(), and HEUR_NAME.

◆ assert() [2/4]

assert ( heurdata ! = NULL)

References assert(), and heurdata.

◆ SCIPfreeMemory()

SCIPfreeMemory ( scip ,
& heurdata )

References heurdata, and SCIPfreeMemory().

◆ SCIP_CALL() [1/2]

SCIP_CALL ( SCIPcreateSol(scip, &heurdata->sol, heur) )

References heurdata, and SCIP_CALL().

◆ SCIP_CALL() [2/2]

SCIP_CALL ( SCIPfreeSol(scip, &heurdata->sol) )

References heurdata, and SCIP_CALL().

◆ SCIP_DECL_HEURINITSOL()

SCIP_DECL_HEURINITSOL ( heurInitsolGcgsimplerounding )
static

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

Definition at line 130 of file heur_gcgsimplerounding.c.

References assert(), HEUR_NAME, heurdata, and SCIP_HeurData::lastlp.

◆ assert() [3/4]

assert ( result ! = NULL)

References assert(), heurdata, and result.

◆ assert() [4/4]

assert ( masterprob ! = NULL)

References assert(), and masterprob.

◆ if() [1/5]

if ( ! SCIPisRelaxSolValidscip)

Definition at line 177 of file heur_gcgsimplerounding.c.

References SCIPdebugMessage().

◆ if() [2/5]

◆ if() [3/5]

if ( heurdata-> nroundablevars = =0)

Definition at line 877 of file heur_gcgfeaspump.c.

References closestsol, heurdata, and SCIP_CALL().

◆ if() [4/5]

◆ if() [5/5]

if ( c = = nlpcands)

Definition at line 277 of file heur_gcgsimplerounding.c.

References c, nlpcands, result, SCIP_CALL(), SCIPdebugMessage(), and sol.

◆ GCGincludeHeurGcgsimplerounding()

Variable Documentation

◆ heurdata

heurdata = SCIPheurGetData(heur)

execution method of primal heuristic

Definition at line 82 of file heur_gcgsimplerounding.c.

◆ SCIP_OKAY

return SCIP_OKAY

Definition at line 87 of file heur_gcgsimplerounding.c.

◆ lastlp

heurdata lastlp = -1

Definition at line 104 of file heur_gcgsimplerounding.c.

◆ nroundablevars

heurdata nroundablevars = -1

Definition at line 105 of file heur_gcgsimplerounding.c.

Referenced by if().

◆ sol

SCIP_SOL* sol

Definition at line 154 of file heur_gcgsimplerounding.c.

◆ lpcands

SCIP_VAR** lpcands

Definition at line 155 of file heur_gcgsimplerounding.c.

◆ lpcandssol

SCIP_Real* lpcandssol

Definition at line 156 of file heur_gcgsimplerounding.c.

◆ nlps

Definition at line 157 of file heur_gcgsimplerounding.c.

◆ nlpcands

int nlpcands

Definition at line 158 of file heur_gcgsimplerounding.c.

◆ c

int c

Definition at line 159 of file heur_gcgsimplerounding.c.

◆ masterprob

masterprob = GCGgetMasterprob(heurdata->gcg)

Definition at line 169 of file heur_gcgsimplerounding.c.

◆ result

* result = SCIP_DIDNOTRUN

Definition at line 172 of file heur_gcgsimplerounding.c.