Skip to content

Commit

Permalink
decouple the update technique for current_best_internal from current_…
Browse files Browse the repository at this point in the history
…best
  • Loading branch information
Dimitri Rusin committed Nov 13, 2023
1 parent a0f3b59 commit e9101b0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/ioh/problem/structures.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,17 @@ namespace ioh
void update(const MetaData &meta_data, const Solution<T, double> &objective)
{
++evaluations;

has_improved = meta_data.optimization_type(current_internal.y, current_best_internal.y);
if (has_improved)
{
current_best_internal = current_internal;
}

has_improved = meta_data.optimization_type(current.y, current_best.y);
if (has_improved)
{
y_unconstrained_best = y_unconstrained;
current_best_internal = current_internal;
current_best = current;

if (objective.y == current.y)
Expand Down

0 comments on commit e9101b0

Please sign in to comment.