Skip to content
F

FreshRoute

LastWindow — Smarter routes. Less wast

Created on 13th October 2026

•

F

FreshRoute

LastWindow — Smarter routes. Less wast

The problem FreshRoute solves

FreshRoute LastWindow helps fresh-produce distributors decide what to send, where to send it, when to dispatch it, and at what permitted price—before the opportunity to sell it disappears.

Fresh produce creates a difficult planning problem: inventory loses value with time, vehicles have limited capacity, destinations have different receiving hours, and demand can change. A shipment that looks profitable when it leaves the warehouse may arrive too late to be accepted or sold. Dispatchers often coordinate these decisions across spreadsheets, phone calls, stock records, and routing tools, making it difficult to understand how one change affects the entire plan.

LastWindow brings these decisions into one workspace and turns inventory, transport availability, freshness estimates, and destination requirements into a proposed dispatch plan.

People can use it to:

  • Build a coordinated dispatch plan. The system proposes which batches to allocate, their destinations, quantities, vehicles, departure times, and allowed price tiers. It considers capacity, receiving windows, freshness, demand, and operating costs together, reducing the manual effort required to compare possible combinations.

  • Identify which opportunities need attention first. The “last window” represents the latest feasible departure under the planning model. Dispatch slack shows the time remaining between the proposed departure and that deadline. This helps operators distinguish an urgent batch from one that can wait, rather than relying only on inventory age or a fixed expiry order.

  • Understand why a recommendation was made. Batch-level decision receipts explain allocations, relevant constraints, and price-tier comparisons. Operators can inspect the reasoning behind a plan, identify what is limiting a batch’s opportunities, and discuss decisions with their team.

  • Respond to delays without losing track of existing commitments. Operators can reserve a plan and record a route delay. The system retains committed stock and vehicle availability, flags reservation conflicts, and supports moving eligible unstarted trips to a feasible later slot or releasing them with the recorded cancellation fee. Replanning then uses the updated availability.

  • Decide whether an inspection is worth doing. When freshness estimates are uncertain, inspecting every batch can consume valuable time and money. LastWindow estimates which inspections may be useful for the next planning decision. Its demonstration workflow records the inspection’s time, cost, and observation before updating the planning state.

  • Test a plan beyond its initial forecast. Operators can replay saved planning snapshots under seeded simulations of travel time, shelf life, and demand. Comparing policies under shared simulated conditions helps reveal trade-offs between sales, spoilage, unsold carryover, service failures, and net contribution.

How it makes existing work easier

LastWindow connects tasks that are usually handled separately. An operator can move from reviewing inventory to generating a plan, inspecting its reasoning, reserving resources, recording a disruption, and replanning within the same workflow. Saved snapshots preserve the context behind earlier decisions, making it easier to review what was known when a plan was created.

How it supports more reliable operations

A separate validator checks generated plans against modeled constraints before commitment. Resource reservations help prevent the same stock or vehicle time from being allocated twice, while revision checks help prevent actions based on outdated planning state. These controls make operational mistakes easier to detect and investigate.

Freshness estimates remain planning inputs: the system does not certify food safety or replace physical quality checks.

The intended users include produce wholesalers, distribution centres, agricultural aggregators, and perishable-goods dispatch teams. The current prototype demonstrates these workflows using synthetic scenarios; real-world benefits would need to be measured through a pilot with operational data.

The central benefit is actionable time awareness: LastWindow helps teams see which delivery opportunities are closing, understand their options, and recover when the day changes.

Challenges we ran into

One of the biggest challenges was keeping a dispatch plan consistent when conditions changed after it had been generated. A plan could be feasible initially, but a route delay or an existing reservation could change which stock and vehicles were available. Simply running the optimizer again was not enough: it also needed to respect commitments already made. We addressed this by explicitly reserving stock and vehicle time, checking planning revisions, and flagging conflicts after disruptions. Eligible unstarted trips can be moved to a feasible later slot or released with their cancellation fee recorded. Replanning then uses the updated availability rather than treating every resource as free.
Another challenge was separating a financially attractive plan from an operationally feasible one. A proposed allocation might look valuable but still violate a receiving window, vehicle capacity, freshness requirement, or timing constraint. We built an independent validator alongside the optimizer so that generated plans are checked separately before commitment. This gave us another way to catch inconsistencies instead of relying entirely on the optimization model.
We also had to handle long-running planning jobs without making the application feel stuck. Optimization and inspection ranking can take time, and users need to know whether a job is running, completed, failed, or cancelled. We moved this work into isolated background processes and added job status tracking and cancellation support. This helped keep the interface responsive and made failures easier to report and investigate.
A further hurdle was preserving the meaning of historical results. If an operator changed the current scenario and then replayed an older plan against that changed state, the comparison could become misleading. We addressed this by saving planning snapshots and using the stored context when replaying a plan. Earlier decisions therefore remain connected to the inputs available when they were created.
Evaluating uncertainty introduced a different challenge: making comparisons fair. If two planning policies were tested under different simulated delays or demand conditions, differences in their results could come from chance rather than the policies themselves. We used seeded simulation worlds and evaluated competing policies under shared conditions. We also reported sales, spoilage, carryover, service failures, and net contribution separately so that one headline number would not hide important trade-offs. These results remain synthetic demonstrations rather than evidence of field performance.
The interface itself needed substantial improvement. Our earlier design exposed too much information without a clear visual hierarchy, making it harder to understand what needed attention. We redesigned the workspace around the operator’s decisions: reviewing inventory, generating a plan, checking dispatch deadlines, understanding recommendations, and recovering from disruptions. Clearer navigation, a route-network view, a freshness watchlist, and more readable tables made the system easier to explain and use.
Finally, we needed to verify that individual features worked together. Passing backend checks alone would not prove that someone could complete a real workflow through the interface. We combined backend and frontend tests with browser checks covering planning, inspection, reservations, delays, recovery, and access control. The verified build passed 73 backend tests, 9 frontend tests, and 7 browser workflows, with additional validation and replay checks across the eight supplied scenarios.
The main lesson was that producing an optimized schedule is only one part of the problem. Building a useful decision tool also requires consistent resource tracking, explainable recommendations, responsive interactions, reproducible evaluation, and a practical way to recover when conditions change.

Discussion

Builders also viewed

See more projects on Devfolio