Skip to content

Commit 8943f98

Browse files
committed
Merge remote-tracking branch 'origin/v92-bugfix' into v9-minor
2 parents e383b98 + 03c1306 commit 8943f98

File tree

1 file changed

+36
-18
lines changed

1 file changed

+36
-18
lines changed

src/scip/solve.c

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2214,24 +2214,42 @@ SCIP_RETCODE SCIPpriceLoop(
22142214
for( p = 0; p < set->nactivepricers && !enoughvars; ++p )
22152215
{
22162216
SCIP_CALL( SCIPpricerExec(set->pricers[p], set, transprob, lp, pricestore, &lb, &stopearly, &result) );
2217-
assert(result == SCIP_DIDNOTRUN || result == SCIP_SUCCESS);
2218-
SCIPsetDebugMsg(set, "pricing: pricer %s returned result = %s, lowerbound = %f\n",
2219-
SCIPpricerGetName(set->pricers[p]), (result == SCIP_DIDNOTRUN ? "didnotrun" : "success"), lb);
2220-
enoughvars = enoughvars || (SCIPsetGetPriceMaxvars(set, pretendroot) == INT_MAX ?
2221-
FALSE : SCIPpricestoreGetNVars(pricestore) >= SCIPsetGetPriceMaxvars(set, pretendroot) + 1);
2222-
*aborted = ( (*aborted) || (result == SCIP_DIDNOTRUN) );
2223-
2224-
/* set stoppricing to TRUE, if the first pricer wants to stop pricing */
2225-
if( p == 0 && stopearly )
2226-
stoppricing = TRUE;
2227-
2228-
/* stoppricing only remains TRUE, if all other pricers want to stop pricing as well */
2229-
if( stoppricing && !stopearly )
2230-
stoppricing = FALSE;
2231-
2232-
/* update lower bound w.r.t. the lower bound given by the pricer */
2233-
SCIPnodeUpdateLowerbound(currentnode, stat, set, tree, transprob, origprob, lb);
2234-
SCIPsetDebugMsg(set, " -> new lower bound given by pricer %s: %g\n", SCIPpricerGetName(set->pricers[p]), lb);
2217+
switch ( result )
2218+
{
2219+
case SCIP_DIDNOTRUN:
2220+
{
2221+
/* pricer did not run */
2222+
SCIPsetDebugMsg(set, "pricing: pricer %s did not run\n", SCIPpricerGetName(set->pricers[p]));
2223+
*aborted = TRUE;
2224+
break;
2225+
}
2226+
case SCIP_SUCCESS:
2227+
{
2228+
/* pricer found new variables or proved that no variable with negative reduced cost exists */
2229+
SCIPsetDebugMsg(set, "pricing: pricer %s succeeded, lowerbound = %f\n",
2230+
SCIPpricerGetName(set->pricers[p]), lb);
2231+
2232+
enoughvars = SCIPpricestoreGetNVars(pricestore) > SCIPsetGetPriceMaxvars(set, pretendroot);
2233+
2234+
/* set stoppricing to TRUE, if the first pricer wants to stop pricing */
2235+
if( p == 0 && stopearly )
2236+
stoppricing = TRUE;
2237+
2238+
/* stoppricing only remains TRUE, if all other pricers want to stop pricing as well */
2239+
if( stoppricing && !stopearly )
2240+
stoppricing = FALSE;
2241+
2242+
/* update lower bound w.r.t. the lower bound given by the pricer */
2243+
SCIPnodeUpdateLowerbound(currentnode, stat, set, tree, transprob, origprob, lb);
2244+
SCIPsetDebugMsg(set, " -> new lower bound given by pricer %s: %g", SCIPpricerGetName(set->pricers[p]), lb);
2245+
break;
2246+
}
2247+
default:
2248+
{
2249+
SCIPerrorMessage("pricer <%s> returned invalid result <%d>\n", SCIPpricerGetName(set->pricers[p]), result);
2250+
return SCIP_INVALIDRESULT;
2251+
}
2252+
} /*lint !e788*/
22352253
}
22362254

22372255
/* apply the priced variables to the LP */

0 commit comments

Comments
 (0)