| 453 | } |
| 454 | |
| 455 | HighsDebugStatus debugCompareHighsInfoDouble(const string name, |
| 456 | const HighsOptions& options, |
| 457 | const double v0, const double v1) { |
| 458 | if (v0 == v1) return HighsDebugStatus::kOk; |
| 459 | double delta = highsRelativeDifference(v0, v1); |
| 460 | std::string value_adjective; |
| 461 | HighsLogType report_level; |
| 462 | HighsDebugStatus return_status = HighsDebugStatus::kOk; |
| 463 | if (delta > excessive_relative_solution_param_error) { |
| 464 | value_adjective = "Excessive"; |
| 465 | report_level = HighsLogType::kError; |
| 466 | return_status = HighsDebugStatus::kError; |
| 467 | } else if (delta > large_relative_solution_param_error) { |
| 468 | value_adjective = "Large"; |
| 469 | report_level = HighsLogType::kDetailed; |
| 470 | return_status = HighsDebugStatus::kWarning; |
| 471 | } else { |
| 472 | value_adjective = "OK"; |
| 473 | report_level = HighsLogType::kVerbose; |
| 474 | } |
| 475 | highsLogDev(options.log_options, report_level, |
| 476 | "SolutionPar: %-9s relative difference of %9.4g for %s\n", |
| 477 | value_adjective.c_str(), delta, name.c_str()); |
| 478 | return return_status; |
| 479 | } |
| 480 | |
| 481 | HighsDebugStatus debugCompareHighsInfoInteger(const string name, |
| 482 | const HighsOptions& options, |
no test coverage detected