Αποστολή με SMS: Constrained Optimal Control of Linear and Hybrid Systems