| 820 | } |
| 821 | |
| 822 | HighsDebugStatus HEkk::debugBasisCorrect(const HighsLp* lp) const { |
| 823 | // Nontrivially expensive analysis of a Simplex basis, checking |
| 824 | // consistency, and then correctness of nonbasicMove |
| 825 | const HighsOptions& options = *(this->options_); |
| 826 | if (options.highs_debug_level < kHighsDebugLevelCheap) |
| 827 | return HighsDebugStatus::kNotChecked; |
| 828 | HighsDebugStatus return_status = HighsDebugStatus::kOk; |
| 829 | const bool consistent = |
| 830 | this->debugBasisConsistent() != HighsDebugStatus::kLogicalError; |
| 831 | if (!consistent) { |
| 832 | highsLogDev(options.log_options, HighsLogType::kError, |
| 833 | "Supposed to be a Simplex basis, but not consistent\n"); |
| 834 | assert(consistent); |
| 835 | return_status = HighsDebugStatus::kLogicalError; |
| 836 | } |
| 837 | if (options.highs_debug_level < kHighsDebugLevelCostly) return return_status; |
| 838 | const bool correct_nonbasicMove = |
| 839 | this->debugNonbasicMove(lp) != HighsDebugStatus::kLogicalError; |
| 840 | if (!correct_nonbasicMove) { |
| 841 | highsLogDev( |
| 842 | options.log_options, HighsLogType::kError, |
| 843 | "Supposed to be a Simplex basis, but nonbasicMove is incorrect\n"); |
| 844 | assert(correct_nonbasicMove); |
| 845 | return_status = HighsDebugStatus::kLogicalError; |
| 846 | } |
| 847 | return return_status; |
| 848 | } |
| 849 | |
| 850 | HighsDebugStatus HEkk::debugBasisConsistent() const { |
| 851 | // Cheap analysis of a Simplex basis, checking vector sizes, numbers |
no test coverage detected