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

Function objectiveOk

check/TestMipSolver.cpp:844–853  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

842*/
843
844bool objectiveOk(const double optimal_objective,
845 const double require_optimal_objective, const bool dev_run) {
846 double error = std::fabs(optimal_objective - require_optimal_objective) /
847 std::max(1.0, std::fabs(require_optimal_objective));
848 bool error_ok = error < 1e-10;
849 if (!error_ok && dev_run)
850 printf("Objective is %g but require %g (error %g)\n", optimal_objective,
851 require_optimal_objective, error);
852 return error_ok;
853}
854
855void solve(Highs& highs, std::string presolve,
856 const HighsModelStatus require_model_status,

Callers 2

TestMipSolver.cppFile · 0.85
solveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected