14#ifndef OR_TOOLS_SAT_LB_TREE_SEARCH_H_
15#define OR_TOOLS_SAT_LB_TREE_SEARCH_H_
24#include "absl/strings/string_view.h"
25#include "absl/time/time.h"
33#include "ortools/sat/sat_parameters.pb.h"
62 const std::function<
void()>& feasible_solution_observer);
68 Node(
Literal l, IntegerValue lb)
69 :
literal(l), true_objective(lb), false_objective(lb) {}
72 IntegerValue MinObjective()
const {
73 return std::min(true_objective, false_objective);
77 void UpdateObjective(IntegerValue v) {
78 true_objective =
std::max(true_objective, v);
79 false_objective =
std::max(false_objective, v);
81 void UpdateTrueObjective(IntegerValue v) {
82 true_objective =
std::max(true_objective, v);
84 void UpdateFalseObjective(IntegerValue v) {
85 false_objective =
std::max(false_objective, v);
92 IntegerValue true_objective;
93 IntegerValue false_objective;
102 void DebugDisplayTree(
NodeIndex root)
const;
106 void UpdateObjectiveFromParent(
int level);
110 void UpdateParentObjective(
int level);
121 IntegerVariable objective_var_;
122 const SatParameters& parameters_;
129 IntegerValue current_objective_lb_;
135 std::vector<NodeIndex> current_branch_;
140 int64_t num_rc_detected_ = 0;
144 int64_t num_decisions_taken_ = 0;
147 int64_t num_decisions_taken_at_last_restart_ = 0;
148 int64_t num_decisions_taken_at_last_import_ = 0;
153 int64_t num_imports_ = 0;
156 absl::Time last_logging_time_;
A simple class to enforce both an elapsed time limit and a deterministic time limit in the same threa...
LbTreeSearch(Model *model)
SatSolver::Status Search(const std::function< void()> &feasible_solution_observer)
Class that owns everything related to a particular optimization model.
Collection of objects used to extend the Constraint Solver library.