56 const CpModelProto& in_model,
bool first_copy =
false,
57 std::function<
bool(
int)> active_constraints =
nullptr);
71 return interval_mapping_;
77 bool CreateUnsatModel(
int c,
const ConstraintProto& ct);
80 bool PrepareEnforcementCopy(
const ConstraintProto& ct);
81 bool PrepareEnforcementCopyWithDup(
const ConstraintProto& ct);
82 void FinishEnforcementCopy(ConstraintProto* ct);
85 bool CopyBoolOr(
const ConstraintProto& ct);
86 bool CopyBoolOrWithDupSupport(
const ConstraintProto& ct);
87 bool FinishBoolOrCopy();
89 bool CopyBoolAnd(
const ConstraintProto& ct);
90 bool CopyBoolAndWithDupSupport(
const ConstraintProto& ct);
92 bool CopyAtMostOne(
const ConstraintProto& ct);
93 bool CopyExactlyOne(
const ConstraintProto& ct);
95 bool CopyElement(
const ConstraintProto& ct);
96 bool CopyIntProd(
const ConstraintProto& ct,
bool ignore_names);
97 bool CopyIntDiv(
const ConstraintProto& ct,
bool ignore_names);
98 bool CopyIntMod(
const ConstraintProto& ct,
bool ignore_names);
99 bool CopyLinear(
const ConstraintProto& ct,
bool canonicalize);
100 bool CopyLinearExpression(
const LinearExpressionProto& expr,
101 LinearExpressionProto* dst,
102 absl::Span<const int> enforcement_literals = {});
103 bool CopyAutomaton(
const ConstraintProto& ct);
104 bool CopyTable(
const ConstraintProto& ct);
105 bool CopyAllDiff(
const ConstraintProto& ct);
106 bool CopyLinMax(
const ConstraintProto& ct);
111 bool CopyInterval(
const ConstraintProto& ct,
int c,
bool ignore_names);
112 bool AddLinearConstraintForInterval(
const ConstraintProto& ct);
117 void CopyAndMapNoOverlap(
const ConstraintProto& ct);
118 void CopyAndMapNoOverlap2D(
const ConstraintProto& ct);
119 bool CopyAndMapCumulative(
const ConstraintProto& ct);
121 PresolveContext* context_;
124 std::vector<int> non_fixed_variables_;
125 std::vector<int64_t> non_fixed_coefficients_;
126 std::vector<int64_t> interval_mapping_;
127 int starting_constraint_index_ = 0;
129 std::vector<int> temp_enforcement_literals_;
130 absl::flat_hash_set<int> temp_enforcement_literals_set_;
132 std::vector<int> temp_literals_;
133 absl::flat_hash_set<int> temp_literals_set_;
135 ConstraintProto tmp_constraint_;