MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / debugBasisCorrect

Method debugBasisCorrect

highs/simplex/HEkkDebug.cpp:822–848  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

820}
821
822HighsDebugStatus 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
850HighsDebugStatus HEkk::debugBasisConsistent() const {
851 // Cheap analysis of a Simplex basis, checking vector sizes, numbers

Callers 1

debugRetainedDataOkMethod · 0.95

Calls 3

debugBasisConsistentMethod · 0.95
debugNonbasicMoveMethod · 0.95
highsLogDevFunction · 0.85

Tested by

no test coverage detected