refactor: Convert AGVPathResult.Path from List<string> to List<MapNode>
## Summary - Changed Path property type from List<string> to List<MapNode> for better type safety - Eliminated O(n) node lookups throughout pathfinding system - Added DirectionalHelper with motor direction consistency bonus/penalty - Updated all path processing to work with MapNode objects directly ## Files Modified - AGVPathResult.cs: Path property and CreateSuccess() method signature - AStarPathfinder.cs: Path generation and node lookup optimization - AGVPathfinder.cs: Path processing with MapNode objects - DirectionChangePlanner.cs: Direction change planning with MapNode paths - DockingValidator.cs: Docking validation with direct node access - UnifiedAGVCanvas.Events.cs: Path visualization with MapNode iteration - UnifiedAGVCanvas.cs: Destination node access - VirtualAGV.cs: Path conversion to string IDs for storage - DirectionalHelper.cs: Enhanced with motor direction awareness - NodeMotorInfo.cs: Updated for new path structure ## Benefits - Performance: Eliminated O(n) lookup searches - Type Safety: Compile-time checking for node properties - Code Quality: Direct property access instead of repeated lookups - Maintainability: Single source of truth for node data ## Build Status ✅ AGVNavigationCore: Build successful (0 errors, 2 warnings) 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -272,7 +272,7 @@ namespace AGVNavigationCore.Models
|
||||
}
|
||||
|
||||
_currentPath = path;
|
||||
_remainingNodes = new List<string>(path.Path);
|
||||
_remainingNodes = new List<string>(path.Path.Select(n => n.NodeId).ToList());
|
||||
_currentNodeIndex = 0;
|
||||
|
||||
// 시작 노드와 목표 노드 설정
|
||||
|
||||
Reference in New Issue
Block a user