Hai Wiki
home / knowledge / 02-algorithms.md

Layer 2 — Scheduling and optimisation algorithms

Hai names four algorithms plus the order-shaping and slotting strategies. They publish no method for any of them, so this layer leans hardest on general fundamentals: how such problems are approached, not how Hai approached them.

The four are coupled. A useful mental model of the coupling:

order allocation  ──► decides WHICH totes must move, and by when
       │
       ▼
task allocation   ──► decides WHICH robot moves them
       │
       ▼
path planning     ──► decides HOW it travels without conflict
       │
       ▼
charging          ──► decides WHETHER that robot is available at all
       └──────────────────────────────────► feeds back into task allocation

Order allocation

What it is. Choosing which orders to release from the order pool, and to which workstation, so that due dates are met and work is spread evenly.

Why it matters here. Order allocation determines the demand the robot fleet sees. Almost every throughput problem blamed on robots originates here.

Fundamentals.

  • The core lever is SKU affinity: orders sharing SKUs should be co-located in time and station, so one tote presentation serves many picks. The metric is picks per tote presentation — the single most important efficiency ratio in a GTP system. Going from 1.2 to 2.5 nearly halves robot workload for the same order volume.
  • This is a batching/clustering problem. Standard framings: set-covering, bin-packing with affinity weights, or greedy seed-and-grow clustering. In practice online greedy heuristics with a lookahead window dominate, because the order pool is continuously refilled.
  • Workload balance across stations matters because the system's rate is set by the slowest station, not the average.
  • Due-date pressure turns this into a scheduling problem with deadlines — earliest-due-date is the obvious baseline; the interesting part is trading a deadline against a large affinity gain.

How Hai applies it.

"Select orders from the order pool and assign them to workstations to maximize order timeliness, picking efficiency, and workload balance." — /solutions/haiq-software

Three explicit objectives: timeliness, picking efficiency, workload balance. Note that they are in tension, and Hai does not publish the weighting.

Tradeoffs and pitfalls.

  • Maximising affinity alone starves urgent single-line orders.
  • A lookahead window that is too large improves batching but delays release, eating the cutoff buffer.
  • Balance measured over a shift hides ten-minute starvation events that are what the operators actually experience.

Key terms. order pool · SKU affinity · picks per tote presentation · batching · lookahead window · workload balance · earliest due date · cutoff.


Task allocation

What it is. Assigning individual transport tasks (fetch tote X to station Y) to individual robots.

Why it matters here. This is the fleet's inner loop, running continuously at scale. Its quality shows up directly as robot travel distance and workstation idle time.

Fundamentals.

  • The clean formulation is an assignment problem: cost matrix of robots × tasks, minimise total cost. Solvable optimally by the Hungarian algorithm in O(n³) — fine for hundreds of robots, and a perfectly serviceable production choice.
  • Market/auction-based allocation (contract net) is the common decentralised alternative: tasks are announced, robots bid their estimated cost, lowest bid wins. Scales well, degrades gracefully, no global optimum.
  • Cost function design is the real work. Naive cost = travel distance. Better cost includes: current load (a robot already carrying 6 of 9 totes should finish its run), charge state, aisle congestion, and the deadline of the task.
  • Rolling horizon: re-solve frequently over a short window rather than committing to a long plan, because the world changes under you.
  • Watch for task starvation: a low-priority task in a far corner can be perpetually outbid. Ageing terms in the cost function fix this.

How Hai applies it.

"Assign tasks to robots to ensure optimal transport efficiency and timely completion of transport tasks." — /solutions/haiq-software

Tradeoffs and pitfalls.

  • Greedy nearest-robot assignment is locally sensible and globally poor: it clusters the fleet and leaves distant zones unserved.
  • Optimising purely for travel distance ignores that a robot's 9-tote capacity makes route consolidation worth more than proximity.

