@@ -2322,24 +2322,42 @@ SCIP_RETCODE SCIPpriceLoop(
2322
2322
for ( p = 0 ; p < set -> nactivepricers && !enoughvars ; ++ p )
2323
2323
{
2324
2324
SCIP_CALL ( SCIPpricerExec (set -> pricers [p ], set , transprob , lp , pricestore , & lb , & stopearly , & result ) );
2325
- assert (result == SCIP_DIDNOTRUN || result == SCIP_SUCCESS );
2326
- SCIPsetDebugMsg (set , "pricing: pricer %s returned result = %s, lowerbound = %f\n" ,
2327
- SCIPpricerGetName (set -> pricers [p ]), (result == SCIP_DIDNOTRUN ? "didnotrun" : "success" ), lb );
2328
- enoughvars = enoughvars || (SCIPsetGetPriceMaxvars (set , pretendroot ) == INT_MAX ?
2329
- FALSE : SCIPpricestoreGetNVars (pricestore ) >= SCIPsetGetPriceMaxvars (set , pretendroot ) + 1 );
2330
- * aborted = ( (* aborted ) || (result == SCIP_DIDNOTRUN ) );
2331
-
2332
- /* set stoppricing to TRUE, if the first pricer wants to stop pricing */
2333
- if ( p == 0 && stopearly )
2334
- stoppricing = TRUE;
2335
-
2336
- /* stoppricing only remains TRUE, if all other pricers want to stop pricing as well */
2337
- if ( stoppricing && !stopearly )
2338
- stoppricing = FALSE;
2339
-
2340
- /* update lower bound w.r.t. the lower bound given by the pricer */
2341
- SCIP_CALL ( SCIPnodeUpdateLowerbound (currentnode , stat , set , eventfilter , tree , transprob , origprob , lb , NULL ) );
2342
- SCIPsetDebugMsg (set , " -> new lower bound given by pricer %s: %g\n" , SCIPpricerGetName (set -> pricers [p ]), lb );
2325
+ switch ( result )
2326
+ {
2327
+ case SCIP_DIDNOTRUN :
2328
+ {
2329
+ /* pricer did not run */
2330
+ SCIPsetDebugMsg (set , "pricing: pricer %s did not run\n" , SCIPpricerGetName (set -> pricers [p ]));
2331
+ * aborted = TRUE;
2332
+ break ;
2333
+ }
2334
+ case SCIP_SUCCESS :
2335
+ {
2336
+ /* pricer found new variables or proved that no variable with negative reduced cost exists */
2337
+ SCIPsetDebugMsg (set , "pricing: pricer %s succeeded, lowerbound = %f\n" ,
2338
+ SCIPpricerGetName (set -> pricers [p ]), lb );
2339
+
2340
+ enoughvars = SCIPpricestoreGetNVars (pricestore ) > SCIPsetGetPriceMaxvars (set , pretendroot );
2341
+
2342
+ /* set stoppricing to TRUE, if the first pricer wants to stop pricing */
2343
+ if ( p == 0 && stopearly )
2344
+ stoppricing = TRUE;
2345
+
2346
+ /* stoppricing only remains TRUE, if all other pricers want to stop pricing as well */
2347
+ if ( stoppricing && !stopearly )
2348
+ stoppricing = FALSE;
2349
+
2350
+ /* update lower bound w.r.t. the lower bound given by the pricer */
2351
+ SCIPnodeUpdateLowerbound (currentnode , stat , set , eventfilter , tree , transprob , origprob , lb , NULL );
2352
+ SCIPsetDebugMsg (set , " -> new lower bound given by pricer %s: %g" , SCIPpricerGetName (set -> pricers [p ]), lb );
2353
+ break ;
2354
+ }
2355
+ default :
2356
+ {
2357
+ SCIPerrorMessage ("pricer <%s> returned invalid result <%d>\n" , SCIPpricerGetName (set -> pricers [p ]), result );
2358
+ return SCIP_INVALIDRESULT ;
2359
+ }
2360
+ } /*lint !e788*/
2343
2361
}
2344
2362
2345
2363
/* apply the priced variables to the LP */
0 commit comments