@@ -43,6 +43,9 @@ function test_jump_cached_knapsack()
4343 @test termination_status (model) == OPTIMAL
4444 @test primal_status (model) == FEASIBLE_POINT
4545 @test all (<= (1 + 1e-6 ), value (x))
46+ F = MOI. ScalarAffineFunction{Float64}
47+ S = MathOptLazy. LazyScalarSet{MOI. LessThan{Float64}}
48+ @test get_attribute (model, MathOptLazy. NumberOfConstraintsActive {F,S} ()) > 0
4649 return
4750end
4851
@@ -54,10 +57,15 @@ function test_jump_direct_knapsack()
5457 @constraint (model, [i in 1 : N], x[i] <= 1 , MathOptLazy. Lazy ())
5558 @constraint (model, sum (abs (cos (i)) * x[i] for i in 1 : N) <= 0.1 * N)
5659 @objective (model, Max, sum (abs (sin (i)) * x[i] for i in 1 : N))
60+ F = MOI. ScalarAffineFunction{Float64}
61+ S = MathOptLazy. LazyScalarSet{MOI. LessThan{Float64}}
62+ attr = MathOptLazy. NumberOfConstraintsActive {F,S} ()
63+ @test MOI. get (backend (model), attr) == 0
5764 optimize! (model)
5865 @test termination_status (model) == OPTIMAL
5966 @test primal_status (model) == FEASIBLE_POINT
6067 @test all (<= (1 + 1e-6 ), value (x))
68+ @test get_attribute (model, attr) > 0
6169 return
6270end
6371
0 commit comments