eval_f_and_grad:
feasible_cur = 1; infeasibility_cur = 0;
fcur = f(n, xcur, grad, f_data);
+ stop->nevals++;
if (nlopt_stop_forced(stop)) {
fcur = HUGE_VAL; ret = NLOPT_FORCED_STOP; goto done; }
ii = 0;
case 1: /* objective evaluation only (no gradient) */
feasible_cur = 1; infeasibility_cur = 0;
fcur = f(n, xcur, NULL, f_data);
+ stop->nevals++;
if (nlopt_stop_forced(stop)) {
fcur = HUGE_VAL; ret = NLOPT_FORCED_STOP; goto done; }
ii = 0;
}
/* do some additional termination tests */
- stop->nevals++;
if (nlopt_stop_evals(stop)) ret = NLOPT_MAXEVAL_REACHED;
else if (nlopt_stop_time(stop)) ret = NLOPT_MAXTIME_REACHED;
else if (feasible && *minf < stop->minf_max) ret = NLOPT_MINF_MAX_REACHED;