- Manufacturing
John Deere Quantum Optimization for Precision Agriculture Fleet Routing
John Deere
John Deere researched quantum computing for optimizing autonomous farm equipment fleet routing across large fields, formulating a Vehicle Routing Problem with time windows and terrain constraints as a Constrained Quadratic Model solved via D-Wave's hybrid CQM solver.
- Key Outcome
- CQM solver reduced total equipment travel distance by 11% vs OR-Tools on 500-acre test farm with 5 autonomous vehicles.
The Problem
Modern precision agriculture relies on fleets of autonomous machines operating across hundreds of acres. A single large farm might deploy combines during harvest, planters during planting season, and sprayers for crop protection treatments, often running multiple machines simultaneously to meet weather and growth-stage windows.
Routing these machines efficiently is a variant of the Vehicle Routing Problem (VRP) with several agricultural twists:
- Time windows: certain field sections must be treated within a narrow time window (e.g., before morning dew lifts, or while soil conditions allow heavy machinery without compaction)
- Terrain constraints: headland turns and waterway buffers require detours; slope constraints limit which machines can operate in certain zones
- Machine heterogeneity: combines, planters, and sprayers have different working widths, speeds, and fuel capacities
- Coverage completeness: unlike package delivery, field coverage must be total; every row must be serviced
The objective is to minimize total travel distance (non-working movement between field sections, headland turns, and repositioning), which translates directly to fuel cost, time lost, and field compaction from unnecessary passes.
John Deere’s operations technology group formulated this as a quantum optimization research project, targeting 500-acre test farm configurations with 5 autonomous vehicles.
Field Grid Discretization
The farm was discretized into a grid of work zones, each representing a set of parallel crop rows that one machine can cover in a single pass. For a 500-acre corn field with 30-inch row spacing, this produced approximately 180 to 220 discrete work zones depending on field geometry.
Each work zone has:
- A centroid location (for distance calculations)
- A servicing time estimate (function of working width and zone size)
- A time window (earliest and latest start times)
- A set of compatible machine types
Travel distances between work zones were precomputed using a simplified agricultural path model: straight-line distance plus a headland turn penalty based on the 90-degree or 180-degree turn required.
import numpy as np
from itertools import product
def compute_travel_matrix(zones, headland_width=30, machine_speed_mps=2.5):
"""
Compute travel time matrix between field work zones.
zones: list of (x, y, orientation) tuples (centroid + row orientation)
headland_width: meters of headland turn space
machine_speed_mps: average repositioning speed in meters/second
"""
n = len(zones)
T = np.zeros((n, n))
for i, j in product(range(n), range(n)):
if i == j:
continue
xi, yi, oi = zones[i]
xj, yj, oj = zones[j]
# Euclidean distance between zone centroids
dist = np.sqrt((xj - xi)**2 + (yj - yi)**2)
# Headland turn penalty: 180-degree turn in same orientation costs
# one headland-width traversal; cross-orientation turn costs 1.5x
turn_penalty = headland_width if oi == oj else 1.5 * headland_width
T[i][j] = (dist + turn_penalty) / machine_speed_mps
return T # seconds
CQM Formulation
D-Wave’s Constrained Quadratic Model (CQM) allows integer and binary variables with explicit linear and quadratic constraints, avoiding the manual penalty encoding required in pure QUBO formulations. This made it natural to express the VRP constraints directly.
import dimod
from dwave.system import LeapHybridCQMSampler
def build_fleet_routing_cqm(zones, machines, travel_time, time_windows, service_time):
"""
Build CQM for agricultural fleet routing.
Decision variables:
x[z][m] = 1 if machine m services zone z
y[z1][z2][m] = 1 if machine m travels from zone z1 to zone z2
t[z][m] = start time for machine m at zone z (integer, minutes)
"""
cqm = dimod.ConstrainedQuadraticModel()
n_zones = len(zones)
n_machines = len(machines)
# Binary assignment variables
x = {(z, m): dimod.Binary(f'x_{z}_{m}')
for z in range(n_zones) for m in range(n_machines)}
# Binary routing variables (zone-to-zone transitions per machine)
y = {(z1, z2, m): dimod.Binary(f'y_{z1}_{z2}_{m}')
for z1 in range(n_zones)
for z2 in range(n_zones)
for m in range(n_machines)
if z1 != z2}
# Integer start time variables (discretized to 5-minute slots)
t = {(z, m): dimod.Integer(f't_{z}_{m}', lower_bound=0, upper_bound=480)
for z in range(n_zones) for m in range(n_machines)}
# Objective: minimize total travel time (non-working movement)
objective = sum(
travel_time[z1][z2] * y[(z1, z2, m)]
for z1, z2, m in y
)
cqm.set_objective(objective)
# Constraint 1: every zone must be assigned to exactly one machine
for z in range(n_zones):
cqm.add_constraint(
sum(x[(z, m)] for m in range(n_machines)) == 1,
label=f'coverage_{z}'
)
# Constraint 2: machine capacity -- each machine services <= max_zones zones
max_zones_per_machine = n_zones // n_machines + 5
for m in range(n_machines):
cqm.add_constraint(
sum(x[(z, m)] for z in range(n_zones)) <= max_zones_per_machine,
label=f'capacity_{m}'
)
# Constraint 3: time windows for each zone
for z in range(n_zones):
tw_early, tw_late = time_windows[z]
for m in range(n_machines):
# If machine m is assigned to zone z, start time must be in window
# Enforced via big-M linearization with CQM integer variables
M = 480 # planning horizon in minutes
cqm.add_constraint(
t[(z, m)] - tw_early * x[(z, m)] >= 0,
label=f'tw_early_{z}_{m}'
)
cqm.add_constraint(
t[(z, m)] - tw_late * x[(z, m)] <= M * (1 - x[(z, m)]),
label=f'tw_late_{z}_{m}'
)
return cqm, x, y, t
# Build and solve
cqm, x, y, t = build_fleet_routing_cqm(
zones, machines, travel_time, time_windows, service_time
)
sampler = LeapHybridCQMSampler()
result = sampler.sample_cqm(cqm, time_limit=60)
feasible = result.filter(lambda s: s.is_feasible)
best = feasible.first
Comparison to OR-Tools Baseline
OR-Tools (Google’s open-source combinatorial optimization library) is the standard industrial baseline for VRP problems. John Deere’s operations software already used OR-Tools for route planning in non-autonomous equipment scheduling.
The comparison used the same 500-acre field model with 5 machines across 200 work zones. Both solvers were given a 60-second time limit.
| Solver | Total travel distance | Time window violations | Feasible routes |
|---|---|---|---|
| OR-Tools (routing module) | 47.3 km | 0 | 5/5 |
| D-Wave CQM hybrid | 42.1 km | 0 | 5/5 |
| Greedy nearest-neighbor | 61.8 km | 3 | 5/5 |
The 11% reduction in travel distance corresponds to approximately 5.2 km less non-working movement per planning cycle. At typical agricultural diesel consumption rates for large equipment, this translates to roughly 3 to 4 liters of fuel saved per planning cycle per machine.
OR-Tools used its Guided Local Search metaheuristic with path cheapest arc initialization. The CQM solver’s advantage was most pronounced on instances where time window constraints created tight feasibility corridors: OR-Tools sometimes got stuck in local optima respecting the constraints, while the quantum hybrid sampler explored the feasibility boundary more broadly.
Terrain Constraints and Slope Encoding
Slope constraints were encoded as hard binary constraints: if a work zone’s slope exceeded the machine’s rated operating limit (typically 15 degrees for heavy combines), the corresponding x[z][m] variable was fixed to zero before submitting the CQM. This prefiltering reduced the effective variable count and ensured no infeasible assignments appeared in the solution.
Waterway buffer zones were encoded as prohibited transitions: y[z1][z2][m] was fixed to zero for any zone pair where the direct path crossed a waterway or drainage tile.
Research Findings and Next Steps
The project validated that D-Wave’s CQM hybrid solver could handle the field routing VRP at the 200-zone, 5-vehicle scale and produce better solutions than OR-Tools within the same time budget. The team identified several directions for further investigation:
Scaling to full operation. A 5,000-acre commercial farm operation with 20 machines and 1,000+ work zones exceeds current CQM practical limits. Problem decomposition by field section with inter-section coordination is the proposed approach.
Multi-day planning. The current formulation covers a single planning day. Extending to a 3-day planting or harvest window with weather uncertainty requires stochastic VRP formulations not yet tested in the quantum context.
Integration with John Deere Operations Center. The solver was run as a stand-alone research prototype. Production integration would require sub-minute solve times for real-time replanning when a machine has a mechanical issue or weather changes field accessibility.