예제 #1
0
파일: VrpSolver.cs 프로젝트: zhrsama/vrptw
        public int SearhForHighestDistance(Depot depot, List <Customer> customers)
        {
            int    index   = 0;
            double maxDist = 0;

            for (int i = 0; i < customers.Count; ++i)
            {
                double distance = depot.Distance(customers[i]);
                if (distance < maxDist)
                {
                    continue;
                }
                maxDist = distance;
                index   = i;
            }
            return(index);
        }