Model-Based Reinforcement Learning in Continuous Environments Using Real-Time Constrained Optimization