Skip to content

Commit

Permalink
Allow force_stop with dimension elimination
Browse files Browse the repository at this point in the history
Closes #317
  • Loading branch information
jschueller committed Apr 12, 2020
1 parent d5c0d06 commit a063207
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api/optimize.c
Original file line number Diff line number Diff line change
Expand Up @@ -851,13 +851,15 @@ nlopt_result NLOPT_STDCALL nlopt_optimize(nlopt_opt opt, double *x, double *opt_
goto done;
}
elimdim_shrink(opt->n, x, opt->lb, opt->ub);
opt->force_stop_child = elim_opt;
}

ret = nlopt_optimize_(elim_opt, x, opt_f);

if (elim_opt != opt) {
elimdim_destroy(elim_opt);
elimdim_expand(opt->n, x, opt->lb, opt->ub);
opt->force_stop_child = NULL;
}
}

Expand Down

0 comments on commit a063207

Please sign in to comment.