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 "scip/heur_fixandinfer.h"
#include "scip/pub_heur.h"
#include "scip/pub_message.h"
#include "scip/pub_var.h"
#include "scip/scip_branch.h"
#include "scip/scip_general.h"
#include "scip/scip_heur.h"
#include "scip/scip_mem.h"
#include "scip/scip_message.h"
#include "scip/scip_numerics.h"
#include "scip/scip_param.h"
#include "scip/scip_prob.h"
#include "scip/scip_probing.h"
#include "scip/scip_sol.h"
#include "scip/scip_tree.h"
#include "scip/scip_var.h"
#include <string.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 41 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 42 of file heur_fixandinfer.c.

Referenced by SCIPincludeHeurFixandinfer().

◆ HEUR_DISPCHAR

#define HEUR_DISPCHAR   'I'

Definition at line 43 of file heur_fixandinfer.c.

Referenced by SCIPincludeHeurFixandinfer().

◆ HEUR_PRIORITY

#define HEUR_PRIORITY   -500000

Definition at line 44 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 45 of file heur_fixandinfer.c.

Referenced by SCIPincludeHeurFixandinfer().

◆ HEUR_FREQOFS

#define HEUR_FREQOFS   0

Definition at line 46 of file heur_fixandinfer.c.

Referenced by SCIPincludeHeurFixandinfer().

◆ HEUR_MAXDEPTH

#define HEUR_MAXDEPTH   -1

Definition at line 47 of file heur_fixandinfer.c.

Referenced by SCIPincludeHeurFixandinfer().

◆ HEUR_TIMING

#define HEUR_TIMING   SCIP_HEURTIMING_AFTERNODE

Definition at line 48 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 49 of file heur_fixandinfer.c.

Referenced by SCIPincludeHeurFixandinfer().

◆ MAXDIVEDEPTH

#define MAXDIVEDEPTH   100

Definition at line 51 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 58 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 59 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 80 of file heur_fixandinfer.c.

References NULL, 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 164 of file heur_fixandinfer.c.

References HEUR_NAME, NULL, 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 178 of file heur_fixandinfer.c.

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

◆ SCIP_DECL_HEUREXEC()