Skip to content

Commit ad134c2

Browse files
update documentation and test file for AL algorithm
1 parent ac6c2c1 commit ad134c2

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/AL_alg.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ If adopted, the Hessian is accessed as an abstract operator and need not be the
116116
- `init_subtol::T = T(0.1)`: initial subproblem tolerance;
117117
- `factor_decrease_subtol::T = T(1/4)`: multiplicative factor to decrease the subproblem tolerance;
118118
- `dual_safeguard = (nlp::AugLagModel) -> nothing`: in-place function to modify, as needed, the dual estimate.
119+
- `sub_kwargs::NamedTuple = NamedTuple()`: a named tuple containing the keyword arguments to be sent to the subsolver. The solver will fail if invalid keyword arguments are provided to the subsolver. For example, if the subsolver is R2Solver, you can pass sub_kwargs = (max_iter = 100, σmin = 1e-6,)
119120
120121
# Output
121122

test/test_AL.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ problem_list = [:hs8]
55
for problem in problem_list
66
nlp = eval(problem)(backend = :optimized)
77
for h in (NormL1(1.0),)
8-
stats = AL(nlp, h, subsolver = R2Solver, atol = 1e-3, verbose = 1, subsolver_max_iter = 1000)
8+
stats = AL(nlp, h, subsolver = R2Solver, atol = 1e-3, verbose = 1, sub_kwargs = (max_iter = 1000,))
99
@test stats.status == :first_order
1010
@test stats.primal_feas <= 1e-2
1111
@test stats.dual_feas <= 1e-2
@@ -18,7 +18,7 @@ problem_list = [:hs8]
1818
subsolver = R2NSolver,
1919
atol = 1e-3,
2020
verbose = 1,
21-
subsolver_max_iter = 1000,
21+
sub_kwargs = (max_iter = 1000,),
2222
)
2323
@test stats.status == :first_order
2424
@test stats.primal_feas <= 1e-2

0 commit comments

Comments
 (0)