/// <summary> /// Clones this solution. /// </summary> /// <returns></returns> public override object Clone() { int[] first = new int[this.Count]; for (int idx = 0; idx < this.Count; idx++) { IRoute route = this.Route(idx); if (route.Count > 0) { first[idx] = route.ElementAt <int>(1); } else { first[idx] = -1; } } return(new DepotDynamicAsymmetricMultiRoute(first, _next_array.Clone() as int[])); }
/// <summary> /// Creates a deep-copy of this solution. /// </summary> /// <returns></returns> public override object Clone() { int[] first = new int[this.Count]; for (int idx = 0; idx < this.Count; idx++) { IRoute route = this.Route(idx); if (route.Count > 1) { first[idx] = route.ElementAt <int>(1); } else { first[idx] = -1; } } return(new MaxTimeSolution(first, _next_array.Clone() as int[])); }