@@ -2214,24 +2214,42 @@ SCIP_RETCODE SCIPpriceLoop(
2214
2214
for ( p = 0 ; p < set -> nactivepricers && !enoughvars ; ++ p )
2215
2215
{
2216
2216
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*/
2235
2253
}
2236
2254
2237
2255
/* apply the priced variables to the LP */
0 commit comments