File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -5536,7 +5536,8 @@ bool CpModelPresolver::PresolveAllDiff(ConstraintProto* ct) {
55365536
55375537 // Detect duplicate expressions, and remove impossible values from expressions
55385538 // with the same variable.
5539- absl::flat_hash_map<int, std::vector<std::pair<int64_t, int64_t>>> terms;
5539+ // We use btree_map to have a deterministic order.
5540+ absl::btree_map<int, std::vector<std::pair<int64_t, int64_t>>> terms;
55405541 std::vector<int64_t> forbidden_values;
55415542 for (const LinearExpressionProto& expr : all_diff.exprs()) {
55425543 if (expr.vars_size() != 1) continue;
@@ -5598,7 +5599,7 @@ bool CpModelPresolver::PresolveAllDiff(ConstraintProto* ct) {
55985599 }
55995600
56005601 if (all_diff.exprs_size() == union_of_domains.Size()) {
5601- absl::flat_hash_map <int64_t, UniqueNonNegativeValue> value_to_index;
5602+ absl::btree_map <int64_t, UniqueNonNegativeValue> value_to_index;
56025603 for (int i = 0; i < all_diff.exprs_size(); ++i) {
56035604 const LinearExpressionProto& expr = all_diff.exprs(i);
56045605 DCHECK_EQ(expr.vars_size(), 1);
You can’t perform that action at this time.
0 commit comments