112 absl::MutexLock mutex_lock(&mutex_);
115 int64_t num_compo = 0;
116 int64_t num_iter = 0;
118 int64_t num_optimal = 0;
119 int64_t num_dual_feasible = 0;
120 int64_t num_dual_unbounded = 0;
123 std::string dimension;
126 int64_t num_constraints = 0;
127 int64_t num_constraint_updates = 0;
128 int64_t num_simplifications = 0;
129 int64_t num_merged_constraints = 0;
130 int64_t num_shortened_constraints = 0;
131 int64_t num_split_constraints = 0;
132 int64_t num_coeff_strenghtening = 0;
133 int64_t num_cuts = 0;
134 int64_t num_add_cut_calls = 0;
137 absl::btree_map<std::string, int> type_to_num_cuts;
140 int64_t total_num_cut_propagations = 0;
141 int64_t total_num_eq_propagations = 0;
142 int64_t num_adjusts = 0;
143 int64_t num_cut_overflows = 0;
144 int64_t num_bad_cuts = 0;
145 int64_t num_scaling_issues = 0;
148 for (
const auto* lp : *lps) {
149 const auto& manager = lp->constraint_manager();
151 num_iter += lp->total_num_simplex_iterations();
152 num_cut += manager.num_cuts();
153 const auto& num_solve_by_status = lp->num_solves_by_status();
156 if (optimal_as_int < num_solve_by_status.size()) {
157 num_optimal += num_solve_by_status[optimal_as_int];
160 const int dual_feasible_as_int =
162 if (dual_feasible_as_int < num_solve_by_status.size()) {
163 num_dual_feasible += num_solve_by_status[dual_feasible_as_int];
166 const int dual_unbounded_as_int =
168 if (dual_unbounded_as_int < num_solve_by_status.size()) {
169 num_dual_unbounded += num_solve_by_status[dual_unbounded_as_int];
173 if (dimension.empty()) dimension = lp->DimensionString();
176 total_num_cut_propagations += lp->total_num_cut_propagations();
177 total_num_eq_propagations += lp->total_num_eq_propagations();
178 num_adjusts += lp->num_adjusts();
179 num_cut_overflows += lp->num_cut_overflows();
180 num_bad_cuts += lp->num_bad_cuts();
181 num_scaling_issues += lp->num_scaling_issues();
184 num_constraints += manager.num_constraints();
185 num_constraint_updates += manager.num_constraint_updates();
186 num_simplifications += manager.num_simplifications();
187 num_merged_constraints += manager.num_merged_constraints();
188 num_shortened_constraints += manager.num_shortened_constraints();
189 num_split_constraints += manager.num_split_constraints();
190 num_coeff_strenghtening += manager.num_coeff_strenghtening();
191 num_cuts += manager.num_cuts();
192 num_add_cut_calls += manager.num_add_cut_calls();
194 for (
const auto& [cut_name, num] : manager.type_to_num_cuts()) {
195 type_to_num_cuts[cut_name] += num;
198 if (num_compo == 0)
return;
205 if (!dimension.empty()) {
209 if (!type_to_num_cuts.empty()) {
210 lp_cut_table_.push_back({std::string(
name), std::move(type_to_num_cuts)});
213 lp_debug_table_.push_back(
264 absl::MutexLock mutex_lock(&mutex_);
267 if (clauses_table_.size() > 1) {
273 if (lp_debug_table_.size() > 1) {
276 if (lp_manager_table_.size() > 1) {
282 if (!lp_cut_table_.empty()) {
284 absl::btree_map<std::string, int> lines;
285 for (
const auto& [_, map] : lp_cut_table_) {
286 for (
const auto& [type_name, _] : map) {
287 lines[type_name] = 0;
292 std::vector<std::vector<std::string>> table;
294 const int num_cols = lp_cut_table_.size() + 1;
295 table.push_back({
"Lp Cut"});
296 table[0].resize(num_cols,
"");
297 for (
const auto& [type_name, _] : lines) {
298 lines[type_name] = line_index++;
299 table.push_back({absl::StrCat(type_name,
":")});
300 table.back().resize(num_cols,
"-");
305 for (
const auto& [
name, map] : lp_cut_table_) {
306 table[0][col_index] =
307 num_cols > 10 &&
name.size() > 6 ?
name.substr(0, 6) :
name;
308 for (
const auto& [type_name, count] : map) {