Skip to content

Commit

Permalink
Merge pull request #104 from JuliaOpt/v7.5-tests
Browse files Browse the repository at this point in the history
Fix tests for Gurobi v7.5
  • Loading branch information
joehuchette authored Jul 13, 2017
2 parents 353c476 + 3a71744 commit 4c3792d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions test/mip_01.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# an example on mixed integer programming
#
# maximize x + 2 y + 5 z
# maximize x + 3 y + 5 z
#
# s.t. x + y + z <= 10
# x + 2 y + z <= 15
Expand All @@ -18,7 +18,7 @@ using Gurobi, Base.Test
model = Gurobi.Model(env, "mip_01", :maximize)

add_cvar!(model, 1., 0., 5.) # x
add_ivar!(model, 2., 0, 10) # y
add_ivar!(model, 3., 0, 10) # y
add_bvar!(model, 5.) # z
update_model!(model)

Expand All @@ -29,5 +29,5 @@ using Gurobi, Base.Test

optimize(model)
@test get_solution(model) == [0.0, 7.0, 1.0]
@test get_objval(model) == 19.0
@test get_objval(model) == 26.0
end
2 changes: 1 addition & 1 deletion test/qp_01.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ using Gurobi, Base.Test
optimize(model)

@test isapprox(get_solution(model), [0.25, 0.75], atol=1e-4)
@test get_objval(model) == 1.875
@test get_objval(model) 1.875
end

0 comments on commit 4c3792d

Please sign in to comment.