zhang
2025-10-29 df28be554875030e2958ce037ed9b9f48ae64cb8
json中加了2个虚拟点位9990和9991;空指针报错异常校验
2个文件已修改
19 ■■■■■ 已修改文件
algo-zkd/path_mapping.json 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
algo-zkd/src/main/java/com/algo/util/PathTimeCalculator.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
algo-zkd/path_mapping.json
@@ -3732,6 +3732,21 @@
        "y": 20
      }
    ],
    "9990": [
      {
        "x": 15,
        "y": 19
      }
    ],
    "9991": [
      {
        "x": 15,
        "y": 21
      }
    ],
    "318": [
      {
        "x": 17,
algo-zkd/src/main/java/com/algo/util/PathTimeCalculator.java
@@ -151,6 +151,10 @@
     * 计算转向时间
     */
    private double calculateTurnTime(PathCode fromCode, PathCode toCode, CTUPhysicalConfig config) {
        //增加空校验,提高代码健壮性
        if (fromCode == null || toCode == null){
           return 0.0;
        }
        if (fromCode.getDirection().equals(toCode.getDirection())) {
            return 0.0;
        }