1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00
This commit is contained in:
oblonski 2015-09-19 20:23:24 +02:00
parent e5ada2f6d9
commit e543665da2
6 changed files with 43 additions and 2 deletions

View file

@ -1,7 +1,7 @@
package jsprit.core.algorithm;
import jsprit.core.IntegrationTest;
import jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
import jsprit.core.algorithm.box.Jsprit;
import jsprit.core.problem.VehicleRoutingProblem;
import jsprit.core.problem.io.VrpXMLReader;
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
@ -25,7 +25,8 @@ public class Solomon_IT {
new VrpXMLReader(vrpBuilder).read("src/test/resources/solomon_c101.xml");
VehicleRoutingProblem vrp = vrpBuilder.build();
VehicleRoutingAlgorithm vra = VehicleRoutingAlgorithms.readAndCreateAlgorithm(vrp, "src/test/resources/algorithmConfig.xml");
VehicleRoutingAlgorithm vra = Jsprit.createAlgorithm(vrp);
// VehicleRoutingAlgorithms.readAndCreateAlgorithm(vrp, "src/test/resources/algorithmConfig.xml");
vra.setMaxIterations(500);
Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
assertEquals(828.94, Solutions.bestOf(solutions).getCost(), 0.01);