Skip to content

feat: harden AMR dispatch runtime recovery#82

Merged
LeonDev1024 merged 7 commits into
masterfrom
release/v1.0.1
May 9, 2026
Merged

feat: harden AMR dispatch runtime recovery#82
LeonDev1024 merged 7 commits into
masterfrom
release/v1.0.1

Conversation

@LeonDev1024

Copy link
Copy Markdown
Owner

Summary

  • add recoverable order lifecycle state and runtime reconciliation between DB/cache/kernel
  • add Redis-backed runtime snapshots, map runtime validation/loading, and resource lock constraints
  • improve dispatch strategy, VDA5050 MQTT gateway behavior, withdrawal command flow, and regression tests

Tests

  • mvn -pl opentcs-algorithm,opentcs-applications/opentcs-order,opentcs-applications/opentcs-vehicle,opentcs-driver/opentcs-driver-adapter-vda5050 -am -DskipTests=false test

- 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[]
@LeonDev1024 LeonDev1024 merged commit 9cde2ba into master May 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant