How philippxxy/on-line-order-batching works
This is a threaded CLI application for online order batching in a single-picker warehouse. The workflow is: configure warehouse and batching parameters, load orders and release them over time, optimize arrived orders into batches, then sequence and report the picking tour while coordinating picker availability. The README also documents configurable batch-selection rules and S-shape routing. The sampled excerpts establish the main thread, queue, and optimizer relationships; some core implementations are unsampled, so their internal wiring is shown only where module responsibilities or explicit calls support it.
Main entry points: logic_controller.py Logic thread · cli_controller.py CLI thread · cli_runtime.py Interactive runtime · main.py Program entry
Components 16
CLI interaction
- Configure run
src/ui/cli/cli_initialize.py - CLI thread
src/ui/cli_controller.py - Interactive runtime
src/ui/cli/cli_runtime.py - Imported orders
src/ui/imported_orders.py - Batch and tour display
src/ui/cli/cli_runtime.py
Runtime coordination
- Program entry
src/main.py - Logic thread
src/core/logic_controller.py - Shared runtime state
src/vars/shared_variables.py - Order and layout access
src/core/logic/input_handler.py - Warehouse layout CSV
- Join item positions
src/core/logic/join_item_information.py
Batch optimization
- Batch construction and selection
src/core/logic/batch_selector.py - Iterated local search
src/core/logic/batch_tour_length_minimizer.py - Online release decisions
src/core/logic/pivot_logic.py
Warehouse routing
- S-shape tour calculation
src/core/logic/batch_tour_length_calculator.py
Other components
- Warehouse operator
Connections 19
- Warehouse operator → Configure run: provides settings
- Configure run → Program entry: returns configuration
- Program entry → CLI thread: starts thread
- Program entry → Logic thread: starts thread
- CLI thread → Interactive runtime: runs
- Imported orders → CLI thread: supplies orders
- CLI thread → Shared runtime state: queues released orders
- Interactive runtime → Shared runtime state: reads batch and picker state
- Logic thread → Shared runtime state: updates runtime state
- Logic thread → Order and layout access: reads orders and settings
- Warehouse layout CSV → Order and layout access: loads layout
- Order and layout access → Join item positions: joins item positions
- Logic thread → Batch construction and selection: optimizes arrived orders
- Batch construction and selection → Iterated local search: improves batches
- Batch construction and selection → S-shape tour calculation: evaluates selection rules
- Iterated local search → S-shape tour calculation: evaluates candidate tours
- Logic thread → Online release decisions: checks release decision
- Interactive runtime → Batch and tour display: prints picking batch
- S-shape tour calculation → Batch and tour display: provides tour ordering