Efficient Real-Time Solutions for Nonlinear Model Predictive Control with Applications