diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/box/JspritTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/box/JspritTest.java index 7a3f2c33..b979034e 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/box/JspritTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/box/JspritTest.java @@ -31,7 +31,8 @@ public class JspritTest { @Before public void doBefore(){ - RandomNumberGeneration.reset(); + +// RandomNumberGeneration.reset(); } @@ -300,7 +301,6 @@ public class JspritTest { }); vra.searchSolutions(); - RandomNumberGeneration.reset(); VehicleRoutingAlgorithm second = Jsprit.createAlgorithm(vrp); second.setMaxIterations(1000); final List secondRecord = new ArrayList(); @@ -357,7 +357,6 @@ public class JspritTest { }); vra.searchSolutions(); - RandomNumberGeneration.reset(); VehicleRoutingAlgorithm second = Jsprit.createAlgorithm(vrp); second.setMaxIterations(1000); final List secondRecord = new ArrayList(); @@ -398,7 +397,6 @@ public class JspritTest { VehicleImpl v = VehicleImpl.Builder.newInstance("v").setStartLocation(Location.newInstance(0,0)).build(); VehicleRoutingProblem vrp = VehicleRoutingProblem.Builder.newInstance().addJob(s4).addJob(s3).addVehicle(v).addJob(s2).addJob(s).build(); - RandomNumberGeneration.reset(); VehicleRoutingAlgorithm vra = Jsprit.createAlgorithm(vrp); vra.setMaxIterations(1000); final List firstRecord = new ArrayList(); @@ -410,7 +408,6 @@ public class JspritTest { }); vra.searchSolutions(); - RandomNumberGeneration.reset(); VehicleRoutingAlgorithm second = Jsprit.createAlgorithm(vrp); second.setMaxIterations(1000); final List secondRecord = new ArrayList(); @@ -437,7 +434,6 @@ public class JspritTest { new VrpXMLReader(vrpBuilder).read("src/test/resources/vrpnc1-jsprit-with-deliveries.xml"); VehicleRoutingProblem vrp = vrpBuilder.build(); - RandomNumberGeneration.reset(); VehicleRoutingAlgorithm vra = Jsprit.createAlgorithm(vrp); vra.setMaxIterations(200); final List firstRecord = new ArrayList(); @@ -449,7 +445,6 @@ public class JspritTest { }); vra.searchSolutions(); - RandomNumberGeneration.reset(); VehicleRoutingAlgorithm second = Jsprit.createAlgorithm(vrp); second.setMaxIterations(200); final List secondRecord = new ArrayList(); @@ -477,7 +472,6 @@ public class JspritTest { new VrpXMLReader(vrpBuilder).read("src/test/resources/vrpnc1-jsprit-with-deliveries.xml"); VehicleRoutingProblem vrp = vrpBuilder.build(); - RandomNumberGeneration.reset(); VehicleRoutingAlgorithm vra = Jsprit.createAlgorithm(vrp); vra.setMaxIterations(200); final List firstRecord = new ArrayList(); @@ -489,7 +483,6 @@ public class JspritTest { }); Collection firstSolutions = vra.searchSolutions(); - RandomNumberGeneration.reset(); VehicleRoutingAlgorithm second = Jsprit.createAlgorithm(vrp); second.setMaxIterations(200); final List secondRecord = new ArrayList(); @@ -519,7 +512,6 @@ public class JspritTest { new VrpXMLReader(vrpBuilder).read("src/test/resources/vrpnc1-jsprit-with-deliveries.xml"); VehicleRoutingProblem vrp = vrpBuilder.build(); - RandomNumberGeneration.reset(); VehicleRoutingAlgorithm vra = Jsprit.createAlgorithm(vrp); vra.setMaxIterations(1000); VariationCoefficientTermination termination = new VariationCoefficientTermination(50, 0.005); @@ -534,7 +526,6 @@ public class JspritTest { }); Collection firstSolutions = vra.searchSolutions(); - RandomNumberGeneration.reset(); VehicleRoutingAlgorithm second = Jsprit.createAlgorithm(vrp); VariationCoefficientTermination secondTermination = new VariationCoefficientTermination(50, 0.005); second.setPrematureAlgorithmTermination(secondTermination); @@ -566,7 +557,6 @@ public class JspritTest { new VrpXMLReader(vrpBuilder).read("src/test/resources/vrpnc1-jsprit-with-deliveries.xml"); VehicleRoutingProblem vrp = vrpBuilder.build(); - RandomNumberGeneration.reset(); VehicleRoutingAlgorithm vra = Jsprit.createAlgorithm(vrp); vra.setMaxIterations(200); final List firstRecord = new ArrayList(); @@ -578,7 +568,6 @@ public class JspritTest { }); Collection firstSolutions = vra.searchSolutions(); -// RandomNumberGeneration.reset(); VehicleRoutingAlgorithm second = Jsprit.createAlgorithm(vrp); second.setMaxIterations(200); final List secondRecord = new ArrayList(); @@ -626,7 +615,6 @@ public class JspritTest { }); vra.searchSolutions(); -// RandomNumberGeneration.reset(); VehicleRoutingAlgorithm second = Jsprit.createAlgorithm(vrp); second.setMaxIterations(200); final List secondRecord = new ArrayList(); diff --git a/jsprit-core/src/test/resources/infiniteWriterV2Test.xml b/jsprit-core/src/test/resources/infiniteWriterV2Test.xml index 07c5406a..2d9058ab 100644 --- a/jsprit-core/src/test/resources/infiniteWriterV2Test.xml +++ b/jsprit-core/src/test/resources/infiniteWriterV2Test.xml @@ -2,24 +2,9 @@ - FINITE + INFINITE - - v2 - vehType2 - - loc - - - loc - - - 0.0 - 1.7976931348623157E308 - - true - v1 vehType @@ -48,16 +33,58 @@ - - vehType2 - - 200 - - - 0.0 - 1.0 - - - + + + + loc + + + 1 + + 2.0 + + + 0.0 + 1.7976931348623157E308 + + + + + + loc2 + + + 1 + + 4.0 + + + 0.0 + 1.7976931348623157E308 + + + + + + + 10.0 + + + noDriver + v1 + 0.0 + + 1 + 0.0 + 0.0 + + 0.0 + + + + + + +