@@ -241,30 +241,32 @@ namespace lp {
241
241
242
242
auto refine_bound = [&](implied_bound const & ib) {
243
243
unsigned j = ib.m_j ;
244
- auto const & bound = ib.m_bound ;
245
- if (!lra.column_is_int (j)) // for now, ignore non-integers.
246
- return l_undef;
244
+ rational bound = ib.m_bound ;
247
245
if (ib.m_is_lower_bound ) {
246
+ if (lra.column_is_int (j))
247
+ bound = ceil (bound);
248
248
if (lra.column_has_lower_bound (j) && lra.column_lower_bound (j) >= bound)
249
249
return l_undef;
250
250
auto d = ib.explain_implied ();
251
- if (lra.column_has_upper_bound (j) && lra.column_upper_bound (j) < ceil ( bound) ) {
251
+ if (lra.column_has_upper_bound (j) && lra.column_upper_bound (j) < bound) {
252
252
set_conflict (j, d, lra.get_column_upper_bound_witness (j));
253
253
return l_false;
254
254
}
255
255
256
- lra.update_column_type_and_bound (j, lconstraint_kind::GE, ceil ( bound) , d);
256
+ lra.update_column_type_and_bound (j, ib. m_strict ? lconstraint_kind::GT : lconstraint_kind:: GE, bound, d);
257
257
++num_refined_bounds;
258
258
} else {
259
+ if (lra.column_is_int (j))
260
+ bound = floor (bound);
259
261
if (lra.column_has_upper_bound (j) && lra.column_upper_bound (j) <= bound)
260
262
return l_undef;
261
263
auto d = ib.explain_implied ();
262
- if (lra.column_has_lower_bound (j) && lra.column_lower_bound (j) > floor ( bound) ) {
264
+ if (lra.column_has_lower_bound (j) && lra.column_lower_bound (j) > bound) {
263
265
set_conflict (j, d, lra.get_column_lower_bound_witness (j));
264
266
return l_false;
265
267
}
266
268
267
- lra.update_column_type_and_bound (j, lconstraint_kind::LE, floor ( bound) , d);
269
+ lra.update_column_type_and_bound (j, ib. m_strict ? lconstraint_kind::LT : lconstraint_kind:: LE, bound, d);
268
270
++num_refined_bounds;
269
271
}
270
272
return l_true;
@@ -284,7 +286,6 @@ namespace lp {
284
286
ibounds.clear ();
285
287
}
286
288
287
- verbose_stream () << num_refined_bounds << " \n " ;
288
289
return num_refined_bounds > 0 ? lia_move::continue_with_check : lia_move::undef;
289
290
}
290
291
0 commit comments