EECI09: Optimization-based control and embedded programming