Class SolutionFactory

    • Method Detail

      • emptySolution

        public static VehicleRoutingSolution emptySolution()
        Create an empty solution. Empty solution has zero locations, depots, visits and vehicles and a zero score.
        Returns:
        empty solution
      • solutionFromVisits

        public static VehicleRoutingSolution solutionFromVisits​(List<PlanningVehicle> vehicles,
                                                                PlanningDepot depot,
                                                                List<PlanningVisit> visits)
        Create a new solution from given vehicles, depot and visits. All vehicles will be placed in the depot.

        The returned solution's vehicles and locations are new collections so modifying the solution won't affect the collections given as arguments.

        Elements of the argument collections are NOT cloned.

        Parameters:
        vehicles - vehicles
        depot - depot
        visits - visits
        Returns:
        solution containing the given vehicles, depot, visits and their locations