| 65 | } |
| 66 | |
| 67 | void HEkkDual::majorChooseRow() { |
| 68 | /** |
| 69 | * 0. Initial check to see if we need to do it again |
| 70 | */ |
| 71 | if (ekk_instance_.info_.update_count == 0) multi_chooseAgain = 1; |
| 72 | if (!multi_chooseAgain) return; |
| 73 | multi_chooseAgain = 0; |
| 74 | multi_iteration++; |
| 75 | /** |
| 76 | * Major loop: |
| 77 | * repeat 1-5, until we found a good sets of choices |
| 78 | */ |
| 79 | std::vector<HighsInt> choiceIndex(multi_num, 0); |
| 80 | std::vector<double>& edge_weight = ekk_instance_.dual_edge_weight_; |
| 81 | for (;;) { |
| 82 | // 1. Multiple CHUZR |
| 83 | HighsInt initialCount = 0; |
| 84 | |
| 85 | // Call the hyper-graph method, but partSwitch=0 so just uses |
| 86 | // choose_multi_global |
| 87 | dualRHS.chooseMultiHyperGraphAuto(choiceIndex.data(), &initialCount, |
| 88 | multi_num); |
| 89 | // dualRHS.chooseMultiGlobal(choiceIndex.data(), &initialCount, multi_num); |
| 90 | if (initialCount == 0 && dualRHS.workCutoff == 0) { |
| 91 | // OPTIMAL |
| 92 | return; |
| 93 | } |
| 94 | |
| 95 | // 2. Shrink the size by cutoff |
| 96 | HighsInt choiceCount = 0; |
| 97 | for (HighsInt i = 0; i < initialCount; i++) { |
| 98 | HighsInt iRow = choiceIndex[i]; |
| 99 | if (dualRHS.work_infeasibility[iRow] / edge_weight[iRow] >= |
| 100 | dualRHS.workCutoff) { |
| 101 | choiceIndex[choiceCount++] = iRow; |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | if (initialCount == 0 || choiceCount <= initialCount / 3) { |
| 106 | // Need to do the list again |
| 107 | dualRHS.createInfeasList(ekk_instance_.info_.col_aq_density); |
| 108 | continue; |
| 109 | } |
| 110 | |
| 111 | // 3. Store the choiceIndex to buffer |
| 112 | for (HighsInt ich = 0; ich < multi_num; ich++) |
| 113 | multi_choice[ich].row_out = kNoRowChosen; |
| 114 | for (HighsInt ich = 0; ich < choiceCount; ich++) |
| 115 | multi_choice[ich].row_out = choiceIndex[ich]; |
| 116 | |
| 117 | // 4. Parallel BTRAN and compute weight |
| 118 | majorChooseRowBtran(); |
| 119 | |
| 120 | // 5. Update row densities |
| 121 | for (HighsInt ich = 0; ich < multi_num; ich++) { |
| 122 | if (multi_choice[ich].row_out >= 0) { |
| 123 | const double local_row_ep_density = |
| 124 | (double)multi_choice[ich].row_ep.count / solver_num_row; |
nothing calls this directly
no test coverage detected