add 'addNonlinearConstraint' to NonlinearProgramWConstraint, also overload its nonlinearConstraints method.