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

Method debugRetainedDataOk

highs/simplex/HEkkDebug.cpp:787–820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

785}
786
787HighsDebugStatus HEkk::debugRetainedDataOk(const HighsLp& lp) const {
788 if (!this->status_.initialised_for_new_lp ||
789 this->options_->highs_debug_level < kHighsDebugLevelCostly)
790 return HighsDebugStatus::kNotChecked;
791 HighsDebugStatus return_status = HighsDebugStatus::kOk;
792
793 const HighsOptions& options = *(this->options_);
794 if (this->status_.has_basis) {
795 HighsDebugStatus call_status = this->debugBasisCorrect(&lp);
796 const bool basis_correct =
797 debugDebugToHighsStatus(call_status) != HighsStatus::kError;
798 if (!basis_correct) {
799 highsLogDev(options.log_options, HighsLogType::kError,
800 "Supposed to be a Simplex basis, but incorrect\n");
801 assert(basis_correct);
802 return_status = HighsDebugStatus::kLogicalError;
803 }
804 }
805
806 if (this->status_.has_invert) {
807 HighsDebugStatus call_status =
808 this->debugNlaCheckInvert("HEkk::debugRetainedDataOk");
809 const bool invert_ok =
810 debugDebugToHighsStatus(call_status) != HighsStatus::kError;
811 if (!invert_ok) {
812 highsLogDev(
813 options.log_options, HighsLogType::kError,
814 "Supposed to be a simplex basis inverse, but too inaccurate\n");
815 assert(invert_ok);
816 return_status = HighsDebugStatus::kLogicalError;
817 }
818 }
819 return return_status;
820}
821
822HighsDebugStatus HEkk::debugBasisCorrect(const HighsLp* lp) const {
823 // Nontrivially expensive analysis of a Simplex basis, checking

Callers 2

solveLpSimplexFunction · 0.80
returnFromHighsMethod · 0.80

Calls 4

debugBasisCorrectMethod · 0.95
debugNlaCheckInvertMethod · 0.95
debugDebugToHighsStatusFunction · 0.85
highsLogDevFunction · 0.85

Tested by

no test coverage detected