29 #define NODESEL_NAME "estimate" 30 #define NODESEL_DESC "best estimate search" 31 #define NODESEL_STDPRIORITY 200000 32 #define NODESEL_MEMSAVEPRIORITY 100 39 #define DEFAULT_MINPLUNGEDEPTH -1 40 #define DEFAULT_MAXPLUNGEDEPTH -1 41 #define DEFAULT_MAXPLUNGEQUOT 0.25 43 #define DEFAULT_BESTNODEFREQ 10 44 #define DEFAULT_BREADTHFIRSTDEPTH -1 45 #define DEFAULT_PLUNGEOFFSET 0 49 struct SCIP_NodeselData
59 int breadthfirstdepth;
73 assert(nodesel != NULL);
88 assert(nodesel != NULL);
94 assert(nodeseldata != NULL);
113 assert(nodesel != NULL);
115 assert(
scip != NULL);
116 assert(selnode != NULL);
122 assert(nodeseldata != NULL);
148 bestnodefreq = (nodeseldata->bestnodefreq == 0 ? INT_MAX : nodeseldata->bestnodefreq);
155 nodeseldata->plungeoffset);
167 minplungedepth = nodeseldata->minplungedepth;
168 maxplungedepth = nodeseldata->maxplungedepth;
169 maxplungequot = nodeseldata->maxplungequot;
170 if( minplungedepth == -1 )
174 minplungedepth += 10;
175 if( maxplungedepth >= 0 )
176 minplungedepth = MIN(minplungedepth, maxplungedepth);
178 if( maxplungedepth == -1 )
180 maxplungedepth =
MAX(maxplungedepth, minplungedepth);
184 if( plungedepth > maxplungedepth )
187 SCIPdebugMsg(
scip,
"plungedepth: [%d,%d], cur: %d -> abort plunging\n", minplungedepth, maxplungedepth, plungedepth);
210 cutoffbound = lowerbound + 0.2 * (cutoffbound - lowerbound);
213 if( plungedepth < minplungedepth )
218 maxbound = lowerbound + maxplungequot * (cutoffbound - lowerbound);
221 SCIPdebugMsg(
scip,
"plungedepth: [%d,%d], cur: %d, bounds: [%g,%g], maxbound: %g\n",
222 minplungedepth, maxplungedepth, plungedepth, lowerbound, cutoffbound, maxbound);
283 assert(nodesel != NULL);
285 assert(
scip != NULL);
324 if( depth1 < depth2 )
326 else if( depth1 > depth2 )
359 nodeselSelectEstimate, nodeselCompEstimate, nodeseldata) );
361 assert(nodesel != NULL);
368 "nodeselection/estimate/minplungedepth",
369 "minimal plunging depth, before new best node may be selected (-1 for dynamic setting)",
372 "nodeselection/estimate/maxplungedepth",
373 "maximal plunging depth, before new best node is forced to be selected (-1 for dynamic setting)",
376 "nodeselection/estimate/maxplungequot",
377 "maximal quotient (estimate - lowerbound)/(cutoffbound - lowerbound) where plunging is performed",
380 "nodeselection/estimate/bestnodefreq",
381 "frequency at which the best node instead of the best estimate is selected (0: never)",
384 "nodeselection/estimate/breadthfirstdepth",
385 "depth until breadth-first search is applied",
388 "nodeselection/estimate/plungeoffset",
389 "number of nodes before doing plunging the first time",
SCIP_RETCODE SCIPsetNodeselCopy(SCIP *scip, SCIP_NODESEL *nodesel, SCIP_DECL_NODESELCOPY((*nodeselcopy)))
int SCIPgetPlungeDepth(SCIP *scip)
SCIP_Real SCIPgetCutoffbound(SCIP *scip)
SCIP_Real SCIPnodeGetLowerbound(SCIP_NODE *node)
#define DEFAULT_BESTNODEFREQ
SCIP_Longint SCIPgetNSolsFound(SCIP *scip)
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)
SCIP_NODE * SCIPgetBestSibling(SCIP *scip)
SCIP_Real SCIPinfinity(SCIP *scip)
enum SCIP_Retcode SCIP_RETCODE
#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)
static SCIP_DECL_NODESELFREE(nodeselFreeEstimate)
struct SCIP_NodeselData SCIP_NODESELDATA
static SCIP_DECL_NODESELCOPY(nodeselCopyEstimate)
#define NODESEL_STDPRIORITY
SCIP_Bool SCIPisLT(SCIP *scip, SCIP_Real val1, SCIP_Real val2)
#define DEFAULT_MAXPLUNGEQUOT
SCIP_NODESELDATA * SCIPnodeselGetData(SCIP_NODESEL *nodesel)
SCIP_Real SCIPgetLowerbound(SCIP *scip)
node selector for best estimate search
SCIP_NODE * SCIPgetBestboundNode(SCIP *scip)
SCIP_Longint SCIPgetNNodeLPIterations(SCIP *scip)
SCIP_NODE * SCIPgetBestNode(SCIP *scip)
int SCIPgetDepth(SCIP *scip)
const char * SCIPnodeselGetName(SCIP_NODESEL *nodesel)
static SCIP_DECL_NODESELCOMP(nodeselCompEstimate)
#define DEFAULT_MINPLUNGEDEPTH
SCIP_Bool SCIPisInfinity(SCIP *scip, SCIP_Real val)
#define DEFAULT_MAXPLUNGEDEPTH
#define NODESEL_MEMSAVEPRIORITY
SCIP_RETCODE SCIPincludeNodeselEstimate(SCIP *scip)
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)
#define DEFAULT_BREADTHFIRSTDEPTH
#define DEFAULT_PLUNGEOFFSET
SCIP_RETCODE SCIPsetNodeselFree(SCIP *scip, SCIP_NODESEL *nodesel, SCIP_DECL_NODESELFREE((*nodeselfree)))
SCIP_NODETYPE SCIPnodeGetType(SCIP_NODE *node)
SCIP_NODE * SCIPgetPrioChild(SCIP *scip)
SCIP_NODE * SCIPgetBestChild(SCIP *scip)
static SCIP_DECL_NODESELSELECT(nodeselSelectEstimate)
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)