NLopt - Same complex clalculations in objetive function and nonlinear constraints

In my ignorance, I assumed that one may want to check whether the solution is feasible before computing the objective value.