Skip to content

Commit

Permalink
Merge pull request #108 from plusk01/fix/nlopt-invalid-init-step-size
Browse files Browse the repository at this point in the history
fix incorrect check on nlopt initial step size
  • Loading branch information
rikba authored Jan 11, 2021
2 parents 5aec26d + 62c5014 commit ce70b62
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ int PolynomialOptimizationNonLinear<_N>::optimizeTimeAndFreeConstraints() {
double x = initial_solution[i];
const double abs_x = std::abs(x);
// Initial step size cannot be 0.0 --> invalid arg
if (abs_x <= std::numeric_limits<double>::lowest()) {
if (abs_x <= std::numeric_limits<double>::epsilon()) {
initial_step.push_back(1e-13);
} else {
initial_step.push_back(optimization_parameters_.initial_stepsize_rel *
Expand Down

0 comments on commit ce70b62

Please sign in to comment.