Key terms. assignment problem · Hungarian algorithm · contract net · auction allocation · cost function · rolling horizon · task starvation · ageing.


Path planning and traffic control

What it is. Routing many robots through a shared floor without collision, deadlock, or excessive queueing.

Why it matters here. Single-robot pathfinding is a solved undergraduate topic. Multi-robot pathfinding in narrow warehouse aisles is where systems actually fail — and where design quality shows.

Fundamentals.

  • Single-agent baseline: A* / Dijkstra on a grid or topological graph.
  • Multi-agent (MAPF) is the real problem. Know the names:
    • Cooperative A* / WHCA* (windowed hierarchical cooperative A*) — reserve space-time cells in a reservation table, plan agents in sequence.
    • CBS (Conflict-Based Search) — plan independently, detect conflicts, branch with constraints. Optimal but expensive.
    • Prioritised planning — cheap, incomplete, and what most production systems actually run.
  • Space-time reservation is the key idea: you reserve a cell at a time, not a cell. This is what turns collision avoidance into a scheduling problem.
  • Deadlock is the characteristic failure: robots in a narrow aisle mutually blocking. Three standard responses — prevention (one-way aisle topology, resource ordering), avoidance (never grant a reservation that could deadlock), detection and recovery (spot the cycle, force one robot to yield).
  • Congestion is not deadlock but costs as much: throughput can decrease as you add robots past a density threshold. This is the single most important counter-intuitive fact in fleet sizing.
  • One-way aisle conventions and dedicated highway lanes buy more throughput than smarter algorithms in most real layouts.

How Hai applies it.

"Minimize robot travel distance, achieve robot avoidance, queueing, and other actions, and reduce workstation downtime." — /solutions/haiq-software

"These top-of-the-line AMRs effortlessly execute path planning, obstacle avoidance, premier goods transport, and autonomous charging within our comprehensive ACR system." — /robots/heavy-duty-amr-k600-k1000

Note that Hai names queueing and workstation downtime explicitly — they are optimising the queue at the station, not just the trip.

Tradeoffs and pitfalls.

  • Adding robots to a congested floor reduces throughput. If asked "how do we go faster?", more robots is often the wrong answer; more aisles, better slotting or another workstation may be right.
  • Aisle width and depth configuration constrain the routing problem far more than the algorithm does.

Key terms. MAPF · A* · CBS · WHCA* · prioritised planning · space-time reservation · deadlock prevention/avoidance/detection · congestion collapse · one-way topology.


Charging scheduling

What it is. Deciding when each robot leaves service to charge, and at which station, so that fleet availability never limits throughput.

Why it matters here. Charging is a capacity problem disguised as a maintenance detail. Every case study in the corpus sizes charging stations explicitly — it is a first-class design parameter, not an afterthought.

Fundamentals.

  • Duty-cycle arithmetic. For a fleet of N robots with run time R and charge time C, the steady-state fraction charging is C / (R + C). Chargers needed ≈ N × C / (R + C), plus headroom for peak coincidence. Example: 60 robots with a 3-hour run and a 15-minute charge → ~5 charging positions at steady state, but peak clustering means you provision more.
  • Opportunity charging (frequent short top-ups during natural idle gaps) vs. threshold charging (run to a low state of charge, then a full charge). Fast chemistries make opportunity charging strictly better — it keeps more robots available at any instant.
  • Charge state must feed task allocation. A robot at 15% should not be assigned a task at the far end of the building. This is the coupling that naive designs miss.
  • Peak protection: you want the fleet to enter the peak hour with a high average state of charge, which means charging aggressively during the lull beforehand — a forecasting problem, not a reactive one.

How Hai applies it.

"Provide stable and sufficient robot transport resources to ensure efficient completion of warehouse operations." — /solutions/haiq-software

Read that framing carefully: charging is posed as maintaining transport resource availability, not as battery management. That is the right framing.

