How vinit714/optimizing-warehouse-efficiency-via-python-based-order-batching works
Project type and purpose
• Key indicators: “Streamlit App,” “Python,” modules for batching, clustering, routing, plotting, and static CSV input.
File structure
• Top-level
• app.py (Streamlit entry point)
• requirements.txt, README.md, LICENSE
• static/ (input template, output folder, images)
• Utils package (business logic split into subpackages)
• utils/process/processing.py
• utils/routing/{distances.py, routes.py}
• utils/batch/{mapping_batch.py, simulation_batch.py}
• utils/cluster/{clustering.py, mapping_cluster.py, simulation_cluster.py}
• utils/results/plot.py
• No external microservices; all simulation runs in-process.
README for additional insights
• Two main experiments:
1. Wave picking with next-closest heuristic
2. Spatial clustering on single/multi-line orders
• Input data: CSV of order lines with (x,y) picks
• Output: total walking distance metrics, route sequences, charts
a. Main components
• Browser UI (user)
• Streamlit Server (app.py)
• Utility Modules (Processing, Batch, Cluster, Routing, Results)
• Data Layer (uploaded CSV, static/in, static/out)
• External Libraries (pandas, scikit-learn, matplotlib/Altair, Streamlit)
b. Relationships & interactions
1. User uploads CSV → Streamlit reads it into a pandas DataFrame
2. app.py invokes Processing to map order lines to (x,y)
3. Depending on experiment:
• Batch module groups orders into waves → Routing computes distances/routes
• Cluster module groups locations → Batch + Routing steps
4. Results module generates plots/tables → Streamlit renders them back to the browser
5. Optionally save outputs to static/out for download
c. Architectural patterns & principles
• Modular separation of concerns (one module per responsibility)
• Two-tier full-stack in a single Python process
d. Key technologies
• Streamlit (UI & server)
• pandas/numpy (data manipulation)
• scikit-learn (spatial clustering)
• matplotlib/Altair/seaborn (plotting)
• Python standard library