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