Reinforcement learning based on real-time iteration NMPC