Planning Routes for Mobile Repair Technicians

How to turn a list of geocoded repair jobs into realistic daily routes: the routing problem in plain terms, the inputs that matter, heuristics versus optimization solvers, and how to keep plans honest once the day starts.

A mobile repair technician's day is a sequence of decisions: which job first, which next, and whether there is time to fit in the urgent call that just came in. Getting the order right is the difference between six jobs and eight, and between customers who get a reliable arrival time and customers who wait in all afternoon. This article explains how route planning for technicians works, what data it needs, and where simple approaches break down.

The problem in plain terms

Planning one technician's route through a handful of stops is a version of the traveling salesman problem: visit every stop once and return home by the shortest route. Add several technicians, appointment slots and limits on what each van can carry and it becomes the vehicle routing problem with time windows (VRPTW). In plain terms: given a set of jobs, each with a location, a duration and an allowed arrival window, and a set of technicians with shifts, skills and vans, assign jobs to technicians and order them so that every window is met and total travel is as low as possible.

The number of possible orders grows factorially. Five jobs for one technician have 120 orderings; ten have over 3.6 million; fifteen have more than a trillion. Real solvers therefore do not try every option. They build a good solution quickly and improve it with local changes (swap two jobs, move one job to another technician, reverse a segment) until improvements stop or a time limit is reached.

The inputs that matter

InputWhat it isCommon mistake
Geocoded jobsLatitude and longitude for each job, ideally the building entranceUsing a street or district centroid, which can be hundreds of meters off
Service durationExpected time on site, by job typeOne fixed duration for every job
Time windowsEarliest and latest arrival the customer acceptedTreating a preference as a hard constraint (or the reverse)
SkillsCapabilities a job needs, such as hydraulic brakes or e-bike motor diagnosticsAssigning by proximity alone
Capacity and partsWhat the van can carry: stock, tires, batteries, space for a bike taken back to the workshopPlanning a job the van has no parts for
Shifts and breaksStart and end location, working hours, mandatory breaksAssuming every technician starts at the depot

Geocoding quality sets the ceiling for everything else. Geocode at booking time, confirm the pin with the customer when the match is approximate, and store the coordinates with the job. The guide to geocoding an address covers how to judge match quality. Public geocoding services, including Nominatim's public instance (limited to one request per second) and this site's own API, are not designed for bulk batch runs, so geocode jobs as they arrive rather than all at once each morning.

Travel times: why straight lines are not enough

A solver needs a matrix of travel times (and usually distances) between every pair of locations. Straight-line distance, which you can compute with the distance calculator, is a fine first approximation for teaching and for rough feasibility checks, but it underestimates real travel, and by different amounts in different directions: a river crossing or one-way system can make A-to-B very different from B-to-A.

Several mature open-source routing engines build road-network matrices from OpenStreetMap data:

  • OSRM (Open Source Routing Machine), a fast C++ engine with a table service for matrices.
  • Valhalla, a C++ engine with multiple costing models (car, bicycle, pedestrian and others), matrices and isochrones.
  • GraphHopper, a Java routing engine with configurable vehicle profiles.

None of these include live traffic by default. If your city has strong rush-hour patterns, either use a traffic-aware commercial matrix or apply your own time-of-day multipliers learned from past trips.

Nearest neighbor versus optimization solvers

The simplest heuristic is greedy nearest neighbor: from the current position, always go to the closest unvisited job. It is easy to implement and often noticeably longer than the best route, for a predictable reason: it makes good early choices and leaves the scattered leftovers for the end of the day, when the technician has to cross the whole area to reach them. It also ignores time windows entirely.

Optimization solvers handle the full problem. Two widely used open-source options:

  • VROOM (Vehicle Routing Open-source Optimization Machine) solves VRPTW and related problems with time windows, multi-dimensional capacities, skills, priorities and driver breaks. It reads a JSON problem, and can fetch its matrix from OSRM, openrouteservice or Valhalla, or accept your own.
  • Google OR-Tools is a general optimization library whose routing module supports time windows, capacities, pickups and deliveries and custom constraints. It is more flexible and requires more modeling code.

For a small team, a reasonable path is: nearest neighbor for a prototype, then VROOM with an OSRM or Valhalla matrix, then OR-Tools only if you need constraints VROOM does not express.

Worked example: five jobs in central London

A hypothetical mobile bike repair technician starts at 08:00 from King's Cross and has five jobs, each placed at a public landmark for illustration. Straight-line distances are computed with the haversine formula (mean Earth radius 6,371 km). To turn distance into time we assume an effective 12 km/h over straight-line distance, a deliberately simple stand-in for a real matrix, and 40 minutes on site per job. Job D (an office) must be started by 10:00.

