@@ -443,18 +443,17 @@ function test_problem_issue_105(model)
443
443
end
444
444
445
445
function _test_vOptLib_instance (model, instance)
446
- root = joinpath (dirname (dirname ( @__DIR__ ) ), " instances" )
446
+ root = joinpath (dirname (@__DIR__ ), " instances" )
447
447
src = MOI. FileFormats. MOF. Model ()
448
448
MOI. read_from_file (src, joinpath (root, " models" , instance * " .mof.json" ))
449
449
MOI. copy_to (model, src)
450
450
MOI. optimize! (model)
451
+ x = MOI. get (model, MOI. ListOfVariableIndices ())
451
452
solutions = JSON. parsefile (joinpath (root, " solutions" , instance * " .json" ))
452
453
@test MOI. get (model, MOI. ResultCount ()) == length (solutions)
453
- atol = 1e-6
454
- x = MOI. get (model, MOI. ListOfVariableIndices ())
455
454
for (i, sol) in enumerate (solutions)
456
- @test isapprox (MOI. get (model, MOI. VariablePrimal (i), x), sol[" X" ]; atol)
457
- @test isapprox (MOI. get (model, MOI. ObjectiveValue (i)), sol[" Y" ]; atol)
455
+ @test ≈ (MOI. get (model, MOI. VariablePrimal (i), x), sol[" X" ]; atol = 1e-6 )
456
+ @test ≈ (MOI. get (model, MOI. ObjectiveValue (i)), sol[" Y" ]; atol = 1e-6 )
458
457
end
459
458
return
460
459
end
0 commit comments