Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust ALM Lambda update #50

Merged
merged 1 commit into from
Apr 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/Optimisers/AugmentedLagrangian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ struct AugmentedLagrangian{N,O} <: Optimiser
stencil :: AdvectionStencil{O},
vel_ext :: VelocityExtension,
φ0;
Λ_max = 5.0, ζ = 1.1, update_mod = 5, reinit_mod = 1, γ = 0.1, γ_reinit = 0.5,
Λ_max = 10^10, ζ = 1.1, update_mod = 5, reinit_mod = 1, γ = 0.1, γ_reinit = 0.5,
os_γ_mult = 0.75, maxiter = 1000, verbose=false, constraint_names = map(i -> Symbol("C_$i"),1:N),
converged::Function = default_al_converged, debug = false,
has_oscillations::Function = default_has_oscillations,
Expand Down Expand Up @@ -209,8 +209,12 @@ function Base.iterate(m::AugmentedLagrangian,state)

## Augmented Lagrangian method
λ .= λ .- Λ .* C
if iszero(it % update_mod)
Λ .= @.(min(Λ*ζ,Λ_max))
if iszero(it % update_mod)
for i = 1:length(C)
if abs(C[i])>0.01
Λ[i] = min(Λ[i]*ζ,Λ_max)
end
end
end

## Compute dL and it's projection
Expand Down
Loading