일반노드이동기능 추가
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user