NL constrained optimization with generalized function in decision variable