free(p); ret = NLOPT_OUT_OF_MEMORY;
}
if (nlopt_stop_evals(stop)) ret = NLOPT_MAXEVAL_REACHED;
- else if (nlopt_stop_time(stop)) ret = NLOPT_MAXEVAL_REACHED;
+ else if (nlopt_stop_time(stop)) ret = NLOPT_MAXTIME_REACHED;
else if (p->f < stop->minf_max) ret = NLOPT_MINF_MAX_REACHED;
while (ret == NLOPT_SUCCESS) {
free(p); ret = NLOPT_OUT_OF_MEMORY;
}
if (nlopt_stop_evals(stop)) ret = NLOPT_MAXEVAL_REACHED;
- else if (nlopt_stop_time(stop)) ret = NLOPT_MAXEVAL_REACHED;
+ else if (nlopt_stop_time(stop)) ret = NLOPT_MAXTIME_REACHED;
else if (p->f < stop->minf_max) ret = NLOPT_MINF_MAX_REACHED;
else {
find_closest_pt(n, &d.pts, p);