@@ -79,9 +79,9 @@ function test_knapsack_min_p3()
79
79
]
80
80
N = MOI. get (model, MOI. ResultCount ())
81
81
x_sol = hcat ([MOI. get (model, MOI. VariablePrimal (i), x) for i in 1 : N]. .. )
82
- @test isapprox (x_sol, X_E' ; atol = 1e-6 )
83
- y_sol = hcat ([MOI. get (model, MOI. ObjectiveValue (i)) for i in 1 : N]. .. )
84
- @test isapprox (y_sol, Y_N' ; atol = 1e-6 )
82
+ @test isapprox (sort ( x_sol; dims = 1 ), sort ( X_E' ; dims = 1 ) ; atol = 1e-6 )
83
+ y_sol = vcat ([MOI. get (model, MOI. ObjectiveValue (i))' for i in 1 : N]. .. )
84
+ @test isapprox (sort ( y_sol; dims = 1 ), sort ( Y_N; dims = 1 ) ; atol = 1e-6 )
85
85
return
86
86
end
87
87
@@ -138,9 +138,9 @@ function test_knapsack_max_p3()
138
138
]
139
139
N = MOI. get (model, MOI. ResultCount ())
140
140
x_sol = hcat ([MOI. get (model, MOI. VariablePrimal (i), x) for i in 1 : N]. .. )
141
- @test isapprox (x_sol, X_E' ; atol = 1e-6 )
142
- y_sol = hcat ([MOI. get (model, MOI. ObjectiveValue (i)) for i in 1 : N]. .. )
143
- @test isapprox (y_sol, Y_N' ; atol = 1e-6 )
141
+ @test isapprox (sort ( x_sol; dims = 1 ), sort ( X_E' ; dims = 1 ) ; atol = 1e-6 )
142
+ y_sol = vcat ([MOI. get (model, MOI. ObjectiveValue (i))' for i in 1 : N]. .. )
143
+ @test isapprox (sort ( y_sol; dims = 1 ), sort ( Y_N; dims = 1 ) ; atol = 1e-6 )
144
144
return
145
145
end
146
146
@@ -204,9 +204,9 @@ function test_knapsack_min_p4()
204
204
]
205
205
N = MOI. get (model, MOI. ResultCount ())
206
206
x_sol = hcat ([MOI. get (model, MOI. VariablePrimal (i), x) for i in 1 : N]. .. )
207
- @test isapprox (x_sol, X_E' ; atol = 1e-6 )
208
- y_sol = hcat ([MOI. get (model, MOI. ObjectiveValue (i)) for i in 1 : N]. .. )
209
- @test isapprox (y_sol, Y_N' ; atol = 1e-6 )
207
+ @test isapprox (sort ( x_sol; dims = 1 ), sort ( X_E' ; dims = 1 ) ; atol = 1e-6 )
208
+ y_sol = vcat ([MOI. get (model, MOI. ObjectiveValue (i))' for i in 1 : N]. .. )
209
+ @test isapprox (sort ( y_sol; dims = 1 ), sort ( Y_N; dims = 1 ) ; atol = 1e-6 )
210
210
return
211
211
end
212
212
@@ -270,9 +270,9 @@ function test_knapsack_max_p4()
270
270
]
271
271
N = MOI. get (model, MOI. ResultCount ())
272
272
x_sol = hcat ([MOI. get (model, MOI. VariablePrimal (i), x) for i in 1 : N]. .. )
273
- @test isapprox (x_sol, X_E' ; atol = 1e-6 )
274
- y_sol = hcat ([MOI. get (model, MOI. ObjectiveValue (i)) for i in 1 : N]. .. )
275
- @test isapprox (y_sol, Y_N' ; atol = 1e-6 )
273
+ @test isapprox (sort ( x_sol; dims = 1 ), sort ( X_E' ; dims = 1 ) ; atol = 1e-6 )
274
+ y_sol = vcat ([MOI. get (model, MOI. ObjectiveValue (i))' for i in 1 : N]. .. )
275
+ @test isapprox (sort ( y_sol; dims = 1 ), sort ( Y_N; dims = 1 ) ; atol = 1e-6 )
276
276
return
277
277
end
278
278
@@ -380,9 +380,9 @@ function test_assignment_min_p3()
380
380
N = MOI. get (model, MOI. ResultCount ())
381
381
x_sol =
382
382
hcat ([MOI. get (model, MOI. VariablePrimal (i), vec (x)) for i in 1 : N]. .. )
383
- @test isapprox (x_sol, X_E' ; atol = 1e-6 )
384
- y_sol = hcat ([MOI. get (model, MOI. ObjectiveValue (i)) for i in 1 : N]. .. )
385
- @test isapprox (y_sol, Y_N' ; atol = 1e-6 )
383
+ @test isapprox (sort ( x_sol; dims = 1 ), sort ( X_E' ; dims = 1 ) ; atol = 1e-6 )
384
+ y_sol = vcat ([MOI. get (model, MOI. ObjectiveValue (i))' for i in 1 : N]. .. )
385
+ @test isapprox (sort ( y_sol; dims = 1 ), sort ( Y_N; dims = 1 ) ; atol = 1e-6 )
386
386
return
387
387
end
388
388
@@ -490,9 +490,9 @@ function test_assignment_max_p3()
490
490
N = MOI. get (model, MOI. ResultCount ())
491
491
x_sol =
492
492
hcat ([MOI. get (model, MOI. VariablePrimal (i), vec (x)) for i in 1 : N]. .. )
493
- @test isapprox (x_sol, X_E' ; atol = 1e-6 )
494
- y_sol = hcat ([MOI. get (model, MOI. ObjectiveValue (i)) for i in 1 : N]. .. )
495
- @test isapprox (y_sol, Y_N' ; atol = 1e-6 )
493
+ @test isapprox (sort ( x_sol; dims = 1 ), sort ( X_E' ; dims = 1 ) ; atol = 1e-6 )
494
+ y_sol = vcat ([MOI. get (model, MOI. ObjectiveValue (i))' for i in 1 : N]. .. )
495
+ @test isapprox (sort ( y_sol; dims = 1 ), sort ( Y_N; dims = 1 ) ; atol = 1e-6 )
496
496
return
497
497
end
498
498
@@ -583,7 +583,7 @@ function test_time_limit()
583
583
return
584
584
end
585
585
586
- function __FAIL__test_vector_of_variables_objective ()
586
+ function test_vector_of_variables_objective ()
587
587
model = MOI. instantiate (; with_bridge_type = Float64) do
588
588
return MOA. Optimizer (HiGHS. Optimizer)
589
589
end
0 commit comments