Пример #1
0
 /// <summary> 搜尋最靠近車體位置的節點 </summary>
 /// <param name="a_atNodeLocal">[IN] node list </param>
 /// <param name="a_tCarInfo">[IN] car information </param>
 /// <returns> The closest node </returns>
 public static NodeId rtAGV_FindCurrentNode(rtAGV_MAP_node[] a_atNodeLocal, rtCarData a_tCarInfo)
 {
     NodeId tNodeId = new NodeId();
     double MinDistance = EMPTY_DATA;
     for (int i = 0; i < a_atNodeLocal.Length; i++)
     {
         double EachDistance = rtVectorOP_2D.GetDistance(a_atNodeLocal[i].tCoordinate, a_tCarInfo.tPosition);
         if (EachDistance <= MinDistance)
         {
             MinDistance = EachDistance;
             tNodeId = a_atNodeLocal[i].tNodeId;
         }
     }
     return tNodeId;
 }
Пример #2
0
        public static NodeId FindPathofRegion()
        {
            NodeId tNodeId = new NodeId();

            return tNodeId;
        }