Skip to content

Commit cf130d1

Browse files
add augmented lagrangian tests
1 parent 8070c16 commit cf130d1

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/test_AL.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
problem_list = ["HS8",]
2+
3+
@testset "Augmented Lagrangian" begin
4+
for problem_name in problem_list
5+
nlp = CUTEstModel(problem_name)
6+
for h in (NormL1(1.0), NormL2(1.0))
7+
stats = AL(nlp, h, atol = 1e-3, verbose = 1)
8+
@test stats.status == :first_order
9+
@test stats.primal_feas <= 1e-2
10+
@test stats.dual_feas <= 1e-2
11+
@test length(stats.solution) == nlp.meta.nvar
12+
@test typeof(stats.solution) == typeof(nlp.meta.x0)
13+
end
14+
finalize(nlp)
15+
end
16+
end

0 commit comments

Comments
 (0)