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

refactor: add points in DYCORS irrespective of best or not #463

Merged
merged 1 commit into from
Jan 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
4 changes: 2 additions & 2 deletions src/Optimization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1047,8 +1047,8 @@ function surrogate_optimize(obj::Function, ::DYCORS, lb::Number, ub::Number,
if f_new < y_best
x_best = x_new
y_best = f_new
add_point!(surr1, x_best, y_best)
end
add_point!(surr1, x_new, f_new)
end
index = argmin(surr1.y)
return (surr1.x[index], surr1.y[index])
Expand Down Expand Up @@ -1189,8 +1189,8 @@ function surrogate_optimize(obj::Function, ::DYCORS, lb, ub, surrn::AbstractSurr
if f_new < y_best
x_best = x_new
y_best = f_new
add_point!(surrn, Tuple(x_best), y_best)
end
add_point!(surrn, Tuple(x_new), f_new)
end
index = argmin(surrn.y)
return (surrn.x[index], surrn.y[index])
Expand Down
Loading