Skip to content

Commit

Permalink
Fist double ipop params
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelrojasmiliani committed Jun 14, 2024
1 parent 0c501fc commit efffed2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Optimization/ipopt_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ void IpoptSolverOptions::set_option(const std::string& _option_name,
void IpoptSolverOptions::set_option(const std::string& _option_name,
double _option_value) {
auto iter = std::find_if(
instance().int_options_.begin(), instance().int_options_.end(),
instance().double_options_.begin(), instance().double_options_.end(),
[_option_name](const auto& in) { return in.first == _option_name; });

if (iter == instance().int_options_.end()) {
instance().int_options_.emplace_back(_option_name, _option_value);
if (iter == instance().double_options_.end()) {
instance().double_options_.emplace_back(_option_name, _option_value);
} else {
iter->second = _option_value;
}
Expand Down

0 comments on commit efffed2

Please sign in to comment.