@@ -201,18 +201,20 @@ bool diversity_manager_t<i_t, f_t>::run_presolve(f_t time_limit)
201201 compute_probing_cache (ls.constraint_prop .bounds_update , *problem_ptr, probing_timer);
202202 if (problem_is_infeasible) { return false ; }
203203 }
204- const bool remap_cache_ids = true ;
205- trivial_presolve (*problem_ptr, remap_cache_ids);
206- if (!problem_ptr->empty && !check_bounds_sanity (*problem_ptr)) { return false ; }
207- // May overconstrain if Papilo presolve has been run before
208- if (context.settings .presolver == presolver_t ::None) {
209- if (!problem_ptr->empty ) {
210- // do the resizing no-matter what, bounds presolve might not change the bounds but initial
211- // trivial presolve might have
212- ls.constraint_prop .bounds_update .resize (*problem_ptr);
213- ls.constraint_prop .conditional_bounds_update .update_constraint_bounds (
214- *problem_ptr, ls.constraint_prop .bounds_update );
215- if (!check_bounds_sanity (*problem_ptr)) { return false ; }
204+ if (!presolve_timer.check_time_limit ()) {
205+ const bool remap_cache_ids = true ;
206+ trivial_presolve (*problem_ptr, remap_cache_ids);
207+ if (!problem_ptr->empty && !check_bounds_sanity (*problem_ptr)) { return false ; }
208+ // May overconstrain if Papilo presolve has been run before
209+ if (context.settings .presolver == presolver_t ::None) {
210+ if (!problem_ptr->empty ) {
211+ // do the resizing no-matter what, bounds presolve might not change the bounds but initial
212+ // trivial presolve might have
213+ ls.constraint_prop .bounds_update .resize (*problem_ptr);
214+ ls.constraint_prop .conditional_bounds_update .update_constraint_bounds (
215+ *problem_ptr, ls.constraint_prop .bounds_update );
216+ if (!check_bounds_sanity (*problem_ptr)) { return false ; }
217+ }
216218 }
217219 }
218220 stats.presolve_time = presolve_timer.elapsed_time ();
0 commit comments