Skip to content

Commit

Permalink
remove filter: keep it simple
Browse files Browse the repository at this point in the history
  • Loading branch information
aldma committed Nov 4, 2022
1 parent 92ebfaa commit bf0e2a1
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions src/HALeqO.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function haleqo(
max_iter::Int = 3000,
max_time::Real = 300.0,
max_eval::Int = 100000,
use_filter::Bool = false,
)

start_time = time()
Expand Down Expand Up @@ -77,17 +76,6 @@ function haleqo(
rhoBM = max(1e-8, min(rhoBM, 1e8))
mu = 1.0 / rhoBM

if use_filter
phi_beta = 0.1 # 0 < beta \le 1
phi_V(cviol, optim) = cviol + phi_beta * optim
phi_O(cviol, optim) = cviol * phi_beta + optim
phi_theta = 0.1 # 0 < theta < 1
phi_V_max = phi_V(cviolation, optimality)
phi_O_max = phi_O(cviolation, optimality)
phi_V_max *= phi_theta
phi_O_max *= phi_theta
end

@info log_header(
[:iter, :fx, :cviol, :optim, , :resy],
[Int, T, T, T, T, T],
Expand Down Expand Up @@ -190,20 +178,6 @@ function haleqo(
cviol__old = cviolation
residy = cviolation
@info log_row(Any[iter, fx, cviolation, optimality, mu, "$(iter_type)"])
elseif use_filter && phi_V(cviolation, optimality) phi_V_max
iter_type = :V
phi_V_max *= phi_theta
yhat .= y
subres[nx+1:nx+ny] .= cx
residy = cviolation
@info log_row(Any[iter, fx, cviolation, optimality, mu, "$(iter_type)"])
elseif use_filter && phi_O(cviolation, optimality) phi_O_max
iter_type = :O
phi_O_max *= phi_theta
yhat .= y
subres[nx+1:nx+ny] .= cx
residy = cviolation
@info log_row(Any[iter, fx, cviolation, optimality, mu, "$(iter_type)"])
else
iter_type = :F
@info log_row(Any[iter, fx, cviolation, optimality, mu, residy])
Expand Down

0 comments on commit bf0e2a1

Please sign in to comment.