diff --git a/test/mip_01.jl b/test/mip_01.jl index 066d82bb..5c68fffb 100644 --- a/test/mip_01.jl +++ b/test/mip_01.jl @@ -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 @@ -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) @@ -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 diff --git a/test/qp_01.jl b/test/qp_01.jl index f16c5805..bbe8d553 100644 --- a/test/qp_01.jl +++ b/test/qp_01.jl @@ -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