On optimality of nonlinearmodel predictive control