1818#include < string>
1919#include < vector>
2020
21- #include " absl/flags/flag.h"
22- #include " absl/flags/usage.h"
23- #include " absl/log/globals.h"
24- #include " absl/log/initialize.h"
2521#include " ortools/base/logging.h"
2622#include " ortools/base/version.h"
27- #include " ortools/gurobi/environment.h"
28- #include " ortools/sat/cp_model_solver.h"
29-
30- ABSL_DECLARE_FLAG (std::string, cp_model_dump_prefix);
31- ABSL_DECLARE_FLAG (bool , cp_model_dump_models);
32- ABSL_DECLARE_FLAG (bool , cp_model_dump_submodels);
33- ABSL_DECLARE_FLAG (bool , cp_model_dump_response);
34- ABSL_DECLARE_FLAG (int , stderrthreshold);
23+ #include " ortools/sat/cp_model_solver_helpers.h"
3524
3625namespace operations_research {
3726
@@ -97,10 +86,7 @@ class CppBridge {
9786 *
9887 * This must be called once before any other library from OR-Tools are used.
9988 */
100- static void InitLogging (const std::string& usage) {
101- absl::SetProgramUsageMessage (usage);
102- absl::InitializeLog ();
103- }
89+ static void InitLogging (const std::string& usage);
10490
10591 /* *
10692 * Shutdown the C++ logging layer.
@@ -115,17 +101,7 @@ class CppBridge {
115101 /* *
116102 * Sets all the C++ flags contained in the CppFlags structure.
117103 */
118- static void SetFlags (const CppFlags& flags) {
119- absl::SetFlag (&FLAGS_stderrthreshold, flags.stderrthreshold );
120- absl::EnableLogPrefix (flags.log_prefix );
121- if (!flags.cp_model_dump_prefix .empty ()) {
122- absl::SetFlag (&FLAGS_cp_model_dump_prefix, flags.cp_model_dump_prefix );
123- }
124- absl::SetFlag (&FLAGS_cp_model_dump_models, flags.cp_model_dump_models );
125- absl::SetFlag (&FLAGS_cp_model_dump_submodels,
126- flags.cp_model_dump_submodels );
127- absl::SetFlag (&FLAGS_cp_model_dump_response, flags.cp_model_dump_response );
128- }
104+ static void SetFlags (const CppFlags& flags);
129105
130106 /* *
131107 * Load the gurobi shared library.
@@ -135,9 +111,7 @@ class CppBridge {
135111 * You need to pass the full path, including the shared library file.
136112 * It returns true if the library was found and correctly loaded.
137113 */
138- static bool LoadGurobiSharedLibrary (const std::string& full_library_path) {
139- return LoadGurobiDynamicLibrary ({full_library_path}).ok ();
140- }
114+ static bool LoadGurobiSharedLibrary (const std::string& full_library_path);
141115
142116 /* *
143117 * Delete a temporary C++ byte array.
0 commit comments