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

Method separationRound

highs/mip/HighsSeparation.cpp:43–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43HighsInt HighsSeparation::separationRound(HighsDomain& propdomain,
44 HighsLpRelaxation::Status& status) {
45 const HighsSolution& sol = lp->getLpSolver().getSolution();
46
47 HighsMipSolverData& mipdata = *lp->getMipSolver().mipdata_;
48
49 auto propagateAndResolve = [&]() {
50 if (propdomain.infeasible() || mipworker_.getGlobalDomain().infeasible()) {
51 status = HighsLpRelaxation::Status::kInfeasible;
52 propdomain.clearChangedCols();
53 return -1;
54 }
55
56 propdomain.propagate();
57 if (propdomain.infeasible()) {
58 status = HighsLpRelaxation::Status::kInfeasible;
59 propdomain.clearChangedCols();
60 return -1;
61 }
62
63 // only modify cliquetable for master worker.
64 if (&propdomain == &mipdata.getDomain())
65 mipdata.cliquetable.cleanupFixed(mipdata.getDomain());
66
67 if (mipworker_.getGlobalDomain().infeasible()) {
68 status = HighsLpRelaxation::Status::kInfeasible;
69 propdomain.clearChangedCols();
70 return -1;
71 }
72
73 int numBoundChgs = (int)propdomain.getChangedCols().size();
74
75 while (!propdomain.getChangedCols().empty()) {
76 lp->setObjectiveLimit(mipworker_.upper_limit);
77 status = lp->resolveLp(&propdomain);
78 if (!lp->scaledOptimal(status)) return -1;
79
80 if (&propdomain == &mipdata.getDomain() &&
81 lp->unscaledDualFeasible(status)) {
82 mipdata.redcostfixing.addRootRedcost(
83 mipdata.mipsolver, lp->getSolution().col_dual, lp->getObjective());
84 if (mipworker_.upper_limit != kHighsInf)
85 mipdata.redcostfixing.propagateRootRedcost(mipdata.mipsolver);
86 }
87 }
88
89 return numBoundChgs;
90 };
91
92 if (!mipdata.parallelLockActive())
93 lp->getMipSolver().profiling_->start(implBoundClock);
94 mipdata.implications.separateImpliedBounds(
95 *lp, lp->getSolution().col_value, mipworker_.getCutPool(),
96 mipdata.feastol, mipworker_.getGlobalDomain(),
97 mipdata.parallelLockActive());
98 if (!mipdata.parallelLockActive())
99 lp->getMipSolver().profiling_->stop(implBoundClock);
100

Callers 1

rootSeparationRoundMethod · 0.80

Calls 15

infeasibleMethod · 0.80
clearChangedColsMethod · 0.80
propagateMethod · 0.80
cleanupFixedMethod · 0.80
setObjectiveLimitMethod · 0.80
resolveLpMethod · 0.80
scaledOptimalMethod · 0.80
unscaledDualFeasibleMethod · 0.80
addRootRedcostMethod · 0.80
propagateRootRedcostMethod · 0.80
parallelLockActiveMethod · 0.80
separateImpliedBoundsMethod · 0.80

Tested by

no test coverage detected