Skip to content

Commit

Permalink
support gurobi 12
Browse files Browse the repository at this point in the history
  • Loading branch information
lperron committed Nov 20, 2024
1 parent 50f5f95 commit 92cc57b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ortools/gurobi/environment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,9 @@ void LoadGurobiFunctions(DynamicLibrary* gurobi_dynamic_library) {
std::vector<std::string> GurobiDynamicLibraryPotentialPaths() {
std::vector<std::string> potential_paths;
const std::vector<std::string> kGurobiVersions = {
"1103", "1102", "1101", "1100", "1003", "1002", "1001", "1000", "952",
"951", "950", "911", "910", "903", "902", "811", "801", "752"};
"1201", "1200", "1103", "1102", "1101", "1100", "1003",
"1002", "1001", "1000", "952", "951", "950", "911",
"910", "903", "902", "811", "801", "752"};
potential_paths.reserve(kGurobiVersions.size() * 3);

// Look for libraries pointed by GUROBI_HOME first.
Expand Down Expand Up @@ -411,8 +412,8 @@ std::vector<std::string> GurobiDynamicLibraryPotentialPaths() {

#if defined(__GNUC__) // path in linux64 gurobi/optimizer docker image.
for (const std::string& version :
{"11.0.3", "11.0.2", "11.0.1", "11.0.0", "10.0.3", "10.0.2", "10.0.1",
"10.0.0", "9.5.2", "9.5.1", "9.5.0"}) {
{"12.0.1", "12.0.0", "11.0.3", "11.0.2", "11.0.1", "11.0.0", "10.0.3",
"10.0.2", "10.0.1", "10.0.0", "9.5.2", "9.5.1", "9.5.0"}) {
potential_paths.push_back(
absl::StrCat("/opt/gurobi/linux64/lib/libgurobi.so.", version));
}
Expand Down

0 comments on commit 92cc57b

Please sign in to comment.