노드정리(삭제노드 제거 및 5번노드 제거로 인한 경로 업데이트)

This commit is contained in:
backuppc
2026-02-25 11:07:08 +09:00
parent 12b3fe50c7
commit 6a658879f1
3 changed files with 140 additions and 406 deletions

View File

@@ -181,186 +181,6 @@ namespace AGVNavigationCore.PathFinding.Core
}
}
///// <summary>
///// 경유지를 거쳐 경로 찾기 (오버로드)
///// 여러 경유지를 순차적으로 거쳐서 최종 목적지까지의 경로를 계산합니다.
///// 기존 FindPath를 여러 번 호출하여 각 구간의 경로를 합칩니다.
///// </summary>
///// <param name="startNodeId">시작 노드 ID</param>
///// <param name="endNodeId">최종 목적지 노드 ID</param>
///// <param name="waypointNodeIds">경유지 노드 ID 배열 (선택사항)</param>
///// <returns>경로 계산 결과 (모든 경유지를 거친 전체 경로)</returns>
//public AGVPathResult FindPath(string startNodeId, string endNodeId, params string[] waypointNodeIds)
//{
// var stopwatch = System.Diagnostics.Stopwatch.StartNew();
// try
// {
// // 경유지가 없으면 기본 FindPath 호출
// if (waypointNodeIds == null || waypointNodeIds.Length == 0)
// {
// return FindPathAStar(startNodeId, endNodeId);
// }
// // 경유지 유효성 검증
// var validWaypoints = new List<string>();
// foreach (var waypointId in waypointNodeIds)
// {
// if (string.IsNullOrEmpty(waypointId))
// continue;
// if (!_nodeMap.ContainsKey(waypointId))
// {
// return AGVPathResult.CreateFailure($"경유지 노드를 찾을 수 없습니다: {waypointId}", stopwatch.ElapsedMilliseconds, 0);
// }
// validWaypoints.Add(waypointId);
// }
// // 경유지가 없으면 기본 경로 계산
// if (validWaypoints.Count == 0)
// {
// return FindPathAStar(startNodeId, endNodeId);
// }
// // 첫 번째 경유지가 시작노드와 같은지 검사
// if (validWaypoints[0] == startNodeId)
// {
// return AGVPathResult.CreateFailure(
// $"첫 번째 경유지({validWaypoints[0]})가 시작 노드({startNodeId})와 동일합니다. 경유지는 시작노드와 달라야 합니다.",
// stopwatch.ElapsedMilliseconds, 0);
// }
// // 마지막 경유지가 목적지노드와 같은지 검사
// if (validWaypoints[validWaypoints.Count - 1] == endNodeId)
// {
// return AGVPathResult.CreateFailure(
// $"마지막 경유지({validWaypoints[validWaypoints.Count - 1]})가 목적지 노드({endNodeId})와 동일합니다. 경유지는 목적지노드와 달라야 합니다.",
// stopwatch.ElapsedMilliseconds, 0);
// }
// // 연속된 중복만 제거 (순서 유지)
// // 예: [1, 2, 2, 3, 2] -> [1, 2, 3, 2] (연속 중복만 제거)
// var deduplicatedWaypoints = new List<string>();
// string lastWaypoint = null;
// foreach (var waypoint in validWaypoints)
// {
// if (waypoint != lastWaypoint)
// {
// deduplicatedWaypoints.Add(waypoint);
// lastWaypoint = waypoint;
// }
// }
// validWaypoints = deduplicatedWaypoints;
// // 최종 경로 리스트와 누적 값
// var combinedPath = new List<MapNode>();
// float totalDistance = 0;
// long totalCalculationTime = 0;
// // 현재 시작점
// string currentStart = startNodeId;
// // 1단계: 각 경유지까지의 경로 계산
// for (int i = 0; i < validWaypoints.Count; i++)
// {
// string waypoint = validWaypoints[i];
// // 현재 위치에서 경유지까지의 경로 계산
// var segmentResult = FindPathAStar(currentStart, waypoint);
// if (!segmentResult.Success)
// {
// return AGVPathResult.CreateFailure(
// $"경유지 {i + 1}({waypoint})까지의 경로 계산 실패: {segmentResult.ErrorMessage}",
// stopwatch.ElapsedMilliseconds, 0);
// }
// // 경로 합치기 (첫 번째 구간이 아니면 시작점 제거하여 중복 방지)
// if (combinedPath.Count > 0 && segmentResult.Path.Count > 0)
// {
// // 시작 노드 제거 (이전 경로의 마지막 노드와 동일)
// combinedPath.AddRange(segmentResult.Path.Skip(1));
// }
// else
// {
// combinedPath.AddRange(segmentResult.Path);
// }
// totalDistance += segmentResult.TotalDistance;
// totalCalculationTime += segmentResult.CalculationTimeMs;
// // 다음 경유지의 시작점은 현재 경유지
// currentStart = waypoint;
// }
// // 2단계: 마지막 경유지에서 최종 목적지까지의 경로 계산
// var finalSegmentResult = FindPathAStar(currentStart, endNodeId);
// if (!finalSegmentResult.Success)
// {
// return AGVPathResult.CreateFailure(
// $"최종 목적지까지의 경로 계산 실패: {finalSegmentResult.ErrorMessage}",
// stopwatch.ElapsedMilliseconds, 0);
// }
// // 최종 경로 합치기 (시작점 제거)
// if (combinedPath.Count > 0 && finalSegmentResult.Path.Count > 0)
// {
// combinedPath.AddRange(finalSegmentResult.Path.Skip(1));
// }
// else
// {
// combinedPath.AddRange(finalSegmentResult.Path);
// }
// totalDistance += finalSegmentResult.TotalDistance;
// totalCalculationTime += finalSegmentResult.CalculationTimeMs;
// stopwatch.Stop();
// // 결과 생성
// return AGVPathResult.CreateSuccess(
// combinedPath,
// new List<AgvDirection>(),
// totalDistance,
// totalCalculationTime
// );
// }
// catch (Exception ex)
// {
// return AGVPathResult.CreateFailure($"경로 계산 중 오류: {ex.Message}", stopwatch.ElapsedMilliseconds, 0);
// }
//}
///// <summary>
///// 여러 목적지 중 가장 가까운 노드로의 경로 찾기
///// </summary>
///// <param name="startNodeId">시작 노드 ID</param>
///// <param name="targetNodeIds">목적지 후보 노드 ID 목록</param>
///// <returns>경로 계산 결과</returns>
//public AGVPathResult FindNearestPath(string startNodeId, List<string> targetNodeIds)
//{
// if (targetNodeIds == null || targetNodeIds.Count == 0)
// {
// return AGVPathResult.CreateFailure("목적지 노드가 지정되지 않았습니다", 0, 0);
// }
// AGVPathResult bestResult = null;
// foreach (var targetId in targetNodeIds)
// {
// var result = FindPathAStar(startNodeId, targetId);
// if (result.Success && (bestResult == null || result.TotalDistance < bestResult.TotalDistance))
// {
// bestResult = result;
// }
// }
// return bestResult ?? AGVPathResult.CreateFailure("모든 목적지로의 경로를 찾을 수 없습니다", 0, 0);
//}
/// <summary>
/// 휴리스틱 거리 계산 (유클리드 거리)
/// </summary>