Real sizing ratios from Hai's own deployments (see solution-design): 53 robots → 18 charging stations; 32+8 robots → 14; 30+3 robots → 11; 7 robots → 4. Roughly one charger per 2.5–3 robots, which is far more generous than steady-state duty-cycle math implies — evidence that peak coincidence dominates.

Tradeoffs and pitfalls.

  • Under-provisioning chargers creates a queue at the charger, which silently removes robots from service for longer than the charge time itself.
  • Charging bays occupy floor space that could be storage — a genuine density tradeoff.

Key terms. duty cycle · opportunity charging · threshold charging · state of charge (SoC) · charger provisioning ratio · peak coincidence.


Order grouping, splitting, waves and batching

What it is. The set of strategies that reshape raw customer orders into work the system can execute efficiently.

Why it matters here. This is the highest-leverage tuning surface in the whole system, and it needs no hardware change. When a live site misses its throughput target, this is usually where the fix is.

Fundamentals.

  • Batch picking: one tote presentation serves picks for several orders. Gain is proportional to SKU overlap.
  • Zone picking: split by area, each zone picks its part, consolidate downstream.
  • Wave planning: release work in blocks tied to cutoffs, carriers, or shifts. Waveless releases continuously for smoother flow.
  • Order prioritisation: not all orders are equal — same-day, VIP, and replenishment have different deadlines.
  • The universal tradeoff: efficiency vs. responsiveness. Every batching gain is paid for in latency for the individual order.

How Hai applies it.

"HaiQ optimizes robotic movements, order batch picking, order prioritization, and storage location decisions, with real-time updates for maximum efficiency." — /solutions/system-features

"Intelligent split orders to meet different business needs" — /cases/philips-appliance-factory

Tradeoffs and pitfalls.

  • Aggressive batching plus a tight cutoff is a contradiction the customer will discover in week three of operation.
  • Splitting without designing consolidation capacity moves the bottleneck rather than removing it.

Key terms. batch picking · zone picking · wave / waveless · order prioritisation · consolidation · responsiveness-efficiency tradeoff.


Slotting via demand heat mapping

What it is. Deciding where each SKU physically lives, based on how often and how urgently it is picked.

Why it matters here. In an ACR system, vertical travel is expensive. Slotting converts knowledge about demand into saved seconds on every single retrieval — it is the cheapest throughput improvement available, and it is continuous, not one-off.

Fundamentals.

  • ABC / Pareto analysis: typically ~20% of SKUs drive ~80% of picks. Put the A items where retrieval is cheapest.
  • In a vertical ACR system "cheapest" means low and close to the workstation — the lift time dominates. In a flat AMR system it means "near the pick face".
  • Dynamic re-slotting matters more than initial slotting for volatile assortments — apparel and seasonal grocery being the obvious cases, and apparel is Hai's single largest case-study vertical (22 of 88).
  • Affinity slotting: co-locate SKUs frequently ordered together so one trip serves more lines.
  • The cost of re-slotting is real (robot moves that produce no customer value), so the decision is an investment: does the future saving exceed the move cost?

How Hai applies it.

"Using heat mapping, HaiQ adapts workflows to keep high-demand items in quickly accessible locations." — /solutions/system-features

"By placing fast-moving goods on the lower racks closer to the workstations, and more seasonal, unique goods up higher saves on time and space." — /solutions/robots

"such as order grouping, order splitting, wave rule and heat strategy" — /solutions/haiq-software

Hai's term is heat strategy / heat mapping. Their stated rule is explicit: fast movers low and near the station, slow and seasonal high.

Tradeoffs and pitfalls.

  • Slotting on historical demand lags a fashion cycle; by the time the heat map says an item is hot, the season may be ending.
  • Re-slotting during peak consumes exactly the robot capacity you need for orders. Schedule it in the lull.

Key terms. slotting · re-slotting · ABC analysis · Pareto · heat map · heat strategy · affinity slotting · golden zone · velocity.