Skip to content
FreshRoute

FreshRoute

Smarter dispatch for perishable produce

Created on 13th October 2026

•

FreshRoute

FreshRoute

Smarter dispatch for perishable produce

The problem FreshRoute solves

image
Every evening, a produce distributor has to decide what goes on its trucks before the stock rots: which batch leaves tonight, which market it goes to, how much to send, and whether to sell it at full price or at a discount. Today this is decided on experience, phone calls and spreadsheets, and India loses 11.6 percent of its tomatoes, 7.6 percent of bananas and 7.3 percent of onions after harvest (NABCONS study for the Ministry of Food Processing Industries, 2020 to 2022).

Simple rules of thumb get this wrong. Sending the oldest stock first wastes shelf life, because the ripest lot takes the best nearby market even when a fresher lot could have earned more further away. Trucks are booked one load at a time, so nobody knows whether an extra truck really pays. Discounts are decided too late, when the stock is already too ripe. And a dispatcher's gut decision never has a cost attached to it.

FreshRoute is a planning tool for a produce hub. In about a second it plans the whole night: which batch goes to which market, on which day, at what price, and how many trucks run on each route. It then makes every decision easy to trust.

It finds the best possible plan using a mathematical optimisation model, and proves that no better plan exists for the given data.

It explains every decision. For each batch it shows why it goes to a particular market, why it leaves tonight, why it is discounted, and why every other market was rejected.

It puts a price on disagreement. If the dispatcher wants to do something differently, one click recalculates the whole plan and shows exactly what that choice would cost.

It replans when things go wrong. If a truck is delayed, drivers go on strike or a market is flooded, it keeps the trucks already on the road and re-routes everything else instantly.

It is tested against uncertainty. Every plan is checked across hundreds of simulated situations where shelf life, travel time, demand and prices turn out different from the estimates, and risky shipments are flagged.

On our test scenario of 120 tonnes, 22 batches and 6 trucks a night, compared with a typical dispatcher's approach, FreshRoute earned 31 percent more (Rs 28.6 lakh instead of Rs 21.9 lakh), cut spoilage by 37 percent (7.7 tonnes instead of 12.2 tonnes), filled more customer orders and used 4 fewer trucks. Across 41 different test scenarios it never broke a single rule on stock, truck capacity, shelf life or demand.

It is built for dispatchers at farmer producer organisations, wholesalers, agri supply companies and cold storage operators, turning a stressful evening of guesswork into a ten minute routine. Owners can also use it to see what an extra truck, market or batch of produce is worth.

It runs entirely in the browser with no installation or login: https://sfaz01.github.io/freshroute
The demo uses synthetic data, as allowed by the hackathon, with prices, transport costs and shelf lives checked against public figures.

image

Challenges I ran into

The biggest hurdle was speed. The core of FreshRoute is an optimisation model that decides how much of each batch goes to each market on each night, plus how many whole trucks run on each route. I run the HiGHS solver compiled to WebAssembly so the whole app works in the browser without a server, but my first version took almost 3 seconds per solve. That was too slow, because features like "what if I send this batch elsewhere" and the stress tests re-solve the model many times. I turned on the solver's log and found it was not struggling with the actual search at all. It spent most of its time on heuristics and restarts. I added extra constraints that tell the model nothing can move on a route with no truck, which made the problem much tighter, and switched off the heuristics that were not helping. It now usually solves at the very first step, in about a quarter of a second.

The most annoying bug was a rounding issue. The solver returns numbers like 8000.001 kg instead of exactly 8000. My accounting code saw that the load was just over one truck's capacity and booked two trucks. That pushed the night over the fleet limit, so other shipments got cancelled, and the profit the optimiser promised was off by more than 2.6 lakh from what the accounting code calculated. I fixed it with a small tolerance, and I added a test that checks the optimiser's profit and the accounting code agree on every scenario. That test has caught problems since.

Another surprise came from the stress test. Loads that arrived exactly when the market opened lost a whole day if the truck was even a few minutes late, so all the plans looked much worse under uncertainty than they should. Real markets keep trading for a few hours after opening, so I added a selling window after the opening time, which made the timing model more realistic.

I also caught myself measuring the wrong thing. At first, sending tomatoes to the pulp processor counted as fulfilling demand, so the simple baseline looked better at filling orders just by dumping fresh produce into pulp. A processor is not really a customer placing an order, so I excluded it from the fulfilment number and reported it separately.

Finally, since the dataset is synthetic, I checked my prices, transport costs and shelf lives against public data like government mandi prices and freight quotes. My capsicum prices were too high and coriander lasted longer than it really does, so I corrected them and re-ran the whole evaluation so every number stays consistent.

Discussion

Builders also viewed

See more projects on Devfolio