@@ -104,15 +104,15 @@ function test_optimalcontrol_solve_api()
104104 # _modeler_options_keys / _solver_options_keys should match options_keys
105105 method_ad_ip = (:collocation , :adnlp , :ipopt )
106106 Test. @test Set (OptimalControl. _modeler_options_keys (method_ad_ip)) ==
107- Set (CTModels. options_keys (OptimalControl. ADNLP))
107+ Set (CTModels. options_keys (OptimalControl. ADNLP))
108108 Test. @test Set (OptimalControl. _solver_options_keys (method_ad_ip)) ==
109- Set (CTModels. options_keys (OptimalControl. Ipopt))
109+ Set (CTModels. options_keys (OptimalControl. Ipopt))
110110
111111 method_exa_mad = (:collocation , :exa , :madnlp )
112112 Test. @test Set (OptimalControl. _modeler_options_keys (method_exa_mad)) ==
113- Set (CTModels. options_keys (OptimalControl. Exa))
113+ Set (CTModels. options_keys (OptimalControl. Exa))
114114 Test. @test Set (OptimalControl. _solver_options_keys (method_exa_mad)) ==
115- Set (CTModels. options_keys (OptimalControl. MadNLP))
115+ Set (CTModels. options_keys (OptimalControl. MadNLP))
116116
117117 # Multiple symbols of the same family in a method should raise an error
118118 Test. @test_throws OptimalControl. IncorrectArgument OptimalControl. _get_modeler_symbol ((
@@ -147,11 +147,12 @@ function test_optimalcontrol_solve_api()
147147 # Modeler options normalization helper
148148 Test. @test OptimalControl. _normalize_modeler_options (nothing ) === NamedTuple ()
149149 Test. @test OptimalControl. _normalize_modeler_options ((backend= :manual ,)) ==
150- (backend= :manual ,)
150+ (backend= :manual ,)
151151 Test. @test OptimalControl. _normalize_modeler_options ((; backend= :manual )) ==
152- (backend= :manual ,)
152+ (backend= :manual ,)
153153
154- Test. @testset " description ambiguity pre-check (ownerless key)" verbose = VERBOSE showtiming = SHOWTIMING begin
154+ Test. @testset " description ambiguity pre-check (ownerless key)" verbose = VERBOSE showtiming =
155+ SHOWTIMING begin
155156 method = (:collocation , :adnlp , :ipopt )
156157
157158 # foo does not correspond to any tool nor to solve -> error
@@ -189,7 +190,9 @@ function test_optimalcontrol_solve_api()
189190 owners_amb = Symbol[:discretizer , :solver ]
190191 err = nothing
191192 try
192- OptimalControl. _route_option_for_description (:foo , 1.0 , owners_amb, :description )
193+ OptimalControl. _route_option_for_description (
194+ :foo , 1.0 , owners_amb, :description
195+ )
193196 catch e
194197 err = e
195198 end
@@ -255,7 +258,8 @@ function test_optimalcontrol_solve_api()
255258 ))
256259 end
257260
258- Test. @testset " description-mode solve/tool disambiguation" verbose = VERBOSE showtiming = SHOWTIMING begin
261+ Test. @testset " description-mode solve/tool disambiguation" verbose = VERBOSE showtiming =
262+ SHOWTIMING begin
259263 init = OCDummyInit ([1.0 , 2.0 ])
260264
261265 # 1) Alias i tagged :solve -> used as initial_guess, not kept in other_kwargs
@@ -298,7 +302,8 @@ function test_optimalcontrol_solve_api()
298302 end
299303 end
300304
301- Test. @testset " explicit-mode solve kwarg aliases" verbose = VERBOSE showtiming = SHOWTIMING begin
305+ Test. @testset " explicit-mode solve kwarg aliases" verbose = VERBOSE showtiming =
306+ SHOWTIMING begin
302307 prob = OCDummyOCP ()
303308 init = OCDummyInit ([1.0 , 2.0 ])
304309
@@ -390,7 +395,8 @@ function test_optimalcontrol_solve_api()
390395 # Unit test: solve(ocp, init, discretizer, modeler, solver)
391396 # ========================================================================
392397
393- Test. @testset " solve(ocp, init, discretizer, modeler, solver)" verbose = VERBOSE showtiming = SHOWTIMING begin
398+ Test. @testset " solve(ocp, init, discretizer, modeler, solver)" verbose = VERBOSE showtiming =
399+ SHOWTIMING begin
394400 prob = OCDummyOCP ()
395401 init = OCDummyInit ([1.0 , 2.0 ])
396402
@@ -558,7 +564,8 @@ function test_optimalcontrol_solve_api()
558564 # OCP level with @init (Ipopt, ADNLP)
559565 # ------------------------------------------------------------------
560566
561- Test. @testset " OCP level with @init (Ipopt, ADNLP)" verbose = VERBOSE showtiming = SHOWTIMING begin
567+ Test. @testset " OCP level with @init (Ipopt, ADNLP)" verbose = VERBOSE showtiming =
568+ SHOWTIMING begin
562569 init_macro = OptimalControl. @init ocp begin
563570 x := [0.05 , 0.1 ]
564571 u := 0.1
@@ -577,7 +584,8 @@ function test_optimalcontrol_solve_api()
577584 # OCP level: keyword-based API solve(ocp; ...)
578585 # ------------------------------------------------------------------
579586
580- Test. @testset " OCP level keyword API (Ipopt, ADNLP)" verbose = VERBOSE showtiming = SHOWTIMING begin
587+ Test. @testset " OCP level keyword API (Ipopt, ADNLP)" verbose = VERBOSE showtiming =
588+ SHOWTIMING begin
581589 modeler = OptimalControl. ADNLP (; backend= :manual )
582590 solver = OptimalControl. Ipopt (; ipopt_options... )
583591 sol = solve (
@@ -608,7 +616,8 @@ function test_optimalcontrol_solve_api()
608616 ]
609617
610618 for (method_syms, options) in desc_cases
611- Test. @testset " description = $(method_syms) " verbose = VERBOSE showtiming = SHOWTIMING begin
619+ Test. @testset " description = $(method_syms) " verbose = VERBOSE showtiming =
620+ SHOWTIMING begin
612621 sol = solve (
613622 ocp, method_syms... ; initial_guess= init, display= false , options...
614623 )
@@ -628,7 +637,8 @@ function test_optimalcontrol_solve_api()
628637
629638 # modeler_options is allowed in description mode and forwarded to the
630639 # modeler constructor.
631- Test. @testset " description API with modeler_options" verbose = VERBOSE showtiming = SHOWTIMING begin
640+ Test. @testset " description API with modeler_options" verbose = VERBOSE showtiming =
641+ SHOWTIMING begin
632642 sol = solve (
633643 ocp,
634644 :collocation ,
@@ -645,7 +655,8 @@ function test_optimalcontrol_solve_api()
645655
646656 # Tagged options using the (value, tool) convention: discretizer options
647657 # are explicitly routed to the discretizer, and Ipopt options to the solver.
648- Test. @testset " description API with explicit tool tags" verbose = VERBOSE showtiming = SHOWTIMING begin
658+ Test. @testset " description API with explicit tool tags" verbose = VERBOSE showtiming =
659+ SHOWTIMING begin
649660 sol = solve (
650661 ocp,
651662 :collocation ,
@@ -739,7 +750,8 @@ function test_optimalcontrol_solve_api()
739750 # OCP level keyword API (Ipopt, ADNLP)
740751 # ------------------------------------------------------------------
741752
742- Test. @testset " OCP level keyword API (Ipopt, ADNLP)" verbose = VERBOSE showtiming = SHOWTIMING begin
753+ Test. @testset " OCP level keyword API (Ipopt, ADNLP)" verbose = VERBOSE showtiming =
754+ SHOWTIMING begin
743755 modeler = OptimalControl. ADNLP (; backend= :manual )
744756 solver = OptimalControl. Ipopt (; ipopt_options... )
745757 sol = solve (
@@ -770,7 +782,8 @@ function test_optimalcontrol_solve_api()
770782 ]
771783
772784 for (method_syms, options) in desc_cases
773- Test. @testset " description = $(method_syms) " verbose = VERBOSE showtiming = SHOWTIMING begin
785+ Test. @testset " description = $(method_syms) " verbose = VERBOSE showtiming =
786+ SHOWTIMING begin
774787 sol = solve (
775788 ocp_g,
776789 method_syms... ;
@@ -793,4 +806,4 @@ function test_optimalcontrol_solve_api()
793806 end
794807 end
795808 end
796- end
809+ end
0 commit comments