Skip to content

Commit

Permalink
Add SolverName (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Dec 17, 2018
1 parent 96df1e8 commit 6bdf304
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/MOIWrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ function Optimizer(;kwargs...)
return model
end

MOI.get(::Optimizer, ::MOI.SolverName) = "Gurobi"

function MOI.empty!(model::Optimizer)
MOI.empty!(model, model.env)
setparam!(model.inner, "InfUnbdInfo", 1)
Expand Down
3 changes: 3 additions & 0 deletions test/MOIWrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ end
end
@testset "ModelLike tests" begin
solver = Gurobi.Optimizer()

@test MOI.get(solver, MOI.SolverName()) == "Gurobi"

@testset "nametest" begin
MOIT.nametest(solver)
end
Expand Down

0 comments on commit 6bdf304

Please sign in to comment.