StopLocationLat, lon
DepotKing's Cross station51.5305, −0.1233
AAngel station51.5325, −0.1060
BBritish Museum51.5193, −0.1267
CWaterloo station51.5028, −0.1128
DLiverpool Street station51.5178, −0.0814
EHyde Park Corner51.5027, −0.1543

Nearest neighbor goes Depot → A (1.22 km) → B (2.05) → C (2.07) → D (2.74) → E (5.32) → Depot (3.76): 17.16 km. The last two legs cross central London twice, and D is reached at about 10:40, missing its window.

Checking all 120 orders finds the shortest tour is 13.11 km, and there are two of them, mirror images: Depot → B → E → C → D → A → Depot, and its reverse. Only the direction differs, but the first reaches D at 10:48 and the second at 08:58. With the window applied, the optimal route is Depot → A (1.22) → D (2.36) → C (2.74) → E (2.87) → B (2.66) → Depot (1.27). That is 4.05 km (about 24%) shorter than nearest neighbor, meets the window, and gets the technician back at about 12:26 instead of 12:46.

Two routes through the same five London jobs: nearest neighbor at 17.2 km crossing back and forth, and the optimized loop at 13.1 km Nearest neighbor: 17.2 km Optimized: 13.1 km Depot A B C D E Depot A B C D E Straight-line legs, positions to scale; real roads add distance
The same five jobs. Nearest neighbor (left) leaves E for last and crosses the area twice; the optimized route (right) runs one loop in the direction that reaches D before 10:00.

Two lessons generalize. First, even at five stops a greedy heuristic leaves nearly a quarter of the distance on the table. Second, time windows can make direction matter as much as order, which is something a distance-only method cannot see.

Realistic buffers: the minutes maps do not show

Most plans fail not on driving time but on the minutes between parking and starting work. In dense urban areas these regularly include finding a legal place to stop a van, walking from the parking spot to the entrance, security desks and visitor registration, waiting for a lift (and a goods lift if the bike or scooter is coming down), and carrying tools back. Model these explicitly rather than inflating every drive:

  • Add an access time per address or building type (house, low-rise, tower, gated community), separate from service duration.
  • Keep site notes on the job record: loading bay, gate code process, best entrance. Notes learned on one visit save time on every later visit.
  • Leave slack in the shift, for example one unassigned slot in the afternoon, rather than planning to 100% utilization.

Dynamic re-planning for urgent same-day jobs

An urgent job (a commuter's e-bike with a failed brake, a scooter that will not power on) arrives at 11:00. The planner's choices are to insert it into an existing route, reassign jobs between technicians, or offer a later slot. A practical approach:

  1. Freeze what cannot change: jobs already started or completed and each technician's current position.
  2. Test cheap insertions: for each technician and each gap in their remaining route, compute the added travel and check that every later window still holds.
  3. Re-optimize the remaining jobs if no insertion is feasible, then compare the result with the current plan before accepting it; a plan that reshuffles every customer's arrival time has a real cost.
  4. Notify any customer whose arrival estimate moved beyond a threshold.

Dispatching across a team

With several technicians, two models dominate. Zone-based dispatch assigns each technician a home area (see mapping service coverage areas), which builds local knowledge and keeps routes compact but strands capacity when one zone is busy and another is quiet. Pooled dispatch lets the solver assign any job to any qualified technician, which uses capacity better but scatters routes. Many teams combine them: zones as a soft preference (a penalty for leaving your zone) rather than a hard rule, with skills and parts as hard constraints. The overview of location data for field service businesses covers the surrounding systems.

Measuring plan versus actual

A routing model is only as good as its durations. Record, for every job, planned and actual arrival, planned and actual time on site, and the access time where you can capture it. Then review:

  • On-time rate: share of arrivals inside the promised window.
  • Travel ratio: actual travel time divided by planned, by zone and hour. Persistent ratios above 1 mean the matrix or the multipliers are optimistic.
  • Service time variance by job type, to replace guesses with measured medians.
  • Jobs per technician-day, the number that ultimately pays for the effort.

Feed the measured values back into service durations, access times and travel multipliers. After a few weeks the plan starts to look like the day.

Key takeaways

  • Technician routing is a vehicle routing problem with time windows; solvers find good answers quickly by improving a starting solution, not by trying every order.
  • Accurate geocodes, per-job durations, skills and van stock matter as much as the algorithm.
  • Nearest neighbor is a prototype, not a plan: in the five-job example it was 24% longer and missed a window.
  • Use a road-network matrix (OSRM, Valhalla or GraphHopper) and a solver such as VROOM or OR-Tools, and model access time and slack explicitly.
  • Compare plan with actual every week and feed the differences back into the model.