Scippy

SCIP

Solving Constraint Integer Programs

heur_fixandinfer.c File Reference

Detailed Description

fix-and-infer primal heuristic

Author
Tobias Achterberg

Definition in file heur_fixandinfer.c.

#include <assert.h>
#include <string.h>
#include "scip/heur_fixandinfer.h"

Go to the source code of this file.

Macros

#define HEUR_NAME   "fixandinfer"
 
#define HEUR_DESC   "iteratively fixes variables and propagates inferences"
 
#define HEUR_DISPCHAR   'I'
 
#define HEUR_PRIORITY   -500000
 
#define HEUR_FREQ   -1 /* at the moment, the heuristic seems to be useless */
 
#define HEUR_FREQOFS   0
 
#define HEUR_MAXDEPTH   -1
 
#define HEUR_TIMING   SCIP_HEURTIMING_AFTERNODE
 
#define HEUR_USESSUBSCIP   FALSE
 
#define MAXDIVEDEPTH   100
 
#define DEFAULT_PROPROUNDS   0
 
#define DEFAULT_MINFIXINGS   100
 

Functions

static SCIP_RETCODE fixVariable (SCIP *scip, SCIP_VAR **pseudocands, int npseudocands, SCIP_Real large)
 
static SCIP_DECL_HEURCOPY (heurCopyFixandinfer)
 
static SCIP_DECL_HEURFREE (heurFreeFixandinfer)
 
static SCIP_DECL_HEUREXEC (heurExecFixandinfer)
 
SCIP_RETCODE SCIPincludeHeurFixandinfer (SCIP *scip)
 

Macro Definition Documentation

◆ HEUR_NAME

#define HEUR_NAME   "fixandinfer"

Definition at line 29 of file heur_fixandinfer.c.

Referenced by SCIP_DECL_HEURCOPY(), and SCIPincludeHeurFixandinfer().

◆ HEUR_DESC

#define HEUR_DESC   "iteratively fixes variables and propagates inferences"

Definition at line 30 of file heur_fixandinfer.c.

Referenced by SCIPincludeHeurFixandinfer().

◆ HEUR_DISPCHAR

#define HEUR_DISPCHAR   'I'

Definition at line 31 of file heur_fixandinfer.c.

Referenced by SCIPincludeHeurFixandinfer().

◆ HEUR_PRIORITY

#define HEUR_PRIORITY   -500000

Definition at line 32 of file heur_fixandinfer.c.

Referenced by SCIPincludeHeurFixandinfer().

◆ HEUR_FREQ

#define HEUR_FREQ   -1 /* at the moment, the heuristic seems to be useless */

Definition at line 33 of file heur_fixandinfer.c.

Referenced by SCIPincludeHeurFixandinfer().

◆ HEUR_FREQOFS

#define HEUR_FREQOFS   0

Definition at line 34 of file heur_fixandinfer.c.

Referenced by SCIPincludeHeurFixandinfer().

◆ HEUR_MAXDEPTH

#define HEUR_MAXDEPTH   -1

Definition at line 35 of file heur_fixandinfer.c.

Referenced by SCIPincludeHeurFixandinfer().

◆ HEUR_TIMING

#define HEUR_TIMING   SCIP_HEURTIMING_AFTERNODE

Definition at line 36 of file heur_fixandinfer.c.

Referenced by SCIPincludeHeurFixandinfer().

◆ HEUR_USESSUBSCIP

#define HEUR_USESSUBSCIP   FALSE

does the heuristic use a secondary SCIP instance?

Definition at line 37 of file heur_fixandinfer.c.

Referenced by SCIPincludeHeurFixandinfer().

◆ MAXDIVEDEPTH

#define MAXDIVEDEPTH   100

Definition at line 39 of file heur_fixandinfer.c.

Referenced by SCIP_DECL_HEUREXEC().

◆ DEFAULT_PROPROUNDS

#define DEFAULT_PROPROUNDS   0

maximal number of propagation rounds in probing subproblems

Definition at line 46 of file heur_fixandinfer.c.

Referenced by SCIPincludeHeurFixandinfer().

◆ DEFAULT_MINFIXINGS

#define DEFAULT_MINFIXINGS   100

minimal number of fixings to apply before dive may be aborted

Definition at line 47 of file heur_fixandinfer.c.

Referenced by SCIPincludeHeurFixandinfer().

Function Documentation

◆ fixVariable()

static SCIP_RETCODE fixVariable ( SCIP scip,
SCIP_VAR **  pseudocands,
int  npseudocands,
SCIP_Real  large 
)
static

selects a variable and fixes it to its current pseudo solution value

Parameters
scipSCIP data structure
pseudocandsarray of unfixed variables
npseudocandsnumber of unfixed variables
largelarge value to be used instead of infinity

Definition at line 68 of file heur_fixandinfer.c.

References SCIP_CALL, SCIP_OKAY, SCIP_Real, SCIPceil(), SCIPdebugMsg, SCIPfixVarProbing(), SCIPfloor(), SCIPgetNPrioPseudoBranchBins(), SCIPgetVarAvgInferenceScore(), SCIPgetVarSol(), SCIPinfinity(), SCIPisFeasIntegral(), SCIPisInfinity(), SCIPvarGetLbLocal(), SCIPvarGetName(), and SCIPvarGetUbLocal().

Referenced by SCIP_DECL_HEUREXEC().

◆ SCIP_DECL_HEURCOPY()

static SCIP_DECL_HEURCOPY ( heurCopyFixandinfer  )
static

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

Definition at line 152 of file heur_fixandinfer.c.

References HEUR_NAME, SCIP_CALL, SCIP_OKAY, SCIPheurGetName(), and SCIPincludeHeurFixandinfer().

◆ SCIP_DECL_HEURFREE()

static SCIP_DECL_HEURFREE ( heurFreeFixandinfer  )
static

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

Definition at line 166 of file heur_fixandinfer.c.

References SCIP_OKAY, SCIPfreeBlockMemory, SCIPheurGetData(), and SCIPheurSetData().

◆ SCIP_DECL_HEUREXEC()