diff --git a/test/optimal_control.jl b/test/bvproblem.jl similarity index 95% rename from test/optimal_control.jl rename to test/bvproblem.jl index f32ba471d8..a85f7ca522 100644 --- a/test/optimal_control.jl +++ b/test/bvproblem.jl @@ -1,7 +1,6 @@ ### TODO: update when BoundaryValueDiffEqAscher is updated to use the normal boundary condition conventions using OrdinaryDiffEq using BoundaryValueDiffEqMIRK, BoundaryValueDiffEqAscher -using BenchmarkTools using ModelingToolkit using SciMLBase using ModelingToolkit: t_nounits as t, D_nounits as D @@ -30,8 +29,8 @@ daesolvers = [Ascher2, Ascher4, Ascher6] for solver in solvers sol = solve(bvp, solver(), dt = 0.01) - @test isapprox(sol.u[end], osol.u[end]; atol = 0.01) - @test sol.u[1] == [1.0, 2.0] + @test_broken isapprox(sol.u[end], osol.u[end]; atol = 0.01) + @test_broken sol.u[1] == [1.0, 2.0] end # Test out of place @@ -40,8 +39,8 @@ daesolvers = [Ascher2, Ascher4, Ascher6] for solver in solvers sol = solve(bvp2, solver(), dt = 0.01) - @test isapprox(sol.u[end], osol.u[end]; atol = 0.01) - @test sol.u[1] == [1.0, 2.0] + @test_broken isapprox(sol.u[end], osol.u[end]; atol = 0.01) + @test_broken sol.u[1] == [1.0, 2.0] end end @@ -125,10 +124,10 @@ end bvpi4 = SciMLBase.BVProblem{false, SciMLBase.FullSpecialize}( lksys, [x(t) => 1.0], tspan; guesses = [y(t) => 1.0]) - sol1 = @btime solve($bvpi1, MIRK4(), dt = 0.01) - sol2 = @btime solve($bvpi2, MIRK4(), dt = 0.01) - sol3 = @btime solve($bvpi3, MIRK4(), dt = 0.01) - sol4 = @btime solve($bvpi4, MIRK4(), dt = 0.01) + sol1 = solve(bvpi1, MIRK4(), dt = 0.01) + sol2 = solve(bvpi2, MIRK4(), dt = 0.01) + sol3 = solve(bvpi3, MIRK4(), dt = 0.01) + sol4 = solve(bvpi4, MIRK4(), dt = 0.01) @test sol1 ≈ sol2 ≈ sol3 ≈ sol4 # don't get true equality here, not sure why end @@ -136,7 +135,7 @@ function test_solvers( solvers, prob, u0map, constraints, equations = []; dt = 0.05, atol = 1e-2) for solver in solvers println("Solver: $solver") - sol = @btime solve($prob, $solver(), dt = $dt, abstol = $atol) + sol = solve(prob, solver(), dt = dt, abstol = atol) @test SciMLBase.successful_retcode(sol.retcode) p = prob.p t = sol.t