Model Predictive Control for Automated Driving and Collision Avoidance