class SolutionFactory {

    public static VehicleRoutingSolution solutionFromVisits(
            List<PlanningVehicle> vehicles,
            PlanningDepot depot,
            List<PlanningVisit> visits) {
        VehicleRoutingSolution solution = new VehicleRoutingSolution();
        solution.setVehicleList(new ArrayList<>(vehicles));
        solution.setDepotList(new ArrayList<>(1));
        if (depot != null) {
            solution.getDepotList().add(depot);
            moveAllVehiclesToDepot(vehicles, depot);
        }
        solution.setVisitList(new ArrayList<>(visits));
        solution.setScore(HardSoftLongScore.ZERO);
        return solution;
    }

    private  SolutionFactory();

}