Example #1
0
        private void FindPath(string StartID, string EndID)
        {
            RoutePlanner    planner     = new RoutePlanner();
            RoutePlanResult routeresult = planner.Plan(NodeList, StartID, EndID);
            Result          result      = new Result();

            result.StrResultNode = routeresult.ResultNodes;
            result.EndNodeID     = EndID;
            if (result.StrResultNode == null)
            {
                int i = Convert.ToInt32(StartID);
                int j = Convert.ToInt32(EndID);
                MessageBox.Show(i.ToString() + ":" + j.ToString());
            }
            ResultList.Add(result);
        }
Example #2
0
        public void FindPath(string StartID, string depotName, string[] EndID)
        {
            RoutePlanner planner = new RoutePlanner();

            RoutePlanResult[] RouteResult = new RoutePlanResult[EndID.Length];
            RouteResult = planner.Plan(NodeList, StartID, EndID);
            for (int i = 0; i < EndID.Length; i++)
            {
                Result result = new Result();
                result.DepotName       = depotName;
                result.WeightTime      = RouteResult[i].WeightValues;
                result.dynamicschedule = false;
                result.EndNodeID       = EndID[i];
                result.StrResultNode   = RouteResult[i].ResultNodes;
                ResultList.Add(result);
            }
        }