1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

adapt examples to head of development

This commit is contained in:
oblonski 2014-08-26 21:38:32 +02:00
parent 264dafd06a
commit 759359b702
40 changed files with 413 additions and 445 deletions

View file

@ -1,42 +1,40 @@
/*******************************************************************************
* Copyright (C) 2013 Stefan Schroeder
*
* Copyright (C) 2014 Stefan Schroeder
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
package jsprit.examples;
import java.util.Collection;
import jsprit.analysis.toolbox.GraphStreamViewer;
import jsprit.analysis.toolbox.Plotter;
import jsprit.analysis.toolbox.SolutionPrinter;
import jsprit.analysis.toolbox.SolutionPrinter.Print;
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
import jsprit.core.algorithm.box.SchrimpfFactory;
import jsprit.core.problem.VehicleRoutingProblem;
import jsprit.core.problem.io.VrpXMLWriter;
import jsprit.core.problem.job.Shipment;
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
import jsprit.core.problem.vehicle.Vehicle;
import jsprit.core.problem.vehicle.VehicleImpl;
import jsprit.core.problem.vehicle.VehicleImpl.Builder;
import jsprit.core.problem.vehicle.VehicleType;
import jsprit.core.problem.vehicle.VehicleTypeImpl;
import jsprit.core.reporting.SolutionPrinter;
import jsprit.core.util.Coordinate;
import jsprit.core.util.Solutions;
import jsprit.util.Examples;
import java.util.Collection;
public class SimpleEnRoutePickupAndDeliveryOpenRoutesExample {
@ -59,7 +57,7 @@ public class SimpleEnRoutePickupAndDeliveryOpenRoutesExample {
vehicleBuilder.setStartLocationCoordinate(Coordinate.newInstance(10, 10));
vehicleBuilder.setType(vehicleType);
vehicleBuilder.setReturnToDepot(false);
Vehicle vehicle = vehicleBuilder.build();
VehicleImpl vehicle = vehicleBuilder.build();
/*
* build shipments at the required locations, each with a capacity-demand of 1.
@ -106,7 +104,7 @@ public class SimpleEnRoutePickupAndDeliveryOpenRoutesExample {
/*
* print nRoutes and totalCosts of bestSolution
*/
SolutionPrinter.print(problem,bestSolution,Print.VERBOSE);
SolutionPrinter.print(problem, bestSolution, SolutionPrinter.Print.VERBOSE);
/*
* plot problem without solution