|
35 | 35 | @testset "No constraint" begin |
36 | 36 | for adtype in [AutoEnzyme(), AutoForwardDiff(), AutoZygote(), AutoReverseDiff(), |
37 | 37 | AutoFiniteDiff(), AutoModelingToolkit(), AutoSparseForwardDiff(), |
38 | | - AutoSparseReverseDiff(), AutoSparse(AutoZygote()), AutoModelingToolkit(true, true)] |
| 38 | + AutoSparseReverseDiff(), AutoSparse(AutoZygote()), AutoModelingToolkit(true, true), AutoMooncake()] |
39 | 39 | optf = OptimizationFunction(rosenbrock, adtype) |
40 | 40 |
|
41 | 41 | prob = OptimizationProblem(optf, x0) |
|
67 | 67 | @testset "One constraint" begin |
68 | 68 | for adtype in [AutoEnzyme(), AutoForwardDiff(), AutoZygote(), AutoReverseDiff(), |
69 | 69 | AutoFiniteDiff(), AutoModelingToolkit(), AutoSparseForwardDiff(), |
70 | | - AutoSparseReverseDiff(), AutoSparse(AutoZygote()), AutoModelingToolkit(true, true)] |
| 70 | + AutoSparseReverseDiff(), AutoSparse(AutoZygote()), AutoModelingToolkit(true, true), AutoMooncake()] |
71 | 71 | cons = (res, x, p) -> (res[1] = x[1]^2 + x[2]^2 - 1.0; return nothing) |
72 | 72 | optf = OptimizationFunction(rosenbrock, adtype, cons = cons) |
73 | 73 |
|
|
85 | 85 | @testset "Two constraints" begin |
86 | 86 | for adtype in [AutoForwardDiff(), AutoZygote(), AutoReverseDiff(), |
87 | 87 | AutoFiniteDiff(), AutoModelingToolkit(), AutoSparseForwardDiff(), |
88 | | - AutoSparseReverseDiff(), AutoSparse(AutoZygote()), AutoModelingToolkit(true, true)] |
| 88 | + AutoSparseReverseDiff(), AutoSparse(AutoZygote()), AutoModelingToolkit(true, true), AutoMooncake()] |
89 | 89 | function con2_c(res, x, p) |
90 | 90 | res[1] = x[1]^2 + x[2]^2 |
91 | 91 | res[2] = x[2] * sin(x[1]) - x[1] |
|
0 commit comments