private SolutionSet CreateFirstSolutionSet(Point[] points) { var partialSolutions = new PartialSolution[SolutionSet.BeamWith]; for (int i = 0; i < SolutionSet.BeamWith; i++) { partialSolutions[i] = new PartialSolution(points[i]); } return(new SolutionSet(partialSolutions, points.Length)); }
public PartialSolution(PartialSolution paritalSolution, PartialSolutionTail partialSolutionTail, int id) { this.Id = id; var points = paritalSolution.Points.ToList(); points.AddRange(partialSolutionTail.Points); this.Points = points.ToArray(); var length = this.Points.Length; this.DistanceClosed += partialSolutionTail.ClosedDistance; this.DistanceOpen = paritalSolution.DistanceOpen + partialSolutionTail.DistanceOpen; this.LastPoint = partialSolutionTail.LastPoint; }
public PartialSolutionTail(PartialSolution partialSolution) { this.Head = partialSolution; this.Points = new Point[0]; }