@@ -260,9 +260,14 @@ optprob.cons_h(H3, x0)
260260 G2 = Array {Float64} (undef, 2 )
261261 H2 = Array {Float64} (undef, 2 , 2 )
262262
263- optf = OptimizationFunction (rosenbrock, DifferentiationInterface. SecondOrder (ADTypes. AutoFiniteDiff (), ADTypes. AutoReverseDiff ()), cons = cons)
263+ optf = OptimizationFunction (rosenbrock,
264+ DifferentiationInterface. SecondOrder (
265+ ADTypes. AutoFiniteDiff (), ADTypes. AutoReverseDiff ()),
266+ cons = cons)
264267 optprob = OptimizationBase. instantiate_function (
265- optf, x0, DifferentiationInterface. SecondOrder (ADTypes. AutoFiniteDiff (), ADTypes. AutoReverseDiff ()),
268+ optf, x0,
269+ DifferentiationInterface. SecondOrder (
270+ ADTypes. AutoFiniteDiff (), ADTypes. AutoReverseDiff ()),
266271 nothing , 1 , g = true , h = true , hv = true ,
267272 cons_j = true , cons_h = true , cons_vjp = true ,
268273 cons_jvp = true , lag_h = true )
489494 H2 = Array {Float64} (undef, 2 , 2 )
490495
491496 optf = OptimizationFunction (
492- rosenbrock, DifferentiationInterface. SecondOrder (ADTypes. AutoFiniteDiff (), ADTypes. AutoReverseDiff ()), cons = con2_c)
497+ rosenbrock, DifferentiationInterface. SecondOrder (
498+ ADTypes. AutoFiniteDiff (), ADTypes. AutoReverseDiff ()),
499+ cons = con2_c)
493500 optprob = OptimizationBase. instantiate_function (
494- optf, x0, DifferentiationInterface. SecondOrder (ADTypes. AutoFiniteDiff (), ADTypes. AutoReverseDiff ()),
501+ optf, x0,
502+ DifferentiationInterface. SecondOrder (
503+ ADTypes. AutoFiniteDiff (), ADTypes. AutoReverseDiff ()),
495504 nothing , 2 , g = true , h = true , hv = true ,
496505 cons_j = true , cons_h = true , cons_vjp = true ,
497506 cons_jvp = true , lag_h = true )
@@ -737,12 +746,15 @@ end
737746 @test lag_H ≈ lag_H_expected
738747 @test nnz (lag_H) == 5
739748
740- optf = OptimizationFunction (sparse_objective, AutoSparse (DifferentiationInterface. SecondOrder (ADTypes. AutoForwardDiff (), ADTypes. AutoZygote ())),
749+ optf = OptimizationFunction (sparse_objective,
750+ AutoSparse (DifferentiationInterface. SecondOrder (
751+ ADTypes. AutoForwardDiff (), ADTypes. AutoZygote ())),
741752 cons = sparse_constraints)
742753
743754 # Instantiate the optimization problem
744755 optprob = OptimizationBase. instantiate_function (optf, x0,
745- AutoSparse (DifferentiationInterface. SecondOrder (ADTypes. AutoForwardDiff (), ADTypes. AutoZygote ())),
756+ AutoSparse (DifferentiationInterface. SecondOrder (
757+ ADTypes. AutoForwardDiff (), ADTypes. AutoZygote ())),
746758 nothing , 2 , g = true , h = true , cons_j = true , cons_h = true , lag_h = true )
747759 # Test gradient
748760 G = zeros (3 )
0 commit comments