| 1985 | } |
| 1986 | |
| 1987 | void HighsMipSolverData::evaluateRootNode(HighsMipWorker& worker) { |
| 1988 | const bool compute_analytic_centre = true; |
| 1989 | if (!compute_analytic_centre) printf("NOT COMPUTING ANALYTIC CENTRE!\n"); |
| 1990 | HighsInt maxSepaRounds = mipsolver.submip ? 5 : kHighsIInf; |
| 1991 | if (numRestarts == 0) |
| 1992 | maxSepaRounds = |
| 1993 | std::min(HighsInt(2 * std::sqrt(maxTreeSizeLog2)), maxSepaRounds); |
| 1994 | std::unique_ptr<SymmetryDetectionData> symData; |
| 1995 | highs::parallel::TaskGroup tg; |
| 1996 | HighsProfiling* profiling = mipsolver.profiling_; |
| 1997 | restart: |
| 1998 | profiling->start(kMipClockEvaluateRootNode0); |
| 1999 | |
| 2000 | if (detectSymmetries) { |
| 2001 | profiling->start(kMipClockStartSymmetryDetection); |
| 2002 | startSymmetryDetection(tg, symData); |
| 2003 | profiling->stop(kMipClockStartSymmetryDetection); |
| 2004 | } |
| 2005 | if (compute_analytic_centre && !analyticCenterComputed) { |
| 2006 | if (profiling->mip_) |
| 2007 | highsLogUser( |
| 2008 | mipsolver.options_mip_->log_options, HighsLogType::kInfo, |
| 2009 | "MIP-Timing: %11.2g - starting analytic centre calculation\n", |
| 2010 | mipsolver.timer_.read()); |
| 2011 | profiling->start(kMipClockStartAnalyticCentreComputation); |
| 2012 | startAnalyticCenterComputation(tg); |
| 2013 | profiling->stop(kMipClockStartAnalyticCentreComputation); |
| 2014 | } |
| 2015 | |
| 2016 | // lp.getLpSolver().setOptionValue( |
| 2017 | // "dual_simplex_cost_perturbation_multiplier", 10.0); |
| 2018 | getLp().setIterationLimit(); |
| 2019 | getLp().loadModel(); |
| 2020 | getDomain().clearChangedCols(); |
| 2021 | getLp().setObjectiveLimit(upper_limit); |
| 2022 | |
| 2023 | updateLowerBound(std::max(lower_bound, getDomain().getObjectiveLowerBound())); |
| 2024 | |
| 2025 | printDisplayLine(); |
| 2026 | |
| 2027 | // Possibly query existence of an external solution |
| 2028 | if (!mipsolver.submip) |
| 2029 | mipsolver.mipdata_->queryExternalSolution( |
| 2030 | mipsolver.solution_objective_, |
| 2031 | kExternalMipSolutionQueryOriginEvaluateRootNode0); |
| 2032 | |
| 2033 | // check if only root presolve is allowed |
| 2034 | if (firstrootbasis.valid) |
| 2035 | getLp().getLpSolver().setBasis(firstrootbasis, |
| 2036 | "HighsMipSolverData::evaluateRootNode"); |
| 2037 | else if (mipsolver.options_mip_->mip_root_presolve_only) |
| 2038 | getLp().getLpSolver().setOptionValue("presolve", kHighsOffString); |
| 2039 | else |
| 2040 | getLp().getLpSolver().setOptionValue("presolve", kHighsOnString); |
| 2041 | if (mipsolver.options_mip_->highs_debug_level) |
| 2042 | getLp().getLpSolver().setOptionValue("output_flag", |
| 2043 | mipsolver.options_mip_->output_flag); |
| 2044 | // lp.getLpSolver().setOptionValue("log_dev_level", kHighsLogDevLevelInfo); |
no test coverage detected