Skip to content

Commit

Permalink
Always initialize normalizers for EGO
Browse files Browse the repository at this point in the history
  • Loading branch information
einar90 committed Aug 14, 2019
1 parent 19e38ce commit dd1c315
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions FieldOpt/Optimization/optimizers/bayesian_optimization/EGO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@ EGO::EGO(Settings::Optimizer *settings,
time_af_opt_ = 0;
settings_ = settings;

initializeNormalizers();

// penalize the base case
if (penalize_) {
double org_ofv = tentative_best_case_->objective_function_value();
double pen_ofv = PenalizedOFV(tentative_best_case_);
tentative_best_case_->set_objective_function_value(pen_ofv);
if (VERB_OPT >=1) {
Printer::ext_info("Penalized base case. "
"Original value: " + Printer::num2str(org_ofv) + "; "
+ "Penalized value: " + Printer::num2str(pen_ofv), "Optimization", "Optimizer");
}
}

int n_cont_vars = variables->ContinousVariableSize();

if (constraint_handler_->HasBoundaryConstraints()) {
Expand Down

0 comments on commit dd1c315

Please sign in to comment.