47#define HEUR_NAME "conflictdiving"
48#define HEUR_DESC "LP diving heuristic that chooses fixings w.r.t. conflict locks"
49#define HEUR_DISPCHAR SCIP_HEURDISPCHAR_DIVING
50#define HEUR_PRIORITY -1000100
53#define HEUR_MAXDEPTH -1
54#define HEUR_TIMING SCIP_HEURTIMING_AFTERLPPLUNGE
55#define HEUR_USESSUBSCIP FALSE
56#define DIVESET_DIVETYPES SCIP_DIVETYPE_INTEGRALITY | SCIP_DIVETYPE_SOS1VARIABLE
57#define DIVESET_ISPUBLIC FALSE
58#define DEFAULT_RANDSEED 151
64#define DEFAULT_MINRELDEPTH 0.0
65#define DEFAULT_MAXRELDEPTH 1.0
66#define DEFAULT_MAXLPITERQUOT 0.15
67#define DEFAULT_MAXLPITEROFS 1000
68#define DEFAULT_MAXDIVEUBQUOT 0.8
70#define DEFAULT_MAXDIVEAVGQUOT 0.0
72#define DEFAULT_MAXDIVEUBQUOTNOSOL 0.1
73#define DEFAULT_MAXDIVEAVGQUOTNOSOL 0.0
74#define DEFAULT_BACKTRACK TRUE
75#define DEFAULT_LPRESOLVEDOMCHGQUOT 0.15
76#define DEFAULT_LPSOLVEFREQ 0
77#define DEFAULT_ONLYLPBRANCHCANDS FALSE
79#define DEFAULT_LOCKWEIGHT 0.75
80#define DEFAULT_LIKECOEF FALSE
81#define DEFAULT_MAXVIOL TRUE
82#define DEFAULT_MINCONFLICTLOCKS 5
89 SCIP_Bool likecoefdiving;
198#define MIN_RAND 1e-06
199#define MAX_RAND 1e-05
216 SCIP_Real downweight;
219 int nconflictlocksdown;
220 int nconflictlocksup;
233 upweight =
heurdata->lockweight * nconflictlocksup + (1.0 -
heurdata->lockweight) * nlocksup;
234 downweight =
heurdata->lockweight * nconflictlocksdown + (1.0 -
heurdata->lockweight) * nlocksdown;
270 candsfrac = 1.0 - candsfrac;
274 candsfrac = 1.0 - candsfrac;
288 candsfrac = 1.0 - candsfrac;
303 else if( candsfrac < 0.01 )
308 *score = -1.0 / *score;
327 SCIP_Real conflictlocksum;
329 SCIP_Real downweight;
334 int nconflictlocksup;
335 int nconflictlocksdown;
344 conflictlocksum = nconflictlocksup + nconflictlocksdown;
351 upweight =
heurdata->lockweight * nconflictlocksup + (1.0 -
heurdata->lockweight) * nlocksup;
352 downweight =
heurdata->lockweight * nconflictlocksdown + (1.0 -
heurdata->lockweight) * nlocksdown;
404 candsfrac = 1.0 - candsfrac;
408 candsfrac = 1.0 - candsfrac;
422 candsfrac = 1.0 - candsfrac;
429 if( conflictlocksum > 0 && conflictlocksum < heurdata->minconflictlocks )
433 if( conflictlocksum == 0 )
445 else if( candsfrac < 0.01 )
450 *score = -1.0 / *score;
492#define divesetAvailableConflictdiving NULL
527 "perform rounding like coefficient diving",
531 "minimal number of conflict locks per variable",
535 "weight used in a convex combination of conflict and variable locks",
#define SCIP_PROBINGSCORE_PENALTYRATIO
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 SCIPaddRealParam(SCIP *scip, const char *name, const char *desc, SCIP_Real *valueptr, SCIP_Bool isadvanced, SCIP_Real defaultvalue, SCIP_Real minvalue, SCIP_Real maxvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPaddBoolParam(SCIP *scip, const char *name, const char *desc, SCIP_Bool *valueptr, SCIP_Bool isadvanced, SCIP_Bool defaultvalue, SCIP_DECL_PARAMCHGD((*paramchgd)), SCIP_PARAMDATA *paramdata)
SCIP_RETCODE SCIPcreateDiveset(SCIP *scip, SCIP_DIVESET **diveset, SCIP_HEUR *heur, const char *name, SCIP_Real minreldepth, SCIP_Real maxreldepth, SCIP_Real maxlpiterquot, SCIP_Real maxdiveubquot, SCIP_Real maxdiveavgquot, SCIP_Real maxdiveubquotnosol, SCIP_Real maxdiveavgquotnosol, SCIP_Real lpresolvedomchgquot, int lpsolvefreq, int maxlpiterofs, unsigned int initialseed, SCIP_Bool backtrack, SCIP_Bool onlylpbranchcands, SCIP_Bool ispublic, SCIP_Bool specificsos1score, SCIP_DECL_DIVESETGETSCORE((*divesetgetscore)),)
SCIP_RANDNUMGEN * SCIPdivesetGetRandnumgen(SCIP_DIVESET *diveset)
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,)
int SCIPheurGetNDivesets(SCIP_HEUR *heur)
SCIP_RETCODE SCIPsetHeurExit(SCIP *scip, SCIP_HEUR *heur,)
SCIP_RETCODE SCIPsetHeurInit(SCIP *scip, SCIP_HEUR *heur,)
const char * SCIPheurGetName(SCIP_HEUR *heur)
SCIP_DIVESET ** SCIPheurGetDivesets(SCIP_HEUR *heur)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
SCIP_Longint SCIPgetNConflictConssFound(SCIP *scip)
SCIP_Bool SCIPisFeasNegative(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisZero(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Bool SCIPisFeasPositive(SCIP *scip, SCIP_Real val)
SCIP_Bool SCIPvarIsBinary(SCIP_VAR *var)
int SCIPvarGetNLocksUpType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
int SCIPvarGetNLocksDownType(SCIP_VAR *var, SCIP_LOCKTYPE locktype)
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
int SCIPrandomGetInt(SCIP_RANDNUMGEN *randnumgen, int minrandval, int maxrandval)
SCIP_HEUR * SCIPdivesetGetHeur(SCIP_DIVESET *diveset)
SCIPperformGenericDivingAlgorithm(scip, diveset, heurdata->sol, heur, result, nodeinfeasible, lpiterlimit, -1, -1.0, SCIP_DIVECONTEXT_ADAPTIVE))
#define DEFAULT_ONLYLPBRANCHCANDS
#define DEFAULT_MAXDIVEUBQUOT
#define DEFAULT_LPRESOLVEDOMCHGQUOT
SCIPheurSetData(heur, NULL)
#define divesetAvailableConflictdiving
static SCIP_RETCODE getScore(SCIP *scip, SCIP_HEURDATA *heurdata, SCIP_RANDNUMGEN *rng, SCIP_DIVETYPE divetype, SCIP_VAR *cand, SCIP_Real candsol, SCIP_Real candsfrac, SCIP_Real *score, SCIP_Bool *roundup)
#define DEFAULT_MAXLPITERQUOT
#define DEFAULT_MAXDIVEAVGQUOT
#define DEFAULT_LPSOLVEFREQ
#define DEFAULT_BACKTRACK
#define DEFAULT_MAXDIVEUBQUOTNOSOL
#define DEFAULT_MAXRELDEPTH
#define DEFAULT_MAXLPITEROFS
SCIPfreeSol(scip, &heurdata->sol))
#define DEFAULT_MAXDIVEAVGQUOTNOSOL
SCIP_RETCODE SCIPincludeHeurConflictdiving(SCIP *scip)
#define DEFAULT_LOCKWEIGHT
#define DEFAULT_MINCONFLICTLOCKS
#define DIVESET_DIVETYPES
#define DEFAULT_MINRELDEPTH
static SCIP_DIVESET * diveset
SCIPcreateSol(scip, &heurdata->sol, heur))
LP diving heuristic that chooses fixings w.r.t. conflict locks.
assert(minobj< SCIPgetCutoffbound(scip))
methods commonly used by primal heuristics
public methods for primal heuristics
public methods for message output
public data structures and miscellaneous methods
public methods for problem variables
public methods for primal heuristic plugins and divesets
public methods for memory management
public methods for numerical tolerances
public methods for SCIP parameter handling
public methods for solutions
public methods for querying solving statistics
#define SCIP_DECL_HEURCOPY(x)
struct SCIP_HeurData SCIP_HEURDATA
#define SCIP_DECL_HEURINIT(x)
#define SCIP_DECL_HEUREXIT(x)
unsigned int SCIP_DIVETYPE
#define SCIP_DECL_HEURFREE(x)
#define SCIP_DECL_DIVESETGETSCORE(x)
#define SCIP_DECL_HEUREXEC(x)
#define SCIP_DIVETYPE_SOS1VARIABLE
#define SCIP_DIVETYPE_INTEGRALITY
@ SCIP_DIVECONTEXT_SINGLE
enum SCIP_Retcode SCIP_RETCODE