diff --git a/AGVLogic/AGVNavigationCore/PathFinding/Planning/AGVPathfinder.cs b/AGVLogic/AGVNavigationCore/PathFinding/Planning/AGVPathfinder.cs index 015b440..54269dc 100644 --- a/AGVLogic/AGVNavigationCore/PathFinding/Planning/AGVPathfinder.cs +++ b/AGVLogic/AGVNavigationCore/PathFinding/Planning/AGVPathfinder.cs @@ -556,7 +556,7 @@ namespace AGVNavigationCore.PathFinding.Planning // 모니터방향이 일치하고 대상노드가 동일한 경로를 찾는다 var zonepath = GetMapZonePathData(); - // 모든 후보 경로 검색 + // 목적지가 특정 장비(StationType)인 경우를 우선 검색 var candidates = zonepath.Where(d => d.Monitor == monitorMode && d.NodeEnd == targetNode.StationType && @@ -564,6 +564,17 @@ namespace AGVNavigationCore.PathFinding.Planning d.Path.Any(p => p.StartsWith(targetNode.RfidId.ToString())) // 끝 포인트 포함 ).ToList(); + // 목적지가 일반 노드이거나 StationType이 매칭되지 않아 결과가 없을 경우, + // StationType 조건 없이 모니터 방향과 노드 포함 여부만으로 경로 검색 + if (!candidates.Any()) + { + candidates = zonepath.Where(d => + d.Monitor == monitorMode && + d.Path.Any(p => p.StartsWith(startNode.RfidId.ToString())) && // 시작 포인트 포함 + d.Path.Any(p => p.StartsWith(targetNode.RfidId.ToString())) // 끝 포인트 포함 + ).ToList(); + } + if (candidates.Any()) { MapZonePathData bestPath = null; diff --git a/NewMap.json b/NewMap.json index 9cd6640..88a5628 100644 --- a/NewMap.json +++ b/NewMap.json @@ -790,6 +790,6 @@ "BackgroundColorArgb": -14671840, "ShowGrid": false }, - "CreatedDate": "2026-02-25T10:37:38.4759999+09:00", + "CreatedDate": "2026-02-25T11:11:11.6577105+09:00", "Version": "1.3" } \ No newline at end of file