21 VLOG(1) << num_deductions_ <<
" enqueued deductions.";
22 VLOG(1) << bounds_.size() <<
" implied bounds stored.";
23 VLOG(1) << num_enqueued_in_var_to_bounds_
24 <<
" implied bounds with view stored.";
28 if (!parameters_.use_implied_bounds())
return;
29 const IntegerVariable
var = integer_literal.
var;
32 if (
var >= level_zero_lower_bounds_.
size()) {
41 if (integer_literal.
bound <= level_zero_lower_bounds_[
var]) {
54 const auto key = std::make_pair(
literal.Index(),
var);
55 auto insert_result = bounds_.insert({key, integer_literal.
bound});
56 if (!insert_result.second) {
57 if (insert_result.first->second < integer_literal.
bound) {
58 insert_result.first->second = integer_literal.
bound;
72 const auto it = bounds_.find(std::make_pair(
literal.NegatedIndex(),
var));
73 if (it != bounds_.end()) {
74 if (it->second <= level_zero_lower_bounds_[
var]) {
79 const IntegerValue deduction =
89 level_zero_lower_bounds_[
var] = deduction;
90 new_level_zero_bounds_.
Set(
var);
92 VLOG(1) <<
"Deduction old: "
99 if (it->second == deduction) {
102 if (integer_literal.
bound == deduction) {
103 bounds_.erase(std::make_pair(
literal.Index(),
var));
125 if (var_to_bounds_.size() <=
var) {
126 var_to_bounds_.resize(
var.value() + 1);
129 ++num_enqueued_in_var_to_bounds_;
130 has_implied_bounds_.
Set(
var);
132 integer_literal.
bound,
true});
135 if (var_to_bounds_.size() <=
var) {
136 var_to_bounds_.resize(
var.value() + 1);
139 ++num_enqueued_in_var_to_bounds_;
140 has_implied_bounds_.
Set(
var);
141 var_to_bounds_[
var].push_back(
143 integer_literal.
bound,
false});
148 IntegerVariable
var) {
149 if (
var >= var_to_bounds_.size())
return empty_implied_bounds_;
156 std::vector<ImpliedBoundEntry>& ref = var_to_bounds_[
var];
157 const IntegerValue level_zero_lb =
std::max(
159 level_zero_lower_bounds_[
var] = level_zero_lb;
161 if (entry.lower_bound <= level_zero_lb)
continue;
162 ref[new_size++] = entry;
170 if (!parameters_.use_implied_bounds())
return;
173 tmp_integer_literals_.clear();
176 Add(first_decision, lit);
182 for (
const IntegerVariable
var :