Fixing algorithm for routes and stops