29 #define NODESEL_NAME "hybridestim" 30 #define NODESEL_DESC "hybrid best estimate / best bound search" 31 #define NODESEL_STDPRIORITY 50000 32 #define NODESEL_MEMSAVEPRIORITY 50 39 #define MINPLUNGEDEPTH -1 40 #define MAXPLUNGEDEPTH -1 41 #define MAXPLUNGEQUOT 0.25 43 #define BESTNODEFREQ 1000 44 #define ESTIMWEIGHT 0.10 49 struct SCIP_NodeselData
88 assert(nodesel !=
NULL);
103 assert(nodesel !=
NULL);
109 assert(nodeseldata !=
NULL);
128 assert(nodesel !=
NULL);
131 assert(selnode !=
NULL);
137 assert(nodeseldata !=
NULL);
140 minplungedepth = nodeseldata->minplungedepth;
141 maxplungedepth = nodeseldata->maxplungedepth;
142 maxplungequot = nodeseldata->maxplungequot;
143 if( minplungedepth == -1 )
147 minplungedepth += 10;
148 if( maxplungedepth >= 0 )
149 minplungedepth =
MIN(minplungedepth, maxplungedepth);
151 if( maxplungedepth == -1 )
153 maxplungedepth =
MAX(maxplungedepth, minplungedepth);
154 bestnodefreq = (nodeseldata->bestnodefreq == 0 ? INT_MAX : nodeseldata->bestnodefreq);
158 if( plungedepth > maxplungedepth )
161 SCIPdebugMsg(
scip,
"plungedepth: [%d,%d], cur: %d -> abort plunging\n", minplungedepth, maxplungedepth, plungedepth);
184 cutoffbound = lowerbound + 0.2 * (cutoffbound - lowerbound);
187 if( plungedepth < minplungedepth )
192 maxbound = lowerbound + maxplungequot * (cutoffbound - lowerbound);
195 SCIPdebugMsg(
scip,
"plungedepth: [%d,%d], cur: %d, bounds: [%g,%g], maxbound: %g\n",
196 minplungedepth, maxplungedepth, plungedepth, lowerbound, cutoffbound, maxbound);
258 assert(nodesel !=
NULL);
263 assert(nodeseldata !=
NULL);
291 if( depth1 < depth2 )
293 else if( depth1 > depth2 )
325 nodeselSelectHybridestim, nodeselCompHybridestim, nodeseldata) );
327 assert(nodesel !=
NULL);
334 "nodeselection/hybridestim/minplungedepth",
335 "minimal plunging depth, before new best node may be selected (-1 for dynamic setting)",
338 "nodeselection/hybridestim/maxplungedepth",
339 "maximal plunging depth, before new best node is forced to be selected (-1 for dynamic setting)",
342 "nodeselection/hybridestim/maxplungequot",
343 "maximal quotient (estimate - lowerbound)/(cutoffbound - lowerbound) where plunging is performed",
346 "nodeselection/hybridestim/bestnodefreq",
347 "frequency at which the best node instead of the hybrid best estimate / best bound is selected (0: never)",
350 "nodeselection/hybridestim/estimweight",
351 "weight of estimate value in node selection score (0: pure best bound search, 1: pure best estimate search)",
SCIP_RETCODE SCIPsetNodeselCopy(SCIP *scip, SCIP_NODESEL *nodesel, SCIP_DECL_NODESELCOPY((*nodeselcopy)))
int SCIPgetPlungeDepth(SCIP *scip)
static SCIP_DECL_NODESELCOPY(nodeselCopyHybridestim)
node selector for hybrid best estimate / best bound search
SCIP_Real SCIPgetCutoffbound(SCIP *scip)
SCIP_Real SCIPnodeGetLowerbound(SCIP_NODE *node)
SCIP_Longint SCIPgetNSolsFound(SCIP *scip)
#define NODESEL_MEMSAVEPRIORITY
SCIP_RETCODE SCIPincludeNodeselBasic(SCIP *scip, SCIP_NODESEL **nodesel, const char *name, const char *desc, int stdpriority, int memsavepriority, SCIP_DECL_NODESELSELECT((*nodeselselect)), SCIP_DECL_NODESELCOMP((*nodeselcomp)), SCIP_NODESELDATA *nodeseldata)
int SCIPgetMaxDepth(SCIP *scip)
static SCIP_Real getNodeselScore(SCIP_NODE *node, SCIP_Real estimweight)
SCIP_NODE * SCIPgetBestSibling(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
enum SCIP_Retcode SCIP_RETCODE
static SCIP_DECL_NODESELFREE(nodeselFreeHybridestim)
#define SCIPfreeBlockMemory(scip, ptr)
SCIP_Bool SCIPisEQ(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
int SCIPnodeGetDepth(SCIP_NODE *node)
#define SCIPallocBlockMemory(scip, ptr)
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)
struct SCIP_NodeselData SCIP_NODESELDATA
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_NODESELDATA * SCIPnodeselGetData(SCIP_NODESEL *nodesel)
SCIP_Real SCIPgetLowerbound(SCIP *scip)
SCIP_NODE * SCIPgetBestboundNode(SCIP *scip)
#define NODESEL_STDPRIORITY
SCIP_Longint SCIPgetNNodeLPIterations(SCIP *scip)
static SCIP_DECL_NODESELCOMP(nodeselCompHybridestim)
SCIP_NODE * SCIPgetBestNode(SCIP *scip)
const char * SCIPnodeselGetName(SCIP_NODESEL *nodesel)
SCIP_RETCODE SCIPincludeNodeselHybridestim(SCIP *scip)
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
SCIP_NODE * SCIPgetPrioSibling(SCIP *scip)
SCIP_Real SCIPnodeGetEstimate(SCIP_NODE *node)
enum SCIP_NodeType SCIP_NODETYPE
SCIP_Bool SCIPisGT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
SCIP_Longint SCIPgetNStrongbranchLPIterations(SCIP *scip)
SCIP_RETCODE SCIPsetNodeselFree(SCIP *scip, SCIP_NODESEL *nodesel, SCIP_DECL_NODESELFREE((*nodeselfree)))
SCIP_NODETYPE SCIPnodeGetType(SCIP_NODE *node)
static SCIP_DECL_NODESELSELECT(nodeselSelectHybridestim)
SCIP_NODE * SCIPgetPrioChild(SCIP *scip)
SCIP_NODE * SCIPgetBestChild(SCIP *scip)
SCIP_Longint SCIPgetNNodes(SCIP *scip)
void SCIPnodeselSetData(SCIP_NODESEL *nodesel, SCIP_NODESELDATA *nodeseldata)
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)