GPLK vs Gurobi speed on simple MIPs

I tried to reproduce your example querying the solve_time (and confirm or disprove (i)) and obtained:

julia> function testGurobi()
           solving_time = 0;
           models_Gurobi=test_speed(m,n,
                 optimizer_with_attributes(() -> Gurobi.Optimizer(env),
                    "OutputFlag" => 0, "MIPGap" => 0.0, "Presolve" => 0))
           for sp in models_Gurobi
               optimize!(sp)
               solving_time += solve_time(sp)
           end
           println(solving_time)
       end
testGurobi (generic function with 1 method)

julia> function testGLPK()
           solving_time = 0;
           models_GLPK=test_speed(m,n,
                 optimizer_with_attributes(GLPK.Optimizer,
                    "msg_lev" => 0, "mip_gap" => 0.0))
           for sp in models_GLPK
               optimize!(sp)
               solving_time += solve_time(sp)
           end
           println(solving_time)
       end
testGLPK (generic function with 1 method)

julia> testGurobi()
2.8382508754730225

julia> testGurobi()
2.666825294494629

julia> testGLPK()
1.2462358474731445

julia> testGLPK()
1.2181751728057861

It seems that (ii) GLPK is indeed faster than Gurobi on these problems. Removing the Presolve parameter makes it worse.

2 Likes