66 const std::function<
void()>& feasible_solution_observer);
72 explicit Node(IntegerValue lb) : true_objective(lb), false_objective(lb) {}
75 IntegerValue MinObjective()
const {
76 return std::min(true_objective, false_objective);
80 void UpdateObjective(IntegerValue v) {
81 true_objective = std::max(true_objective, v);
82 false_objective = std::max(false_objective, v);
84 void UpdateTrueObjective(IntegerValue v) {
85 true_objective = std::max(true_objective, v);
87 void UpdateFalseObjective(IntegerValue v) {
88 false_objective = std::max(false_objective, v);
95 literal_index = l.
Index();
111 IntegerValue true_objective;
112 IntegerValue false_objective;
119 bool is_deleted =
false;
122 int64_t basis_timestamp;
128 bool LevelZeroLogic();
132 bool SaveLpBasisOption()
const {
133 return lp_constraint_ !=
nullptr &&
134 parameters_.save_lp_basis_in_lb_tree_search();
139 std::string NodeDebugString(
NodeIndex node)
const;
140 void DebugDisplayTree(
NodeIndex root)
const;
144 void UpdateObjectiveFromParent(
int level);
148 void UpdateParentObjective(
int level);
154 void EnableLpAndLoadBestBasis();
155 void SaveLpBasisInto(Node& node);
156 bool NodeHasUpToDateBasis(
const Node& node)
const;
157 bool NodeHasBasis(
const Node& node)
const;
161 void MarkAsDeletedNodeAndUnreachableSubtree(Node& node);
162 void MarkBranchAsInfeasible(Node& node,
bool true_branch);
163 void MarkSubtreeAsDeleted(
NodeIndex root);
168 void AppendNewNodeToCurrentBranch(
Literal decision);
175 std::vector<Literal> ExtractDecisions(
int base_level,
176 absl::Span<const Literal> conflict);
179 std::string SmallProgressString()
const;
185 std::function<void()> UpdateLpIters(int64_t* counter);
188 const std::string name_;
201 IntegerVariable objective_var_;
202 const SatParameters& parameters_;
209 IntegerValue current_objective_lb_;
212 int num_nodes_in_tree_ = 0;
216 std::vector<NodeIndex> current_branch_;
221 int64_t num_rc_detected_ = 0;
225 int64_t num_decisions_taken_ = 0;
228 int64_t num_lp_iters_at_level_zero_ = 0;
229 int64_t num_lp_iters_save_basis_ = 0;
230 int64_t num_lp_iters_first_branch_ = 0;
231 int64_t num_lp_iters_dive_ = 0;
234 int num_full_restarts_ = 0;
235 int64_t num_decisions_taken_at_last_restart_ = 0;
236 int64_t num_decisions_taken_at_last_level_zero_ = 0;
239 int64_t num_back_to_root_node_ = 0;