Allocator provides a modern, Pythonic API for geographic task allocation, clustering, and routing optimization.
- 🎯 Clustering: Group geographic points into balanced zones
- 🛣️ Routing: Find optimal paths through locations (TSP solving)
- 📍 Assignment: Connect points to closest workers/centers
- 🚀 Performance: Optimized algorithms with NumPy and scikit-learn
- 📦 Modern API: Clean Python interface + unified CLI
pip install allocatorimport allocator
import pandas as pd
# Geographic locations
locations = pd.DataFrame({
'longitude': [100.5018, 100.5065, 100.5108],
'latitude': [13.7563, 13.7590, 13.7633]
})
# Group into zones
clusters = allocator.cluster(locations, n_clusters=2)
# Find optimal route
route = allocator.shortest_path(locations)
# Assign to service centers
centers = pd.DataFrame({
'longitude': [100.50, 100.52],
'latitude': [13.75, 13.77]
})
assignments = allocator.assign(locations, centers)MIT License. Contributions welcome - see Contributing Guide.