From 11af714a970c50a8f78463444a273dbc1e2efe24 Mon Sep 17 00:00:00 2001 From: Ruaridh Macdonald Date: Mon, 5 Dec 2022 16:28:17 -0500 Subject: [PATCH] Fixed a bug for cases where Gurobi version >= v10.0 --- julenv.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/julenv.jl b/julenv.jl index 44857f06d..738aed247 100644 --- a/julenv.jl +++ b/julenv.jl @@ -21,7 +21,9 @@ function get_gurobi_version() try res = read(`gurobi_cl --version`, String) res = split(res, ".") - gurobi_ver = string("$(res[1][end]).$(res[2])") + major = split(res[1], " ")[end] + minor = res[2] + gurobi_ver = string("$(major).$(minor)") gurobi_ver = parse(Float64, gurobi_ver) return gurobi_ver catch e