80 absl::Span<const int> heads,
81 absl::Span<const Literal> literals,
Model* model);
95 bool MakeAugmentingPath(
int start);
101 const int num_variables_;
102 const std::vector<IntegerVariable> variables_;
105 std::vector<std::vector<std::pair<int, Literal>>>
106 variable_to_possible_values_;
114 std::vector<bool> value_visited_;
115 std::vector<bool> variable_visited_;
116 std::vector<int> value_to_variable_;
117 std::vector<int> variable_to_value_;
118 std::vector<int> prev_matching_;
119 std::vector<int> visiting_;
120 std::vector<int> variable_visited_from_;
139 std::vector<int> component_number_;
161 absl::Span<const AffineExpression> expressions,
174 struct CachedBounds {
183 void FillHallReason(IntegerValue hall_lb, IntegerValue hall_ub);
188 bool PropagateLowerBounds();
189 bool PropagateLowerBoundsInternal(IntegerValue min_lb,
190 absl::Span<CachedBounds> bounds);
207 int FindStartIndexAndCompressPath(
int index);
209 int GetIndex(IntegerValue value)
const {
210 DCHECK_GE(value, base_);
211 DCHECK_LT(value - base_, index_to_start_index_.size());
212 return (value - base_).value();
215 IntegerValue GetValue(
int index)
const {
return base_ + IntegerValue(index); }
217 const IntegerTrail& integer_trail_;
218 EnforcementHelper& enforcement_helper_;
219 EnforcementId enforcement_id_;
222 std::vector<CachedBounds> bounds_;
223 std::vector<CachedBounds> negated_bounds_;
226 std::vector<IntegerValue> hall_starts_;
227 std::vector<IntegerValue> hall_ends_;
231 std::vector<int> index_to_start_index_;
232 std::vector<int> index_to_end_index_;
233 SparseBitset<int> index_is_present_;
234 std::vector<AffineExpression> index_to_expr_;
237 std::vector<IntegerLiteral> integer_reason_;