feat: harden AMR dispatch runtime recovery#82
Merged
Conversation
- vehicleId: sim-v-1 → sim-v-001(3位补零) - 显示名: AGV-1 → sim-001(3位补零,与前端展示规范对齐)
- stopSimulation() 中显式调用 vehicleSimulator/orderSimulator/trafficSimulator.stop() - 解决旧 TestVehicle 车辆在重启后残留的问题 - SimulationEngine.stop() 不调用模块 stop(),需控制器层补充
1. SimulationScheduledTask 改为默认禁用(@ConditionalOnProperty) - 定时任务自动启动并创建 TestVehicle,导致与手动仿真抢占引擎 - 需显式配置 simulation.schedule.enabled=true 才会激活 2. startSimulation() 强制停止旧仿真再启动 - 引擎已 RUNNING 时 start() 直接返回,车辆加入但无 tick 驱动 - 现在先 stop 再完整初始化,保证干净启动 3. 订单生成率从 0.1 提升至 2.0(约 2 个/秒) - 原来每 10 秒才生成 1 个订单,车辆长期空闲看起来不动 - 现在约 0.5 秒/订单,4 辆车可在 2 秒内全部分配到任务
- setMap() 接收工厂模型 ID,查询旗下所有导航地图合并点位 - 返回第一张导航地图的字符串 mapId(navMapStringId)供前端加载拓扑 - startSimulation() 重启时从工厂模型重新合并所有导航地图点位 - 新增 currentFactoryModelId 字段跟踪当前工厂模型
- 新增 SimMapEdge / SimMapGraph:有向图 + Dijkstra 路径规划 - SimulationMapService 加载路径(PathDTO)并构建拓扑图 - SimulatedVehicle 支持多航点路径跟随(moveByRoute) - OrderAllocator 利用拓扑图规划 车辆→起点→终点 完整路径 - SimulatedOrder 存储预计算路径(routeToStart/routeToEnd) - OrderSimulator 注入 mapGraph 接口 - SimulationController 加载并注入拓扑图,快照返回剩余航点 route[]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tests