/** creates the node selector for best first search and includes it in SCIP */ SCIP_RETCODE SCIPincludeNodeselBfs( SCIP* scip /**< SCIP data structure */ ) { SCIP_NODESELDATA* nodeseldata; /* allocate and initialize node selector data; this has to be freed in the destructor */ SCIP_CALL( SCIPallocMemory(scip, &nodeseldata) ); /* include node selector */ SCIP_CALL( SCIPincludeNodesel(scip, NODESEL_NAME, NODESEL_DESC, NODESEL_STDPRIORITY, NODESEL_MEMSAVEPRIORITY, nodeselCopyBfs, nodeselFreeBfs, nodeselInitBfs, nodeselExitBfs, nodeselInitsolBfs, nodeselExitsolBfs, nodeselSelectBfs, nodeselCompBfs, nodeseldata) ); /* add node selector parameters */ SCIP_CALL( SCIPaddIntParam(scip, "nodeselection/bfs/minplungedepth", "minimal plunging depth, before new best node may be selected (-1 for dynamic setting)", &nodeseldata->minplungedepth, TRUE, MINPLUNGEDEPTH, -1, INT_MAX, NULL, NULL) ); SCIP_CALL( SCIPaddIntParam(scip, "nodeselection/bfs/maxplungedepth", "maximal plunging depth, before new best node is forced to be selected (-1 for dynamic setting)", &nodeseldata->maxplungedepth, TRUE, MAXPLUNGEDEPTH, -1, INT_MAX, NULL, NULL) ); SCIP_CALL( SCIPaddRealParam(scip, "nodeselection/bfs/maxplungequot", "maximal quotient (curlowerbound - lowerbound)/(cutoffbound - lowerbound) where plunging is performed", &nodeseldata->maxplungequot, TRUE, MAXPLUNGEQUOT, 0.0, SCIP_REAL_MAX, NULL, NULL) ); return SCIP_OKAY; }
/** creates the node selector for depth first search and includes it in SCIP */ SCIP_RETCODE SCIPincludeNodeselMaster( SCIP* scip /**< SCIP data structure */ ) { SCIP_NODESELDATA* nodeseldata; /* create master node selector data */ SCIP_CALL( SCIPallocMemory(scip, &nodeseldata) ); nodeseldata->lastorignodenumber = -1LL; /* include node selector */ SCIP_CALL( SCIPincludeNodesel(scip, NODESEL_NAME, NODESEL_DESC, NODESEL_STDPRIORITY, NODESEL_MEMSAVEPRIORITY, nodeselCopyMaster, nodeselFreeMaster, nodeselInitMaster, nodeselExitMaster, nodeselInitsolMaster, nodeselExitsolMaster, nodeselSelectMaster, nodeselCompMaster, nodeseldata) ); return SCIP_OKAY; }