65 const std::function<
void()>& feasible_solution_observer);
71 explicit Node(IntegerValue lb) : true_objective(lb), false_objective(lb) {}
74 IntegerValue MinObjective()
const {
75 return std::min(true_objective, false_objective);
79 void UpdateObjective(IntegerValue v) {
80 true_objective = std::max(true_objective, v);
81 false_objective = std::max(false_objective, v);
83 void UpdateTrueObjective(IntegerValue v) {
84 true_objective = std::max(true_objective, v);
86 void UpdateFalseObjective(IntegerValue v) {
87 false_objective = std::max(false_objective, v);
94 literal_index = l.
Index();
110 IntegerValue true_objective;
111 IntegerValue false_objective;
118 bool is_deleted =
false;
121 int64_t basis_timestamp;
127 bool LevelZeroLogic();
131 bool SaveLpBasisOption()
const {
132 return lp_constraint_ !=
nullptr &&
133 parameters_.save_lp_basis_in_lb_tree_search();
138 std::string NodeDebugString(
NodeIndex node)
const;
139 void DebugDisplayTree(
NodeIndex root)
const;
143 void UpdateObjectiveFromParent(
int level);
147 void UpdateParentObjective(
int level);
153 void EnableLpAndLoadBestBasis();
154 void SaveLpBasisInto(Node& node);
155 bool NodeHasUpToDateBasis(
const Node& node)
const;
156 bool NodeHasBasis(
const Node& node)
const;
160 void MarkAsDeletedNodeAndUnreachableSubtree(Node& node);
161 void MarkBranchAsInfeasible(Node& node,
bool true_branch);
162 void MarkSubtreeAsDeleted(
NodeIndex root);
167 void AppendNewNodeToCurrentBranch(
Literal decision);
174 std::vector<Literal> ExtractDecisions(
int base_level,
175 absl::Span<const Literal> conflict);
178 std::string SmallProgressString()
const;
184 std::function<void()> UpdateLpIters(int64_t* counter);
187 const std::string name_;
200 IntegerVariable objective_var_;
201 const SatParameters& parameters_;
208 IntegerValue current_objective_lb_;
211 int num_nodes_in_tree_ = 0;
215 std::vector<NodeIndex> current_branch_;
220 int64_t num_rc_detected_ = 0;
224 int64_t num_decisions_taken_ = 0;
227 int64_t num_lp_iters_at_level_zero_ = 0;
228 int64_t num_lp_iters_save_basis_ = 0;
229 int64_t num_lp_iters_first_branch_ = 0;
230 int64_t num_lp_iters_dive_ = 0;
233 int num_full_restarts_ = 0;
234 int64_t num_decisions_taken_at_last_restart_ = 0;
235 int64_t num_decisions_taken_at_last_level_zero_ = 0;
238 int64_t num_back_to_root_node_ = 0;