@@ -443,18 +443,17 @@ function test_problem_issue_105(model)
443443end
444444
445445function _test_vOptLib_instance (model, instance)
446- root = joinpath (dirname (dirname ( @__DIR__ ) ), " instances" )
446+ root = joinpath (dirname (@__DIR__ ), " instances" )
447447 src = MOI. FileFormats. MOF. Model ()
448448 MOI. read_from_file (src, joinpath (root, " models" , instance * " .mof.json" ))
449449 MOI. copy_to (model, src)
450450 MOI. optimize! (model)
451+ x = MOI. get (model, MOI. ListOfVariableIndices ())
451452 solutions = JSON. parsefile (joinpath (root, " solutions" , instance * " .json" ))
452453 @test MOI. get (model, MOI. ResultCount ()) == length (solutions)
453- atol = 1e-6
454- x = MOI. get (model, MOI. ListOfVariableIndices ())
455454 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 )
458457 end
459458 return
460459end
0 commit comments