Skip to content

Commit

Permalink
Merge pull request #112 from macroenergy/julia-gurobi-version-bug
Browse files Browse the repository at this point in the history
Fixed a bug in the environment-making script for cases where Gurobi version >= v10.0
  • Loading branch information
RuaridhMacd authored Dec 12, 2022
2 parents 676bb83 + 11af714 commit fbcf0fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion julenv.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fbcf0fd

Please sign in to comment.