Electric-van delivery routing
48 pharmacies. 6 electric vans. 14 chargers. One plan that never runs a battery flat.
EV routing plans one delivery day around Bergamo: which van serves each pharmacy, in what order, and where it stops to charge, with capacity, delivery windows, real road travel, and battery range held together in one score.
An electric delivery route is only valid if the van can actually drive it. A route that fits capacity and every delivery window can still run below the battery reserve halfway through, and adding a charging stop moves every later arrival. Visit order, charging, and lateness have to be decided together.
Charging stops are derived rather than searched: after every route change an exact dynamic program places the stops that minimise range shortfall and then added time, so the list variable holds only pharmacies and the stock Clarke-Wright and k-opt construction works unchanged. The app keeps the route map, the van cards, the schedule, the input tables, score analysis, and the retained job on one surface.
- The fleet figures start at zero: distance, driving, charging stops, shortfall, lateness.
- Hub, pharmacies, and public chargers are placed on the real road map.
- The retained job is still solving; Pause and Stop stay available.
- Routes follow the road network; legs to and from a charger are dashed.
- Each card states load, distance, charging stops, lowest charge, and return time.
- Pharmacies take their van's colour; used chargers are coloured too.
- Battery shortfall is a hard rule, measured in metres below the reserve.
- Total travel time carries the soft cost: driving plus charging.
- Charging stops sit in the timeline where the route places them.
- Each lane is one van, with its stop and charge counts.
- Vans differ in capacity, range, starting charge, and recharge time.
- Pharmacies carry crates, a delivery window, and an unloading time.