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

Method evaluateNode

highs/mip/HighsSearch.cpp:874–1097  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

872}
873
874HighsSearch::NodeResult HighsSearch::evaluateNode() {
875 assert(!nodestack.empty());
876 NodeData& currnode = nodestack.back();
877 const NodeData* parent = getParentNodeData();
878
879 const auto& domchgstack = localdom.getDomainChangeStack();
880
881 if (!inheuristic && currnode.lower_bound > getOptimalityLimit())
882 return NodeResult::kSubOptimal;
883
884 localdom.propagate();
885
886 if (!inheuristic && !localdom.infeasible()) {
887 if (getSymmetries().numPerms > 0 && !currnode.stabilizerOrbits &&
888 (parent == nullptr || !parent->stabilizerOrbits ||
889 !parent->stabilizerOrbits->orbitCols.empty())) {
890 currnode.stabilizerOrbits = getSymmetries().computeStabilizerOrbits(
891 localdom, stabilizerOrbitWorkspace);
892 }
893
894 if (currnode.stabilizerOrbits)
895 currnode.stabilizerOrbits->orbitalFixing(localdom);
896 else
897 getSymmetries().propagateOrbitopes(localdom);
898 }
899 if (parent != nullptr) {
900 int64_t inferences = domchgstack.size() - (currnode.domgchgStackPos + 1);
901
902 pseudocost.addInferenceObservation(
903 parent->branchingdecision.column, inferences,
904 parent->branchingdecision.boundtype == HighsBoundType::kLower);
905 }
906
907 NodeResult result = NodeResult::kOpen;
908
909 if (localdom.infeasible()) {
910 result = NodeResult::kDomainInfeasible;
911 localdom.clearChangedCols();
912 if (parent != nullptr && parent->lp_objective != -kHighsInf &&
913 parent->branching_point != parent->branchingdecision.boundval) {
914 bool upbranch =
915 parent->branchingdecision.boundtype == HighsBoundType::kLower;
916 pseudocost.addCutoffObservation(parent->branchingdecision.column,
917 upbranch);
918 }
919
920 localdom.conflictAnalysis(getConflictPool(), mipworker.getGlobalDomain(),
921 pseudocost);
922 } else {
923 lp->flushDomain(localdom);
924 lp->setObjectiveLimit(getUpperLimit());
925
926#ifndef NDEBUG
927 for (HighsInt i = 0; i != mipsolver.numCol(); ++i) {
928 assert(lp->getLpSolver().getLp().col_lower_[i] ==
929 localdom.col_lower_[i] ||
930 mipsolver.isColContinuous(i));
931 assert(lp->getLpSolver().getLp().col_upper_[i] ==

Callers 3

RENSMethod · 0.80
RINSMethod · 0.80
runMethod · 0.80

Calls 15

propagateMethod · 0.80
infeasibleMethod · 0.80
orbitalFixingMethod · 0.80
propagateOrbitopesMethod · 0.80
clearChangedColsMethod · 0.80
addCutoffObservationMethod · 0.80
conflictAnalysisMethod · 0.80
flushDomainMethod · 0.80
setObjectiveLimitMethod · 0.80
numColMethod · 0.80

Tested by

no test coverage detected