View File

@@ -464,44 +464,44 @@ namespace AGVNavigationCore.PathFinding.Planning
var retval = new List<MapZonePathData>();
// Buffer -> ...
retval.Add(new MapZonePathData { NodeSta = StationType.Buffer, NodeEnd = StationType.Charger, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "36F", "35F", "31F", "32F", "33F", "34F", "7F", "12F", "11B", "5B", "6B", "73B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Buffer, NodeEnd = StationType.Charger, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "36B", "35B", "31B", "32B", "33B", "34B", "7B", "10B", "6B", "73B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Buffer, NodeEnd = StationType.Plating, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "36F", "35F", "31F", "32F", "33F", "34F", "7F", "12F", "11B", "5B", "72B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Buffer, NodeEnd = StationType.Plating, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "36B", "35B", "31B", "32B", "33B", "34B", "7B", "12B", "11B", "3T", "3B", "11B", "5B", "72B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Buffer, NodeEnd = StationType.Loader, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "36F", "35F", "31F", "32F", "33F", "34F", "7F", "12F", "11F", "3B", "4B", "71B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Buffer, NodeEnd = StationType.Loader, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "36B", "35B", "31B", "32B", "33B", "34B", "7B", "12B", "11B", "3T", "3B", "4B", "71B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Buffer, NodeEnd = StationType.Cleaner, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "36F", "35F", "31F", "32F", "33F", "34F", "7F", "12F", "11F", "3T", "3B", "2B", "1B", "70B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Buffer, NodeEnd = StationType.Cleaner, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "36B", "35B", "31B", "32B", "33B", "34B", "7B", "12B", "11B", "3B", "2B", "1B", "70B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Buffer, NodeEnd = StationType.Charger, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "36F", "35F", "31F", "32F", "33F", "34F", "20F", "9F", "8F", "7F", "11F", "3T", "3F", "11F", "7B", "10B", "6B", "73B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Buffer, NodeEnd = StationType.Charger, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "36B", "35B", "31B", "32B", "33B", "34B", "20B", "9B", "8B", "7B", "10B", "6B", "73B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Buffer, NodeEnd = StationType.Plating, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "36F", "35F", "31F", "32F", "33F", "34F", "20F", "9F", "8F", "7F", "11B", "72B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Buffer, NodeEnd = StationType.Plating, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "36B", "35B", "31B", "32B", "33B", "34B", "20B", "9B", "8B", "7B", "11B", "3T", "3B", "11B", "72B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Buffer, NodeEnd = StationType.Loader, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "36F", "35F", "31F", "32F", "33F", "34F", "20F", "9F", "8F", "7F", "11F", "3B", "71B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Buffer, NodeEnd = StationType.Loader, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "36B", "35B", "31B", "32B", "33B", "34B", "20B", "9B", "8B", "7B", "11B", "3T", "3B", "71B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Buffer, NodeEnd = StationType.Cleaner, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "36F", "35F", "31F", "32F", "33F", "34F", "20F", "9F", "8F", "7F", "11F", "3T", "3B", "70B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Buffer, NodeEnd = StationType.Cleaner, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "36B", "35B", "31B", "32B", "33B", "34B", "20B", "9B", "8B", "7B", "11B", "3B", "70B" } });
// Loader -> ...
retval.Add(new MapZonePathData { NodeSta = StationType.Loader, NodeEnd = StationType.Cleaner, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "71B", "4B", "3B", "2B", "1B", "70B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Loader, NodeEnd = StationType.Cleaner, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "71F", "4F", "3T", "3B", "2B", "1B", "70B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Loader, NodeEnd = StationType.Charger, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "71B", "4B", "3T", "3B", "11B", "5B", "6B", "73B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Loader, NodeEnd = StationType.Charger, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "71F", "4F", "3B", "11B", "5B", "6B", "73B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Loader, NodeEnd = StationType.Plating, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "71B", "4B", "3T", "3B", "11B", "5B", "72B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Loader, NodeEnd = StationType.Plating, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "71F", "4F", "3B", "11B", "5B", "72B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Loader, NodeEnd = StationType.Buffer, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "71B", "4B", "3T", "3B", "11B", "12B", "7B", "8B", "9B", "34B", "33B", "32B", "31B", "35B", "36B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Loader, NodeEnd = StationType.Buffer, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "71F", "4F", "3B", "11B", "12B", "7B", "8B", "9B", "34B", "33B", "32B", "31B", "35B", "36B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Loader, NodeEnd = StationType.Cleaner, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "71B", "3B", "70B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Loader, NodeEnd = StationType.Cleaner, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "71F", "3T", "3B", "70B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Loader, NodeEnd = StationType.Charger, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "71B", "3F", "11F", "7B", "10B", "6B", "73B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Loader, NodeEnd = StationType.Charger, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "71F", "3T", "3F", "11F", "7B", "10B", "6B", "73B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Loader, NodeEnd = StationType.Plating, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "71B", "3T", "3B", "11B", "72B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Loader, NodeEnd = StationType.Plating, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "71F", "3B", "11B", "72B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Loader, NodeEnd = StationType.Buffer, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "71B", "3T", "3B", "11B", "7B", "8B", "9B", "20B", "34B", "33B", "32B", "31B", "35B", "36B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Loader, NodeEnd = StationType.Buffer, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "71F", "3B", "11B", "7B", "8B", "9B", "20B", "34B", "33B", "32B", "31B", "35B", "36B" } });
// Cleaner -> ...
retval.Add(new MapZonePathData { NodeSta = StationType.Cleaner, NodeEnd = StationType.Loader, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "70F", "1F", "2F", "3T", "3B", "4B", "71B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Cleaner, NodeEnd = StationType.Loader, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "70B", "1B", "2B", "3B", "4B", "71B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Cleaner, NodeEnd = StationType.Charger, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "70F", "1F", "2F", "3T", "3B", "11B", "5B", "6B", "73B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Cleaner, NodeEnd = StationType.Charger, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "70B", "1B", "2B", "3B", "11B", "5B", "6B", "73B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Cleaner, NodeEnd = StationType.Plating, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "70F", "1F", "2F", "3T", "3B", "11B", "5B", "72B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Cleaner, NodeEnd = StationType.Plating, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "70B", "1B", "2B", "3B", "11B", "5B", "72B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Cleaner, NodeEnd = StationType.Buffer, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "70F", "1F", "2F", "3T", "3B", "11B", "12B", "7B", "8B", "9B", "34B", "33B", "32B", "31B", "35B", "36B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Cleaner, NodeEnd = StationType.Buffer, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "70B", "1B", "2B", "3B", "11B", "12B", "7B", "8B", "9B", "34B", "33B", "32B", "31B", "35B", "36B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Cleaner, NodeEnd = StationType.Loader, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "70F", "3T", "3B", "71B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Cleaner, NodeEnd = StationType.Loader, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "70B", "3B", "71B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Cleaner, NodeEnd = StationType.Charger, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "70F", "3F", "11F", "7B", "10B", "6B", "73B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Cleaner, NodeEnd = StationType.Charger, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "70B", "3T", "3F", "11F", "7B", "10B", "6B", "73B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Cleaner, NodeEnd = StationType.Plating, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "70F", "3T", "3B", "11B", "72B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Cleaner, NodeEnd = StationType.Plating, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "70B", "3B", "11B", "72B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Cleaner, NodeEnd = StationType.Buffer, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "70F", "3T", "3B", "11B", "7B", "8B", "9B", "20B", "34B", "33B", "32B", "31B", "35B", "36B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Cleaner, NodeEnd = StationType.Buffer, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "70B", "3B", "11B", "7B", "8B", "9B", "20B", "34B", "33B", "32B", "31B", "35B", "36B" } });
// Plating -> ...
retval.Add(new MapZonePathData { NodeSta = StationType.Plating, NodeEnd = StationType.Loader, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "72F", "5F", "11F", "3B", "4B", "71B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Plating, NodeEnd = StationType.Loader, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "72B", "5B", "11B", "3T", "3B", "4B", "71B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Plating, NodeEnd = StationType.Charger, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "72F", "5F", "11B", "5B", "6B", "73B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Plating, NodeEnd = StationType.Charger, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "72B", "5B", "11B", "3T", "3B", "11B", "5B", "6B", "73B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Plating, NodeEnd = StationType.Cleaner, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "72F", "5F", "11F", "3T", "3B", "2B", "1B", "70B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Plating, NodeEnd = StationType.Cleaner, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "72B", "5B", "11B", "3B", "2B", "1B", "70B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Plating, NodeEnd = StationType.Buffer, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "72F", "5F", "11B", "12B", "7B", "8B", "9B", "34B", "33B", "32B", "31B", "35B", "36B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Plating, NodeEnd = StationType.Buffer, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "72B", "5B", "11B", "3T", "3B", "11B", "12B", "7B", "8B", "9B", "34B", "33B", "32B", "31B", "35B", "36B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Plating, NodeEnd = StationType.Loader, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "72F", "11F", "3B", "71B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Plating, NodeEnd = StationType.Loader, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "72B", "11B", "3T", "3B", "71B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Plating, NodeEnd = StationType.Charger, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "72F", "11F", "3T", "3F", "11F", "7B", "10B", "6B", "73B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Plating, NodeEnd = StationType.Charger, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "72B", "11B", "3F", "11F", "7B", "10B", "6B", "73B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Plating, NodeEnd = StationType.Cleaner, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "72F", "11F", "3T", "3B", "70B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Plating, NodeEnd = StationType.Cleaner, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "72B", "11B", "3B", "70B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Plating, NodeEnd = StationType.Buffer, Monitor = MapZoneMonitor.RightBtm, Path = new List<string> { "72F", "11B", "7B", "8B", "9B", "20B", "34B", "33B", "32B", "31B", "35B", "36B" } });
retval.Add(new MapZonePathData { NodeSta = StationType.Plating, NodeEnd = StationType.Buffer, Monitor = MapZoneMonitor.LeftTop, Path = new List<string> { "72B", "11B", "3T", "3B", "11B", "7B", "8B", "9B", "20B", "34B", "33B", "32B", "31B", "35B", "36B" } });
return retval;
}
@@ -526,12 +526,12 @@ namespace AGVNavigationCore.PathFinding.Planning
{
Dictionary<MapZone, int[]> ZoneList = new Dictionary<MapZone, int[]>();
ZoneList.Add(MapZone.Turn, new int[] { 3 });
ZoneList.Add(MapZone.Buffer, new int[] { 91, 36, 35, 31, 32, 33, 34, 9, 8, 7 });
ZoneList.Add(MapZone.Buffer, new int[] { 91, 36, 35, 31, 32, 33, 34, 20, 9, 8, 7 });
ZoneList.Add(MapZone.Charger, new int[] { 73, 6, 10 });
ZoneList.Add(MapZone.Junction, new int[] { 12, 11 });
ZoneList.Add(MapZone.Plating, new int[] { 72, 5 });
ZoneList.Add(MapZone.Loader, new int[] { 71, 4 });
ZoneList.Add(MapZone.Cleaner, new int[] { 70, 1, 2 });
ZoneList.Add(MapZone.Junction, new int[] { 11 });
ZoneList.Add(MapZone.Plating, new int[] { 72 });
ZoneList.Add(MapZone.Loader, new int[] { 71 });
ZoneList.Add(MapZone.Cleaner, new int[] { 70 });
return ZoneList;
}
@@ -712,9 +712,9 @@ namespace AGVNavigationCore.PathFinding.Planning
{
case MapZone.Buffer: exitRfid = 7; break;
case MapZone.Charger: exitRfid = 10; break; // Or 6? Assuming 10 based on flow
case MapZone.Plating: exitRfid = 5; break;
case MapZone.Loader: exitRfid = 4; break;
case MapZone.Cleaner: exitRfid = 1; break;
case MapZone.Plating: exitRfid = 72; break;
case MapZone.Loader: exitRfid = 71; break;
case MapZone.Cleaner: exitRfid = 70; break;
case MapZone.Junction: return null;
}
return _mapNodes.FirstOrDefault(n => n.RfidId == exitRfid);
@@ -731,9 +731,9 @@ namespace AGVNavigationCore.PathFinding.Planning
// Let's assume Entry = Exit for single-lane spurs, or define specific entry points.
// If Buffer is 91~07, maybe Entry is 7?
case MapZone.Charger: entryRfid = 10; break;
case MapZone.Plating: entryRfid = 5; break;
case MapZone.Loader: entryRfid = 4; break;
case MapZone.Cleaner: entryRfid = 1; break;
case MapZone.Plating: entryRfid = 72; break;
case MapZone.Loader: entryRfid = 71; break;
case MapZone.Cleaner: entryRfid = 70; break;
}
return _mapNodes.FirstOrDefault(n => n.RfidId == entryRfid);
}

View File

@@ -6,7 +6,7 @@
"DockDirection": 2,
"MagnetDirections": {},
"ConnectedNodes": [
"10"
"N031"
],
"CanTurnLeft": false,
"CanTurnRight": false,
@@ -21,17 +21,17 @@
"ID2": "0070(*N001)",
"Id": "N001",
"Type": 0,
"Position": "448, 249"
"Position": "540, 292"
},
{
"StationType": 2,
"CanDocking": true,
"DockDirection": 2,
"MagnetDirections": {
"5": 0
"N034": 1
},
"ConnectedNodes": [
"5"
"N034"
],
"CanTurnLeft": false,
"CanTurnRight": false,
@@ -46,7 +46,7 @@
"ID2": "0072(*N010)",
"Id": "N010",
"Type": 0,
"Position": "292, 484"
"Position": "327, 484"
},
{
"StationType": 4,
@@ -55,7 +55,7 @@
"MagnetDirections": {},
"ConnectedNodes": [
"N005",
"1"
"N036"
],
"CanTurnLeft": false,
"CanTurnRight": false,
@@ -70,7 +70,7 @@
"ID2": "0034(*N018)",
"Id": "N018",
"Type": 0,
"Position": "319, 620"
"Position": "312, 667"
},
{
"StationType": 4,
@@ -94,7 +94,7 @@
"ID2": "0033(*N005)",
"Id": "N005",
"Type": 0,
"Position": "278, 620"
"Position": "265, 667"
},
{
"StationType": 4,
@@ -118,7 +118,7 @@
"ID2": "0032(*N020)",
"Id": "N020",
"Type": 0,
"Position": "235, 621"
"Position": "214, 666"
},
{
"StationType": 4,
@@ -142,7 +142,7 @@
"ID2": "0031(*N021)",
"Id": "N021",
"Type": 0,
"Position": "194, 620"
"Position": "165, 667"
},
{
"StationType": 0,
@@ -150,8 +150,8 @@
"DockDirection": 0,
"MagnetDirections": {},
"ConnectedNodes": [
"N018",
"2"
"2",
"N036"
],
"CanTurnLeft": false,
"CanTurnRight": false,
@@ -166,7 +166,7 @@
"ID2": "0009(*1)",
"Id": "1",
"Type": 0,
"Position": "363, 620"
"Position": "398, 664"
},
{
"StationType": 0,
@@ -190,7 +190,7 @@
"ID2": "0008(*2)",
"Id": "2",
"Type": 0,
"Position": "404, 620"
"Position": "433, 650"
},
{
"StationType": 0,
@@ -198,12 +198,12 @@
"DockDirection": 0,
"MagnetDirections": {
"N033": 1,
"N035": 2
"N034": 2
},
"ConnectedNodes": [
"2",
"N033",
"N035"
"N034"
],
"CanTurnLeft": false,
"CanTurnRight": false,
@@ -218,42 +218,17 @@
"ID2": "0007(*4)",
"Id": "4",
"Type": 0,
"Position": "443, 620"
},
{
"StationType": 0,
"CanDocking": false,
"DockDirection": 0,
"MagnetDirections": {
"N034": 1,
"N010": 0
},
"ConnectedNodes": [
"N010",
"N034"
],
"CanTurnLeft": false,
"CanTurnRight": false,
"DisableCross": false,
"SpeedLimit": 0,
"AliasName": "",
"IsActive": true,
"RfidId": 5,
"NodeTextForeColor": "",
"NodeTextFontSize": 7.0,
"Text": "",
"ID2": "0005(*5)",
"Id": "5",
"Type": 0,
"Position": "441, 485"
"Position": "444, 611"
},
{
"StationType": 1,
"CanDocking": true,
"DockDirection": 2,
"MagnetDirections": {},
"MagnetDirections": {
"N031": 0
},
"ConnectedNodes": [
"7"
"N031"
],
"CanTurnLeft": false,
"CanTurnRight": false,
@@ -268,33 +243,7 @@
"ID2": "0071(*6)",
"Id": "6",
"Type": 0,
"Position": "571, 507"
},
{
"StationType": 0,
"CanDocking": false,
"DockDirection": 0,
"MagnetDirections": {
"N031": 0
},
"ConnectedNodes": [
"6",
"N031"
],
"CanTurnLeft": false,
"CanTurnRight": false,
"DisableCross": false,
"SpeedLimit": 0,
"AliasName": "",
"IsActive": true,
"RfidId": 4,
"NodeTextForeColor": "",
"NodeTextFontSize": 7.0,
"Text": "",
"ID2": "0004(*7)",
"Id": "7",
"Type": 0,
"Position": "571, 448"
"Position": "566, 482"
},
{
"StationType": 5,
@@ -317,55 +266,7 @@
"ID2": "0073(*8)",
"Id": "8",
"Type": 0,
"Position": "327, 381"
},
{
"StationType": 0,
"CanDocking": false,
"DockDirection": 0,
"MagnetDirections": {},
"ConnectedNodes": [
"10",
"N031"
],
"CanTurnLeft": false,
"CanTurnRight": false,
"DisableCross": false,
"SpeedLimit": 0,
"AliasName": "",
"IsActive": true,
"RfidId": 2,
"NodeTextForeColor": "",
"NodeTextFontSize": 7.0,
"Text": "",
"ID2": "0002(*9)",
"Id": "9",
"Type": 0,
"Position": "565, 297"
},
{
"StationType": 0,
"CanDocking": false,
"DockDirection": 0,
"MagnetDirections": {},
"ConnectedNodes": [
"9",
"N001"
],
"CanTurnLeft": false,
"CanTurnRight": false,
"DisableCross": false,
"SpeedLimit": 0,
"AliasName": "",
"IsActive": true,
"RfidId": 1,
"NodeTextForeColor": "",
"NodeTextFontSize": 7.0,
"Text": "",
"ID2": "0001(*10)",
"Id": "10",
"Type": 0,
"Position": "514, 247"
"Position": "329, 380"
},
{
"StationType": 6,
@@ -388,7 +289,7 @@
"ID2": "0091(*N027)",
"Id": "N027",
"Type": 0,
"Position": "70, 620"
"Position": "31, 665"
},
{
"StationType": 4,
@@ -412,7 +313,7 @@
"ID2": "0035(*N028)",
"Id": "N028",
"Type": 0,
"Position": "153, 620"
"Position": "119, 667"
},
{
"StationType": 4,
@@ -436,35 +337,35 @@
"ID2": "0036(*N029)",
"Id": "N029",
"Type": 0,
"Position": "110, 619"
"Position": "78, 667"
},
{
"StationType": 0,
"CanDocking": false,
"DockDirection": 0,
"MagnetDirections": {
"7": 0,
"6": 0,
"N034": 2
},
"ConnectedNodes": [
"9",
"7",
"N034"
"N034",
"6",
"N001"
],
"CanTurnLeft": true,
"CanTurnRight": true,
"DisableCross": false,
"SpeedLimit": 1,
"AliasName": "",
"AliasName": "TURN",
"IsActive": true,
"RfidId": 3,
"NodeTextForeColor": "Black",
"NodeTextFontSize": 7.0,
"Text": "",
"Text": "Turn",
"ID2": "0003(*N031)",
"Id": "N031",
"Type": 0,
"Position": "568, 354"
"Position": "566, 341"
},
{
"StationType": 0,
@@ -517,21 +418,21 @@
"ID2": "0010(*N033)",
"Id": "N033",
"Type": 0,
"Position": "413, 525"
"Position": "416, 524"
},
{
"StationType": 0,
"CanDocking": false,
"DockDirection": 0,
"MagnetDirections": {
"N035": 0,
"5": 2,
"4": 1,
"N010": 2,
"N031": 1
},
"ConnectedNodes": [
"N031",
"N035",
"5"
"4",
"N010"
],
"CanTurnLeft": false,
"CanTurnRight": false,
@@ -546,19 +447,16 @@
"ID2": "0011(*N034)",
"Id": "N034",
"Type": 0,
"Position": "524, 437"
"Position": "524, 436"
},
{
"StationType": 0,
"CanDocking": false,
"DockDirection": 0,
"MagnetDirections": {
"4": 0,
"N034": 0
},
"MagnetDirections": {},
"ConnectedNodes": [
"N034",
"4"
"N018",
"1"
],
"CanTurnLeft": false,
"CanTurnRight": false,
@@ -566,14 +464,14 @@
"SpeedLimit": 1,
"AliasName": "",
"IsActive": true,
"RfidId": 12,
"RfidId": 20,
"NodeTextForeColor": "Black",
"NodeTextFontSize": 7.0,
"Text": "",
"ID2": "0012(*N035)",
"Id": "N035",
"ID2": "0020(*N036)",
"Id": "N036",
"Type": 0,
"Position": "467, 524"
"Position": "356, 666"
}
],
"Labels": [],
@@ -727,12 +625,12 @@
"Magnets": [
{
"P1": {
"X": 439.0,
"Y": 623.0
"X": 395.0,
"Y": 666.0
},
"P2": {
"X": 69.0,
"Y": 621.0
"X": 17.0,
"Y": 666.0
},
"ControlPoint": null,
"Id": "5a0edec2-7ac3-4c99-bbb4-8debde0c1d07",
@@ -740,12 +638,12 @@
},
{
"P1": {
"X": 569.0,
"Y": 509.0
"X": 566.0,
"Y": 528.0
},
"P2": {
"X": 565.16556848250036,
"Y": 295.44573330767145
"X": 565.0,
"Y": 340.0
},
"ControlPoint": null,
"Id": "a5424add-e8c9-483c-a5db-733dca1b8f57",
@@ -753,11 +651,11 @@
},
{
"P1": {
"X": 528.0,
"Y": 487.0
"X": 511.0,
"Y": 483.0
},
"P2": {
"X": 275.0,
"X": 304.0,
"Y": 484.0
},
"ControlPoint": null,
@@ -766,12 +664,12 @@
},
{
"P1": {
"X": 440.0,
"Y": 249.0
"X": 425.0,
"Y": 290.0
},
"P2": {
"X": 513.0,
"Y": 248.0
"X": 498.0,
"Y": 289.0
},
"ControlPoint": null,
"Id": "92527d4a-8e63-404f-86e8-37568bd4790e",
@@ -779,28 +677,28 @@
},
{
"P1": {
"X": 512.0,
"Y": 248.0
"X": 499.0,
"Y": 289.0
},
"P2": {
"X": 566.0,
"Y": 302.0
"X": 565.0,
"Y": 341.0
},
"ControlPoint": {
"X": 566.0,
"Y": 241.0
"X": 564.0,
"Y": 282.0
},
"Id": "0db9553a-f203-478d-8c17-e07f00987828",
"Type": 4
},
{
"P1": {
"X": 481.0,
"Y": 486.0
"X": 482.0,
"Y": 484.0
},
"P2": {
"X": 565.0,
"Y": 388.0
"Y": 386.0
},
"ControlPoint": null,
"Id": "N032",
@@ -809,11 +707,11 @@
{
"P1": {
"X": 443.0,
"Y": 622.0
"Y": 623.0
},
"P2": {
"X": 442.0,
"Y": 579.0
"X": 443.0,
"Y": 568.0
},
"ControlPoint": null,
"Id": "N031",
@@ -821,7 +719,7 @@
},
{
"P1": {
"X": 442.0,
"X": 447.0,
"Y": 579.0
},
"P2": {
@@ -847,12 +745,12 @@
},
{
"P1": {
"X": 327.0,
"Y": 329.0
"X": 328.0,
"Y": 330.0
},
"P2": {
"X": 327.0,
"Y": 411.0
"X": 328.0,
"Y": 412.0
},
"ControlPoint": null,
"Id": "N033",
@@ -864,18 +762,34 @@
"Y": 481.0
},
"P2": {
"X": 443.0,
"Y": 578.0
"X": 442.0,
"Y": 579.0
},
"ControlPoint": null,
"Id": "N035",
"Type": 4
},
{
"P1": {
"X": 442.0,
"Y": 611.0
},
"P2": {
"X": 394.0,
"Y": 664.0
},
"ControlPoint": {
"X": 445.0,
"Y": 671.0
},
"Id": "N039",
"Type": 4
}
],
"Settings": {
"BackgroundColorArgb": -14671840,
"ShowGrid": false
},
"CreatedDate": "2026-02-12T09:53:53.0138602+09:00",
"CreatedDate": "2026-02-25T10:37:38.4759999+09:00",
"Version": "1.3"
}