We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f10d1c commit 1827570Copy full SHA for 1827570
test/test_jump.jl
@@ -59,4 +59,21 @@ const aoc_moi = AOCoptimizer.MOI
59
end
60
61
62
+@testset verbose=verbose "Test JuMP conversions" begin
63
+ @testset "Compute objective function correctly" begin
64
+ model = Model(aoc_moi.Optimizer[])
65
+ @variable(model, x, Bin)
66
+ @variable(model, y, Bin)
67
+ @variable(model, -1 <= z <= 5)
68
+ @objective(model, Min, x - y * z)
69
+
70
+ optimize!(model)
71
72
+ @test value(x) ∈ [0, 1]
73
+ @test value(y) ∈ [0, 1]
74
+ @test -1 ≤ value(z) ≤ 5
75
+ @test objective_value(model) ≈ value(x) - value(y) * value(z)
76
+ end
77
+end
78
79
end # module
0 commit comments