@@ -4,6 +4,7 @@ using Symbolics
44using Test
55using SparseArrays
66using ModelingToolkit
7+ using ReverseDiff
78
89rosenbrock (x, p) = (p[1 ] - x[1 ])^ 2 + p[2 ] * (x[2 ] - x[1 ]^ 2 )^ 2
910x0 = zeros (2 )
@@ -54,10 +55,11 @@ function _test_sparse_derivatives_hs071(backend, optimizer)
5455end
5556
5657@testset " backends" begin
57- backends = (Optimization. AutoModelingToolkit (false , false ),
58- Optimization. AutoModelingToolkit (true , false ),
59- Optimization. AutoModelingToolkit (false , true ),
60- Optimization. AutoModelingToolkit (true , true ))
58+ backends = (
59+ AutoForwardDiff (),
60+ AutoReverseDiff (),
61+ AutoSparse (AutoForwardDiff ())
62+ )
6163 for backend in backends
6264 @testset " $backend " begin
6365 _test_sparse_derivatives_hs071 (backend, IpoptOptimizer ())
7173 @named sys = OptimizationSystem ((x - a)^ 2 , [x], [a];)
7274 sys = complete (sys)
7375 prob = OptimizationProblem (sys, [x => 0.0 ]; grad = true , hess = true )
74- cache = init (prob, IpoptOptimizer (); print_level = 0 )
76+ cache = init (prob, IpoptOptimizer (); verbose = false )
7577 @test cache isa OptimizationIpopt. IpoptCache
7678 sol = solve! (cache)
7779 @test sol. u ≈ [1.0 ] # ≈ [1]
105107
106108 @test SciMLBase. successful_retcode (sol)
107109end
110+
111+ # Include additional tests based on Ipopt examples
112+ include (" additional_tests.jl" )
113+ include (" advanced_features.jl" )
114+ include (" problem_types.jl" )
0 commit comments