Control and regulation problems in switching systems