feat(phase3): implement SimPy discrete-event simulation engine, multi-zone order generation, fleet dispatcher, and wider Zone B aisles
This commit is contained in:
@@ -5,6 +5,34 @@ All notable changes to the Warehouse Robot Fleet Digital Twin will be documented
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.4.0] - 2026-10-19
|
||||
|
||||
### Added - Phase 3: Discrete-Event Simulation Engine
|
||||
- **Wider Aisles in Zone B**:
|
||||
- Configured `config/warehouse.json` with `aisle_width: 4.0` for Zone B (slow-moving & heavy specialized items).
|
||||
- Updated `WarehouseGraphBuilder` to construct wide $4.0\text{m}$ aisle columns across Zone B ($x \in [32, 36, 40, 44]$), double the $2.0\text{m}$ spacing of Zone A, facilitating heavy AMR navigation with wide pallets and heavy loads.
|
||||
- Added unit test `test_slow_moving_zone_b_has_wider_aisles`.
|
||||
- **Order Generation Engine** (`warehouse_twin.simulation.order_generator`):
|
||||
- `OrderGenerator` and `WorkloadConfig` implementing multi-zone workload processes:
|
||||
- Zone A Poisson arrivals for fast-moving items (`expovariate`).
|
||||
- Zone B Gaussian arrivals for heavy components navigating wider aisles (`gauss`).
|
||||
- Zone C scheduled batch feeds for production-line delivery.
|
||||
- Automated stock replenishment order generation when inventory dips below minimum threshold.
|
||||
- Peak demand traffic scaling ($1.5\times$ multiplier from 1200s to 2400s).
|
||||
- **Fleet Dispatcher** (`warehouse_twin.simulation.dispatcher`):
|
||||
- `FleetDispatcher` with priority queueing, sorting tasks by priority, deadline, and release time.
|
||||
- Compatibility validation enforcing payload capacity ratings, battery headroom filtering ($20\%$), and Zone B restrictions.
|
||||
- Nearest-idle robot selection based on graph network routing distances.
|
||||
- **SimPy Discrete-Event Simulation Core** (`warehouse_twin.simulation.sim_engine`):
|
||||
- `SimulationEnvironment` managing master clock, discrete order arrival processes, and dispatcher daemon.
|
||||
- Robot mission lifecycle execution: empty transit, picking, stock reservation/consumption, loaded transit, dropoff, and automatic opportunity/mandatory recharging.
|
||||
- Real-time event streaming to JSONL (`logs/simulation_events.jsonl`).
|
||||
- `SimulationMetrics` computing throughput, turnaround, wait times, on-time delivery rate, fleet utilization, and energy consumption.
|
||||
- **CLI Subcommand**:
|
||||
- `warehouse-twin run-sim`: supports `--duration`, `--seed`, `--config-dir`, and `--output-events`.
|
||||
- Expanded test suite to **72 unit tests** (16 new Phase 3 tests, 100% pass rate in 0.37s).
|
||||
- Comprehensive Phase 3 implementation report in `docs/phases/phase_3_simulation_engine.md`.
|
||||
|
||||
## [0.3.0] - 2026-10-19
|
||||
|
||||
### Added - Phase 2: Robot and Task Models
|
||||
|
||||
Reference in New Issue
Block a user