示例#1
0
        private void RemoveLast(IDvrpObject obj)
        {
            int ind = CurrentPath.FindLastIndex(i => i.Id == obj.Id);

            if (ind != CurrentPath.Count - 1)
            {
                throw new Exception("Removing not last index");
            }
            CurrentPath.RemoveAt(ind);
        }
示例#2
0
 private double ComputeDistance(IDvrpObject object1, IDvrpObject object2)
 {
     return(Math.Sqrt((object1.X - object2.X) * (object1.X - object2.X) +
                      (object1.Y - object2.Y) * (object1.Y - object2.Y)));
 }