LogiFlow Route Automator
Project Overview
LogiFlow is a backend routing and dispatch-optimization engine engineered using Python. The program sorts incoming cargo items into optimal delivery queues based on multi-carrier rate cards, delivery deadlines, and volumetric vehicle capacities.
The Problem
Industrial-scale fulfillment centers coordinate shipments across different logistics partners (such as UPS, DHL, and FedEx), each utilizing highly complex, fluctuating dimensional weight parameters. Legacy sorting systems rely on rigid thresholds, resulting in high shipping fees, empty cargo volumes, and delays.
What I Did (Technical Action)
Formulated and implemented a Greedy Bin-Packing model in Python to optimize cargo space allocation. I utilized Python’s built-in priority heaps (`heapq`) to classify outbound cargo items based on delivery urgency. I programmed a modular cost-calculation matrix comparing standard carrier formulas, dynamically assigning package groupings in O(N log N) time complexity.
Streamlined sorting center delivery pipelines. I modeled real-world sorting throughput limits and integrated automated barcode-verification protocols. By systematically routing packages based on carrier pickup schedules and transit lanes, the tool eliminates parcel mis-routing errors, improves sorting center speeds, and recovers shipping charges.
Core Sorting Logic
import heapq
def optimize_sort_queues(packages):
# packages: list of dicts with {'id': str, 'weight': float, 'sla_hours': int}
priority_queue = []
for pkg in packages:
# 1. Use negative SLA hours for min-heap implementation
# Lower hours (closer to deadline) float to the top of the queue
heapq.heappush(priority_queue, (pkg['sla_hours'], pkg['weight'], pkg['id']))
dev_sorted_dispatch = []
while priority_queue:
sla, weight, pkg_id = heapq.heappop(priority_queue)
# 2. Greedy Cost Allocation Model: select courier tier dynamically
if weight > 70.0:
carrier = "UPS Freight"
elif sla <= 12:
carrier = "DHL Express Air"
else:
carrier = "FedEx Ground"
dev_sorted_dispatch.append({
'pkg_id': pkg_id,
'assigned_carrier': carrier,
'priority_score': sla
})
return dev_sorted_dispatch
# Mock simulation of sorting batch
batch = [
{'id': 'PKG01', 'weight': 12.5, 'sla_hours': 8},
{'id': 'PKG02', 'weight': 82.0, 'sla_hours': 24},
{'id': 'PKG03', 'weight': 25.0, 'sla_hours': 48}
]
dispatch_schedule = optimize_sort_queues(batch)
print(dispatch_schedule)