Optimization routes and stops detection