/** node selection method of node selector */ static SCIP_DECL_NODESELSELECT(nodeselSelectDfs) { /*lint --e{715}*/ assert(nodesel != NULL); assert(strcmp(SCIPnodeselGetName(nodesel), NODESEL_NAME) == 0); assert(scip != NULL); assert(selnode != NULL); *selnode = SCIPgetPrioChild(scip); if( *selnode == NULL ) { *selnode = SCIPgetPrioSibling(scip); if( *selnode == NULL ) { SCIPdebugMessage("select best leaf\n"); *selnode = SCIPgetBestLeaf(scip); } SCIPdebugMessage("select best sibling leaf\n"); } return SCIP_OKAY; }
/** node selection method of node selector */ static SCIP_DECL_NODESELSELECT(nodeselSelectBreadthfirst) { /*lint --e{715}*/ assert(nodesel != NULL); assert(strcmp(SCIPnodeselGetName(nodesel), NODESEL_NAME) == 0); assert(scip != NULL); assert(selnode != NULL); /* siblings come before leaves at the same level. Sometimes it can occur that no leaves are left except for children */ *selnode = SCIPgetBestSibling(scip); if( *selnode == NULL ) { *selnode = SCIPgetBestLeaf(scip); if( *selnode == NULL ) *selnode=SCIPgetBestChild(scip); } if( *selnode != NULL ) { SCIPdebugMessage("Selecting next node number %"SCIP_LONGINT_FORMAT" at depth %d\n", SCIPnodeGetNumber(*selnode), SCIPnodeGetDepth(*selnode)); } return SCIP_OKAY; }