Detailed Description
LP diving heuristic that chooses fixings w.r.t. the matrix coefficients.
Definition in file heur_gcgcoefdiving.c.
#include <assert.h>
#include <string.h>
#include "heur_gcgcoefdiving.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 "gcgcoefdiving" |
#define | HEUR_DESC "LP diving heuristic that chooses fixings w.r.t. the matrix coefficients" |
#define | HEUR_DISPCHAR 'c' |
#define | HEUR_PRIORITY -1001000 |
#define | HEUR_FREQ 10 |
#define | HEUR_FREQOFS 1 |
#define | HEUR_MAXDEPTH -1 |
#define | DEFAULT_USEMASTERLOCKS FALSE |
Functions | |
static SCIP_Bool | areVarsInSameBlock (SCIP_VAR *origvar, SCIP_VAR *mastervar) |
static SCIP_RETCODE | getNLocksDown (SCIP *scip, SCIP_VAR *var, int *nlocksdown) |
static SCIP_RETCODE | getNLocksUp (SCIP *scip, SCIP_VAR *var, int *nlocksup) |
static | GCG_DECL_DIVINGFREE (heurFreeGcgcoefdiving) |
static | GCG_DECL_DIVINGSELECTVAR (heurSelectVarGcgcoefdiving) |
SCIP_RETCODE | GCGincludeHeurGcgcoefdiving (SCIP *scip) |
Macro Definition Documentation
◆ HEUR_NAME
#define HEUR_NAME "gcgcoefdiving" |
Definition at line 44 of file heur_gcgcoefdiving.c.
◆ HEUR_DESC
#define HEUR_DESC "LP diving heuristic that chooses fixings w.r.t. the matrix coefficients" |
Definition at line 45 of file heur_gcgcoefdiving.c.
◆ HEUR_DISPCHAR
#define HEUR_DISPCHAR 'c' |
Definition at line 46 of file heur_gcgcoefdiving.c.
◆ HEUR_PRIORITY
#define HEUR_PRIORITY -1001000 |
Definition at line 47 of file heur_gcgcoefdiving.c.
◆ HEUR_FREQ
#define HEUR_FREQ 10 |
Definition at line 48 of file heur_gcgcoefdiving.c.
◆ HEUR_FREQOFS
#define HEUR_FREQOFS 1 |
Definition at line 49 of file heur_gcgcoefdiving.c.
◆ HEUR_MAXDEPTH
#define HEUR_MAXDEPTH -1 |
Definition at line 50 of file heur_gcgcoefdiving.c.
◆ DEFAULT_USEMASTERLOCKS
#define DEFAULT_USEMASTERLOCKS FALSE |
calculate the number of locks w.r.t. the master LP?
Definition at line 57 of file heur_gcgcoefdiving.c.
Function Documentation
◆ areVarsInSameBlock()
|
static |
check whether an original variable and a master variable belong to the same block
- Parameters
-
origvar original variable mastervar master variable
Definition at line 73 of file heur_gcgcoefdiving.c.
References GCGisLinkingVarInBlock(), GCGoriginalVarGetMastervars(), GCGoriginalVarGetNMastervars(), GCGoriginalVarIsLinking(), and GCGvarGetBlock().
Referenced by getNLocksDown(), and getNLocksUp().
◆ getNLocksDown()
|
static |
get the number of down-locks for an original variable w.r.t. the master problem
- Parameters
-
scip SCIP data structure var original variable to get locks for nlocksdown pointer to store number of down-locks
Definition at line 128 of file heur_gcgcoefdiving.c.
References areVarsInSameBlock(), GCGgetMasterprob(), GCGoriginalVarGetMastervals(), GCGoriginalVarGetMastervars(), and GCGoriginalVarGetNMastervars().
Referenced by GCG_DECL_DIVINGSELECTVAR().
◆ getNLocksUp()
|
static |
get the number of up-locks for an original variable w.r.t. the master problem
- Parameters
-
scip SCIP data structure var original variable to get locks for nlocksup pointer to store number of up-locks
Definition at line 189 of file heur_gcgcoefdiving.c.
References areVarsInSameBlock(), GCGgetMasterprob(), GCGoriginalVarGetMastervals(), GCGoriginalVarGetMastervars(), and GCGoriginalVarGetNMastervars().
Referenced by GCG_DECL_DIVINGSELECTVAR().
◆ GCG_DECL_DIVINGFREE()
|
static |
destructor of diving heuristic to free user data (called when GCG is exiting)
Definition at line 255 of file heur_gcgcoefdiving.c.
References GCGheurGetDivingDataOrig(), and GCGheurSetDivingDataOrig().
◆ GCG_DECL_DIVINGSELECTVAR()
|
static |
variable selection method of diving heuristic; finds best candidate variable w.r.t. locking numbers:
- prefer variables that may not be rounded without destroying LP feasibility:
- of these variables, round variable with least number of locks in corresponding direction
- if all remaining fractional variables may be rounded without destroying LP feasibility:
- round variable with least number of locks in opposite of its feasible rounding direction
- binary variables are preferred
Definition at line 281 of file heur_gcgcoefdiving.c.
References GCGheurGetDivingDataOrig(), getNLocksDown(), getNLocksUp(), and GCG_DivingData::usemasterlocks.
◆ GCGincludeHeurGcgcoefdiving()
SCIP_RETCODE GCGincludeHeurGcgcoefdiving | ( | SCIP * | scip | ) |
creates the gcgcoefdiving heuristic and includes it in GCG
- Parameters
-
scip SCIP data structure
Definition at line 445 of file heur_gcgcoefdiving.c.
References DEFAULT_USEMASTERLOCKS, GCGincludeDivingHeurOrig(), HEUR_DESC, HEUR_DISPCHAR, HEUR_FREQ, HEUR_FREQOFS, HEUR_MAXDEPTH, HEUR_NAME, HEUR_PRIORITY, and GCG_DivingData::usemasterlocks.
Referenced by SCIPincludeGcgPlugins().