14 #ifndef OR_TOOLS_SAT_OPTIMIZATION_H_
15 #define OR_TOOLS_SAT_OPTIMIZATION_H_
38 void MinimizeCore(SatSolver* solver, std::vector<Literal>* core);
74 const LinearBooleanProblem& problem,
76 std::vector<bool>* solution);
87 const LinearBooleanProblem& problem,
88 SatSolver* solver, std::vector<bool>* solution);
95 const LinearBooleanProblem& problem,
96 int num_times, SatSolver* solver,
97 std::vector<bool>* solution);
107 const LinearBooleanProblem& problem,
109 std::vector<bool>* solution);
115 LogBehavior log,
const LinearBooleanProblem& problem, SatSolver* solver,
116 std::vector<bool>* solution);
121 LogBehavior log,
const LinearBooleanProblem& problem, SatSolver* solver,
122 std::vector<bool>* solution);
135 IntegerVariable objective_var,
136 const std::function<
void()>& feasible_solution_observer, Model*
model);
141 IntegerVariable objective_var,
142 const std::function<
void()>& feasible_solution_observer, Model*
model);
155 const std::vector<IntegerVariable>& variables,
157 std::function<
void()> feasible_solution_observer,
169 struct ObjectiveTerm {
173 IntegerValue old_var_lb;
177 IntegerValue cover_ub;
183 bool ProcessSolution();
187 bool PropagateObjectiveBounds();
191 bool CoverOptimization();
195 void ComputeNextStratificationThreshold();
197 SatParameters* parameters_;
204 IntegerVariable objective_var_;
205 std::vector<ObjectiveTerm> terms_;
206 IntegerValue stratification_threshold_;
207 std::function<void()> feasible_solution_observer_;
211 bool already_switched_to_linear_scan_ =
false;
237 const std::function<
void()>& feasible_solution_observer,
Model*
model);
242 #endif // OR_TOOLS_SAT_OPTIMIZATION_H_