51#define HEUR_NAME "fixandinfer"
52#define HEUR_DESC "iteratively fixes variables and propagates inferences"
53#define HEUR_DISPCHAR SCIP_HEURDISPCHAR_PROP
54#define HEUR_PRIORITY -500000
57#define HEUR_MAXDEPTH -1
58#define HEUR_TIMING SCIP_HEURTIMING_AFTERNODE
59#define HEUR_USESSUBSCIP FALSE
61#define MAXDIVEDEPTH 100
68#define DEFAULT_PROPROUNDS 0
69#define DEFAULT_MINFIXINGS 100
113 ncands = npseudocands;
118 for(
c = 0;
c < ncands; ++
c )
121 if( score > bestscore )
160 SCIPdebugMsg(
scip,
" -> fixed variable <%s>[%g,%g] = %g (%d candidates left)\n",
238 startncands = ncands;
249 SCIPdebugMsg(
scip,
"starting fix-and-infer heuristic with %d unfixed integral variables\n", ncands);
261 while( !
cutoff && ncands > 0
285 else if( ncands == 0 )
306 SCIPdebugMsg(
scip,
"probing was aborted (probing depth: %d, fixed: %d/%d)",
divedepth, startncands - ncands, startncands);
344 "heuristics/fixandinfer/proprounds",
345 "maximal number of propagation rounds in probing subproblems (-1: no limit, 0: auto)",
348 "heuristics/fixandinfer/minfixings",
349 "minimal number of fixings to apply before dive may be aborted",
#define SCIP_MAXTREEDEPTH
SCIP_Bool SCIPisStopped(SCIP *scip)
int SCIPgetNContVars(SCIP *scip)
SCIP_RETCODE SCIPaddIntParam(SCIP *scip, const char *name, const char *desc, int *valueptr, SCIP_Bool isadvanced, int defaultvalue, int minvalue, int maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPincludeHeurFixandinfer(SCIP *scip)
int SCIPgetNPrioPseudoBranchBins(SCIP *scip)
SCIP_RETCODE SCIPgetPseudoBranchCands(SCIP *scip, SCIP_VAR ***pseudocands, int *npseudocands, int *npriopseudocands)
SCIP_RETCODE SCIPsetHeurFree(SCIP *scip, SCIP_HEUR *heur,)
SCIP_HEURDATA * SCIPheurGetData(SCIP_HEUR *heur)
SCIP_RETCODE SCIPincludeHeurBasic(SCIP *scip, SCIP_HEUR **heur, const char *name, const char *desc, char dispchar, int priority, int freq, int freqofs, int maxdepth, SCIP_HEURTIMING timingmask, SCIP_Bool usessubscip, SCIP_DECL_HEUREXEC((*heurexec)), SCIP_HEURDATA *heurdata)
SCIP_RETCODE SCIPsetHeurCopy(SCIP *scip, SCIP_HEUR *heur,)
const char * SCIPheurGetName(SCIP_HEUR *heur)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_RETCODE SCIPpropagateProbing(SCIP *scip, int maxproprounds, SCIP_Bool *cutoff, SCIP_Longint *ndomredsfound)
SCIP_RETCODE SCIPstartProbing(SCIP *scip)
SCIP_RETCODE SCIPnewProbingNode(SCIP *scip)
SCIP_RETCODE SCIPfixVarProbing(SCIP *scip, SCIP_VAR *var, SCIP_Real fixedval)
SCIP_RETCODE SCIPtryCurrentSol(SCIP *scip, SCIP_HEUR *heur, SCIP_Bool printreason, SCIP_Bool completely, SCIP_Bool checkintegrality, SCIP_Bool checklprows, SCIP_Bool *stored)
SCIP_Real SCIPinfinity(SCIP *scip)
SCIP_Real SCIPfloor(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisFeasIntegral(SCIP *scip, SCIP_Real val)
SCIP_Real SCIPfeastol(SCIP *scip)
SCIP_Real SCIPceil(SCIP *scip, SCIP_Real val)
int SCIPgetDepth(SCIP *scip)
SCIP_Real SCIPgetVarAvgInferenceScore(SCIP *scip, SCIP_VAR *var)
SCIP_Real SCIPvarGetUbLocal(SCIP_VAR *var)
const char * SCIPvarGetName(SCIP_VAR *var)
SCIP_Real SCIPgetVarSol(SCIP *scip, SCIP_VAR *var)
SCIP_Real SCIPvarGetLbLocal(SCIP_VAR *var)
SCIPheurSetData(heur, NULL)
#define DEFAULT_PROPROUNDS
#define DEFAULT_MINFIXINGS
static SCIP_RETCODE fixVariable(SCIP *scip, SCIP_VAR **pseudocands, int npseudocands, SCIP_Real large)
fix-and-infer primal heuristic
assert(minobj< SCIPgetCutoffbound(scip))
public methods for primal heuristics
public methods for message output
public methods for problem variables
public methods for branching rule plugins and branching
public methods for primal heuristic plugins and divesets
public methods for memory management
public methods for message handling
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for global and local (sub)problems
public methods for the probing mode
public methods for solutions
public methods for the branch-and-bound tree
public methods for SCIP variables
#define SCIP_DECL_HEURCOPY(x)
struct SCIP_HeurData SCIP_HEURDATA
struct SCIP_Heur SCIP_HEUR
#define SCIP_DECL_HEURFREE(x)
#define SCIP_DECL_HEUREXEC(x)
enum SCIP_Retcode SCIP_RETCODE