From 580ab46b9490cdb3285a55ebf986d66ea96776d3 Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Mon, 16 Oct 2023 15:36:04 +0200 Subject: [PATCH] fix #3948 --- ortools/sat/cp_model_loader.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ortools/sat/cp_model_loader.cc b/ortools/sat/cp_model_loader.cc index 8adcd6bf5e..35dbe06e5b 100644 --- a/ortools/sat/cp_model_loader.cc +++ b/ortools/sat/cp_model_loader.cc @@ -23,6 +23,7 @@ #include #include +#include "absl/container/btree_map.h" #include "absl/container/btree_set.h" #include "absl/container/flat_hash_map.h" #include "absl/container/flat_hash_set.h" @@ -680,7 +681,7 @@ void ExtractElementEncoding(const CpModelProto& model_proto, Model* m) { if (ct.constraint_case() != ConstraintProto::kExactlyOne) continue; // Project the implied values onto each integer variable. - absl::flat_hash_map> + absl::btree_map> var_to_value_literal_list; for (const int l : ct.exactly_one().literals()) { const Literal literal = mapping->Literal(l); @@ -690,7 +691,7 @@ void ExtractElementEncoding(const CpModelProto& model_proto, Model* m) { } } - // VLOG info. + // Used for logging only. std::vector encoded_variables; std::string encoded_variables_str;