On interfacing model predictive controllers with a real-time optimizer