Skip to content

Commit

Permalink
closed #56
Browse files Browse the repository at this point in the history
  • Loading branch information
kibaekkim committed Aug 15, 2023
1 parent 1e40b25 commit 8538e9f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/algorithms/admm_one_level.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ function admm_one_level(
break
end

# residual balancing
if rb_switch
if info.primres > par.rb_beta1 * info.dualres
sol.rho .*= par.rb_tau
elseif par.rb_beta2 * info.primres < info.dualres
sol.rho ./= par.rb_tau
end
end

end # while outer
end # @timed

Expand Down
8 changes: 8 additions & 0 deletions src/utils/environment.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ mutable struct Parameters
rt_inc::Float64 #? not used
rt_dec::Float64 #? not used
eta::Float64 #? not used
rb_switch::Bool # residual balancing on/off
rb_tau::Float64 # residual balancing multiplier
rb_beta1::Float64 # residual balancing criterion
rb_beta2::Float64 # residual balancing criterion
verbose::Int

# MPI implementation
Expand Down Expand Up @@ -51,6 +55,10 @@ mutable struct Parameters
par.rt_inc = 2.0
par.rt_dec = 2.0
par.eta = 0.99
par.rb_switch = false
par.rb_tau = 2
par.rb_beta1 = 10
par.rb_beta2 = 10
par.max_auglag = 50
par.ABSTOL = 1e-6
par.RELTOL = 1e-5
Expand Down

0 comments on commit 8538e9f

Please sign in to comment.