@@ -246,7 +246,22 @@ namespace lp {
246
246
std::ostream& print_S (std::ostream& out) {
247
247
out << " S:\n " ;
248
248
for (const auto & p : m_k2s.m_map ) {
249
- print_entry (p.second , out);
249
+ print_entry (p.second , out, false , false );
250
+ }
251
+ return out;
252
+ }
253
+
254
+ std::ostream& print_bounds (std::ostream& out) {
255
+ out << " bounds:\n " ;
256
+ for (unsigned v = 0 ; v < m_var_register.size (); ++v) {
257
+ unsigned j = m_var_register.local_to_external (v);
258
+ out << " j" << j << " : " ;
259
+ if (lra.column_has_lower_bound (j))
260
+ out << lra.column_lower_bound (j).x << " <= " ;
261
+ out << " x" << v;
262
+ if (lra.column_has_upper_bound (j))
263
+ out << " <= " << lra.column_upper_bound (j).x ;
264
+ out << " \n " ;
250
265
}
251
266
return out;
252
267
}
@@ -1384,21 +1399,25 @@ namespace lp {
1384
1399
1385
1400
lia_move r = lia_move::undef;
1386
1401
// Process sorted terms
1402
+ TRACE (" dio" ,
1403
+ tout << " changed terms:" ; for (auto j : sorted_changed_terms) tout << j << " " ; tout << std::endl;
1404
+ print_S (tout);
1405
+ print_bounds (tout);
1406
+ );
1387
1407
for (unsigned j : sorted_changed_terms) {
1388
- m_changed_terms.remove (j);
1389
-
1390
-
1408
+ m_changed_terms.remove (j);
1391
1409
if (tighten_bounds_for_term_column (j)) {
1410
+ TRACE (" dio" , tout << " tighten j:" << j << std::endl;);
1392
1411
r = lia_move::conflict;
1393
1412
break ;
1394
1413
}
1395
1414
}
1396
- for (unsigned j : cleanup) {
1397
- m_changed_terms.remove (j);
1398
- }
1415
+ for (unsigned j : cleanup)
1416
+ m_changed_terms.remove (j);
1399
1417
return r;
1400
1418
}
1401
1419
1420
+ #if 0
1402
1421
std::ostream& print_queue(std::queue<unsigned> q, std::ostream& out) {
1403
1422
out << "qu: ";
1404
1423
while (!q.empty()) {
@@ -1408,6 +1427,7 @@ namespace lp {
1408
1427
out << std::endl;
1409
1428
return out;
1410
1429
}
1430
+ #endif
1411
1431
1412
1432
term_o create_term_from_ind_c () {
1413
1433
term_o t;
@@ -2321,10 +2341,13 @@ namespace lp {
2321
2341
}
2322
2342
2323
2343
std::ostream& print_entry (unsigned i, std::ostream& out,
2324
- bool print_dep = false ) {
2325
- out << " entry " << i << " :" ;
2344
+ bool print_dep = false , bool print_in_S = true ) {
2345
+ unsigned j = m_k2s.has_val (i) ? m_k2s.get_key (i) : UINT_MAX;
2346
+ out << " entry " << i << " : " ;
2347
+ if (j != UINT_MAX)
2348
+ out << " x" << j << " " ;
2326
2349
out << " {\n " ;
2327
- print_term_o (get_term_from_entry (i), out << " \t m_e: " ) << " ,\n " ;
2350
+ print_term_o (get_term_from_entry (i), out << " \t " ) << " ,\n " ;
2328
2351
// out << "\tstatus:" << (int)e.m_entry_status;
2329
2352
if (print_dep) {
2330
2353
auto l_term = l_term_from_row (i);
@@ -2339,11 +2362,10 @@ namespace lp {
2339
2362
out << " in F\n " ;
2340
2363
}
2341
2364
else {
2342
- unsigned j = m_k2s.get_key (i);
2343
2365
if (local_to_lar_solver (j) == UINT_MAX) {
2344
2366
out << " FRESH\n " ;
2345
2367
}
2346
- else {
2368
+ else if (print_in_S) {
2347
2369
out << " in S\n " ;
2348
2370
}
2349
2371
}
0 commit comments