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); }