| 641 | } |
| 642 | |
| 643 | void HighsSimplexAnalysis::iterationRecord() { |
| 644 | assert(analyse_simplex_summary_data); |
| 645 | HighsInt AnIterCuIt = simplex_iteration_count; |
| 646 | if (rebuild_reason > 0) AnIterNumInvert[rebuild_reason]++; |
| 647 | if (AnIterCuIt > AnIterPrevIt) |
| 648 | AnIterNumEdWtIt[(HighsInt)edge_weight_mode] += (AnIterCuIt - AnIterPrevIt); |
| 649 | |
| 650 | AnIterTraceRec& lcAnIter = AnIterTrace[AnIterTraceNumRec]; |
| 651 | // if (simplex_iteration_count == |
| 652 | // AnIterTraceIterRec[AnIterTraceNumRec]+AnIterTraceIterDl) { |
| 653 | if (simplex_iteration_count == lcAnIter.AnIterTraceIter + AnIterTraceIterDl) { |
| 654 | if (AnIterTraceNumRec == kAnIterTraceMaxNumRec) { |
| 655 | for (HighsInt rec = 1; rec <= kAnIterTraceMaxNumRec / 2; rec++) |
| 656 | AnIterTrace[rec] = AnIterTrace[2 * rec]; |
| 657 | AnIterTraceNumRec = AnIterTraceNumRec / 2; |
| 658 | AnIterTraceIterDl = AnIterTraceIterDl * 2; |
| 659 | } else { |
| 660 | AnIterTraceNumRec++; |
| 661 | AnIterTraceRec& lcAnIter = AnIterTrace[AnIterTraceNumRec]; |
| 662 | lcAnIter.AnIterTraceIter = simplex_iteration_count; |
| 663 | lcAnIter.AnIterTraceTime = timer_->getWallTime(); |
| 664 | if (average_fraction_of_possible_minor_iterations_performed > 0) { |
| 665 | lcAnIter.AnIterTraceMulti = |
| 666 | average_fraction_of_possible_minor_iterations_performed; |
| 667 | } else { |
| 668 | lcAnIter.AnIterTraceMulti = 0; |
| 669 | } |
| 670 | lcAnIter.AnIterTraceDensity[kSimplexNlaFtran] = col_aq_density; |
| 671 | lcAnIter.AnIterTraceDensity[kSimplexNlaBtranEp] = row_ep_density; |
| 672 | lcAnIter.AnIterTraceDensity[kSimplexNlaPriceAp] = row_ap_density; |
| 673 | lcAnIter.AnIterTraceDensity[kSimplexNlaFtranBfrt] = col_aq_density; |
| 674 | if (edge_weight_mode == EdgeWeightMode::kSteepestEdge) { |
| 675 | lcAnIter.AnIterTraceDensity[kSimplexNlaFtranDse] = row_DSE_density; |
| 676 | lcAnIter.AnIterTraceDensity[kSimplexNlaBtranPse] = |
| 677 | col_steepest_edge_density; |
| 678 | lcAnIter.AnIterTraceCostlyDse = costly_DSE_measure; |
| 679 | } else { |
| 680 | lcAnIter.AnIterTraceDensity[kSimplexNlaFtranDse] = 0; |
| 681 | lcAnIter.AnIterTraceCostlyDse = 0; |
| 682 | } |
| 683 | lcAnIter.AnIterTrace_simplex_strategy = (HighsInt)simplex_strategy; |
| 684 | lcAnIter.AnIterTrace_edge_weight_mode = (HighsInt)edge_weight_mode; |
| 685 | } |
| 686 | } |
| 687 | AnIterPrevIt = AnIterCuIt; |
| 688 | updateValueDistribution(primal_step, cleanup_primal_step_distribution); |
| 689 | updateValueDistribution(dual_step, cleanup_dual_step_distribution); |
| 690 | updateValueDistribution(primal_step, primal_step_distribution); |
| 691 | updateValueDistribution(dual_step, dual_step_distribution); |
| 692 | updateValueDistribution(pivot_value_from_column, simplex_pivot_distribution); |
| 693 | updateValueDistribution(factor_pivot_threshold, |
| 694 | factor_pivot_threshold_distribution); |
| 695 | // Only update the distribution of legal values for |
| 696 | // numerical_trouble. Illegal values are set in PAMI since it's not |
| 697 | // known in minor iterations |
| 698 | if (numerical_trouble >= 0) |
| 699 | updateValueDistribution(numerical_trouble, numerical_trouble_distribution); |
| 700 | updateValueDistribution(edge_weight_error, edge_weight_error_distribution); |
no test coverage detected