A relaxation based approach to optimal control of hybrid and switched systems. (2018)