Skip to content
R

reshroute

FreshRoute: Beating the Clock on Food Spoilage.

Created on 14th October 2026

•

R

reshroute

FreshRoute: Beating the Clock on Food Spoilage.

The problem reshroute solves

• The Scale: In India, 16% to 25% of perishable horticultural produce (tomatoes, bananas, spinach, onions) spoils between farm gate and consumption—a staggering national
loss exceeding ₹92,000 Crore annually.
• The "FIFO Trap" (Why status-quo fails): Conventional logistics software operates on naive FIFO (First-In, First-Out). It blindly dispatches the oldest harvested batch
to distant markets simply based on order arrival time, ignoring transit temperature and biological decay. As a result, fragile batches arrive with 0–4 hours of shelf
life remaining, fail mandi quality checks, and rot on the tarmac.
• The FreshRoute Solution: FreshRoute is an Intelligent Perishable Decision Support Engine that shifts distribution from naive FIFO to Quality-Aware FEFO (First-Expired,
First-Out) + Margin Optimization:
1. Arrhenius Biochemical Decay: Calculates non-linear thermal degradation during transit (Q₁₀ = 2.14, Eₐ = 50.2 kJ/mol).
2. Feasibility Gatekeeper: Hard constraint ensuring produce arrives with strictly ≥ 12 hours of retail shelf life (RSLₐᵣᵣᵢᵥₐₗ ≥ 12h); otherwise transit is rejected.
3. Dynamic Markdown Engine: Applies graded discounts (5%–20%) to offload near-expiry produce to proximate high-velocity markets before terminal spoilage occurs.
4. Economic Margin Maximization: Ranks candidate dispatches by net profit (Revenue - Freight - Handling - Procurement - Disposal Penality).

Benchmark Results (Measured on 32,000 kg MoFPI Reference Dataset)

• Spoilage Reduction: Dropped spoilage from 15,200 kg down to 3,000 kg (80.3% reduction).
• Economic Turnaround: Transformed a -₹4.13 Lakh loss into a +₹4.65 Lakh net profit (+₹8.79 Lakh profit swing).
• Zero Spoilage Transit: 100% of dispatched corridors arrived within safe shelf-life thresholds.

Challenges I ran into

• The Challenge: In high-volume distribution hubs, multiple dispatchers or automated cron triggers can execute allocation runs simultaneously. In standard JPA,
concurrent transactions cause phantom reads and inventory underflow (allocating 5,000 kg from a 3,000 kg batch).
• The Solution: Implemented strict row-level pessimistic locking (@Lock(LockModeType.PESSIMISTIC_WRITE)) on ProduceBatch. Wrote a 10-thread parallel stress test
(ConcurrencyStressTest.java) using CountDownLatch and AtomicInteger that proved zero inventory underflow and exact balance preservation.

Technologies used

Discussion

Builders also viewed

See more projects on Devfolio