14 #ifndef OR_TOOLS_SAT_CUTS_H_
15 #define OR_TOOLS_SAT_CUTS_H_
41 std::vector<IntegerVariable>
vars;
60 : lp_vars_(lp_vars_.begin(), lp_vars_.end()),
61 integer_trail_(integer_trail),
62 implied_bounds_(implied_bounds) {}
78 std::vector<std::pair<IntegerVariable, IntegerValue>>
terms;
82 IntegerValue
lb = IntegerValue(0);
83 IntegerValue
ub = IntegerValue(0);
87 bool substitute_only_inner_variables, IntegerVariable first_slack,
90 std::vector<LinearConstraint>* implied_bound_cuts)
const;
99 const std::vector<SlackInfo>& info);
121 std::vector<LinearConstraint>* implied_bound_cuts)
const;
123 absl::flat_hash_set<IntegerVariable> lp_vars_;
124 mutable absl::flat_hash_map<IntegerVariable, BestImpliedBoundInfo> cache_;
131 mutable std::vector<std::pair<IntegerVariable, IntegerValue>> tmp_terms_;
163 IntegerValue
GetFactorT(IntegerValue rhs_remainder, IntegerValue divisor,
166 IntegerValue rhs_remainder, IntegerValue divisor, IntegerValue t,
167 IntegerValue max_scaling);
214 std::vector<int> relevant_indices_;
215 std::vector<double> relevant_lp_values_;
216 std::vector<IntegerValue> relevant_coeffs_;
217 std::vector<IntegerValue> relevant_bound_diffs_;
218 std::vector<IntegerValue> divisors_;
219 std::vector<std::pair<int, IntegerValue>> adjusted_coeffs_;
220 std::vector<IntegerValue> remainders_;
221 std::vector<bool> change_sign_at_postprocessing_;
222 std::vector<IntegerValue> rs_;
223 std::vector<IntegerValue> best_rs_;
225 int num_lifted_booleans_ = 0;
226 std::vector<std::pair<IntegerVariable, IntegerValue>> tmp_terms_;
234 const LinearConstraint& constraint,
236 const IntegerTrail& integer_trail);
242 const IntegerTrail& integer_trail);
258 const LinearConstraint& preprocessed_constraint,
260 const IntegerTrail& integer_trail);
279 const LinearConstraint& constraint,
281 const IntegerTrail& integer_trail);
287 const LinearConstraint& preprocessed_constraint,
289 const IntegerTrail& integer_trail);
299 std::vector<LinearConstraint>* knapsack_constraints,
300 IntegerTrail* integer_trail);
312 const LinearConstraint& constraint,
314 const std::vector<IntegerValue>& cut_vars_original_coefficients,
316 LinearConstraint* cut);
369 const std::vector<LinearConstraint>& base_constraints,
370 const std::vector<IntegerVariable>& vars, Model*
model);
390 const std::vector<IntegerVariable>& vars, Model*
model);
430 const IntegerVariable target,
const std::vector<LinearExpression>& exprs,
431 const std::vector<IntegerVariable>& z_vars, Model*
model);
435 IntegerVariable size,
437 Literal presence, Model*
model);
451 const std::vector<IntervalVariable>& intervals,
452 const IntegerVariable
capacity,
const std::vector<IntegerVariable>& demands,
458 #endif // OR_TOOLS_SAT_CUTS_H_