mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
migrate SLF4j - remove sout
This commit is contained in:
parent
1fc8dd0d87
commit
5c6ef8b8d3
13 changed files with 0 additions and 38 deletions
|
|
@ -100,7 +100,6 @@ public class BuildCVRPAlgoFromScratch_IT {
|
|||
@Category(IntegrationTest.class)
|
||||
public void testVRA() {
|
||||
Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
|
||||
System.out.println("costs=" + Solutions.bestOf(solutions).getCost() + ";#routes=" + Solutions.bestOf(solutions).getRoutes().size());
|
||||
assertEquals(530.0, Solutions.bestOf(solutions).getCost(), 50.0);
|
||||
assertEquals(5, Solutions.bestOf(solutions).getRoutes().size());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolutio
|
|||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.InfiniteFleetManagerFactory;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import com.graphhopper.jsprit.core.util.Solutions;
|
||||
import junit.framework.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
|
@ -110,7 +109,6 @@ public class BuildPDVRPAlgoFromScratch_IT {
|
|||
public void test() {
|
||||
try {
|
||||
Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
|
||||
System.out.println(Solutions.bestOf(solutions).getCost());
|
||||
Assert.assertTrue(true);
|
||||
} catch (Exception e) {
|
||||
Assert.assertTrue(false);
|
||||
|
|
|
|||
|
|
@ -90,8 +90,6 @@ public class CVRPwithMatrix_IT {
|
|||
return vrp.getTransportCosts().getTransportCost(from, to, 0., null, null);
|
||||
}
|
||||
});
|
||||
System.out.println(sa.getDistance());
|
||||
System.out.println(sa.getTransportTime());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ public class FiniteVehicleFleetManagerIdentifiesDistinctVehicle_IT {
|
|||
testFailed.add(true);
|
||||
}
|
||||
}
|
||||
System.out.println("failed: " + testFailed.size());
|
||||
assertTrue(testFailed.isEmpty());
|
||||
}
|
||||
|
||||
|
|
@ -75,7 +74,6 @@ public class FiniteVehicleFleetManagerIdentifiesDistinctVehicle_IT {
|
|||
testFailed.add(true);
|
||||
}
|
||||
}
|
||||
System.out.println("failed: " + testFailed.size());
|
||||
assertTrue(testFailed.isEmpty());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -128,7 +128,6 @@ public class MeetTimeWindowConstraint_IT {
|
|||
|
||||
@SuppressWarnings("unused")
|
||||
Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
|
||||
System.out.println("failed " + testFailed.size());
|
||||
assertTrue(testFailed.isEmpty());
|
||||
}
|
||||
|
||||
|
|
@ -254,7 +253,6 @@ public class MeetTimeWindowConstraint_IT {
|
|||
|
||||
@SuppressWarnings("unused")
|
||||
Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
|
||||
System.out.println("failed " + testFailed.size());
|
||||
assertTrue(testFailed.isEmpty());
|
||||
}
|
||||
|
||||
|
|
@ -380,7 +378,6 @@ public class MeetTimeWindowConstraint_IT {
|
|||
|
||||
@SuppressWarnings("unused")
|
||||
Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
|
||||
System.out.println("failed " + testFailed.size());
|
||||
assertTrue(testFailed.isEmpty());
|
||||
}
|
||||
|
||||
|
|
@ -506,7 +503,6 @@ public class MeetTimeWindowConstraint_IT {
|
|||
|
||||
@SuppressWarnings("unused")
|
||||
Collection<VehicleRoutingProblemSolution> solutions = vra.searchSolutions();
|
||||
System.out.println("failed " + testFailed.size());
|
||||
assertTrue(testFailed.isEmpty());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -109,7 +109,6 @@ public class SolomonSkills_IT {
|
|||
}
|
||||
assertTrue(true);
|
||||
} catch (NoSolutionFoundException e) {
|
||||
System.out.println(e.toString());
|
||||
assertFalse(true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,5 @@ public class TestComparator {
|
|||
}
|
||||
});
|
||||
|
||||
for(Job j : jobs){
|
||||
System.out.println(j.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,10 +65,6 @@ public class DBSCANClustererTest {
|
|||
c.setMinPts(1);
|
||||
c.setEpsDistance(2);
|
||||
List<List<Job>> cluster = c.getClusters(r);
|
||||
for (List<Job> l : cluster) {
|
||||
System.out.println("--");
|
||||
for (Job j : l) System.out.println(j);
|
||||
}
|
||||
Assert.assertEquals(3, cluster.size());
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ public class RuinBreakTest {
|
|||
VehicleRoutingProblem vrp = VehicleRoutingProblem.Builder.newInstance().setFleetSize(VehicleRoutingProblem.FleetSize.FINITE).addVehicle(v).build();
|
||||
VehicleRoute route = VehicleRoute.Builder.newInstance(v).setJobActivityFactory(vrp.getJobActivityFactory()).addService(aBreak).build();
|
||||
TourActivity tourActivity = route.getActivities().get(0);
|
||||
System.out.println(tourActivity);
|
||||
Assert.assertTrue(tourActivity instanceof BreakActivity);
|
||||
RuinBreaks ruinBreaks = new RuinBreaks();
|
||||
List<Job> unassigned = new ArrayList<Job>();
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ public class AverageJobDistanceTest {
|
|||
Shipment other1 = Shipment.Builder.newInstance("s1").addSizeDimension(0, 1).setPickupLocation(Location.Builder.newInstance().setId("0,0").build()).setDeliveryLocation(Location.newInstance(i + "," + j)).build();
|
||||
Shipment other2 = Shipment.Builder.newInstance("s2").addSizeDimension(0, 1).setPickupLocation(Location.Builder.newInstance().setId("0,0").build()).setDeliveryLocation(Location.newInstance("10,10")).build();
|
||||
double dist2 = new AvgServiceAndShipmentDistance(routingCosts).getDistance(other1, other2);
|
||||
System.out.println("(" + i + "," + j + "), dist=" + dist + ", dist2=" + dist2);
|
||||
assertTrue(dist <= dist2 + dist2 * 0.001);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -224,7 +224,6 @@ public class VehicleDependentTimeWindowTest {
|
|||
@Test
|
||||
public void whenJobIsInsertedAlongWithNewVehicleThatNeedsToBeHomeAt60_itShouldReturnFalse() {
|
||||
|
||||
System.out.println("actualEndTime " + route.getEnd().getArrTime());
|
||||
assertEquals(60., route.getEnd().getArrTime(), 0.01);
|
||||
|
||||
Service s4 = Service.Builder.newInstance("s4").setLocation(Location.newInstance("40,0")).build();
|
||||
|
|
@ -243,7 +242,6 @@ public class VehicleDependentTimeWindowTest {
|
|||
@Test
|
||||
public void whenJobIsInsertedAlongWithNewVehicleThatNeedsToBeHomeAt50_itShouldReturnFalse() {
|
||||
|
||||
System.out.println("actualEndTime " + route.getEnd().getArrTime());
|
||||
assertEquals(60., route.getEnd().getArrTime(), 0.01);
|
||||
|
||||
Service s4 = Service.Builder.newInstance("s4").setLocation(Location.newInstance("40,0")).build();
|
||||
|
|
@ -261,7 +259,6 @@ public class VehicleDependentTimeWindowTest {
|
|||
@Test
|
||||
public void whenJobIsInsertedAlongWithNewVehicleThatNeedsToBeHomeAt10_itShouldReturnFalse() {
|
||||
|
||||
System.out.println("actualEndTime " + route.getEnd().getArrTime());
|
||||
assertEquals(60., route.getEnd().getArrTime(), 0.01);
|
||||
|
||||
Service s4 = Service.Builder.newInstance("s4").setLocation(Location.newInstance("40,0")).build();
|
||||
|
|
@ -279,7 +276,6 @@ public class VehicleDependentTimeWindowTest {
|
|||
@Test
|
||||
public void whenJobIsInsertedAlongWithV6BetweenS2AndS3_itShouldReturnFalse() {
|
||||
|
||||
System.out.println("actualEndTime " + route.getEnd().getArrTime());
|
||||
assertEquals(60., route.getEnd().getArrTime(), 0.01);
|
||||
|
||||
Service s4 = Service.Builder.newInstance("s4").setLocation(Location.newInstance("40,0")).build();
|
||||
|
|
@ -297,7 +293,6 @@ public class VehicleDependentTimeWindowTest {
|
|||
@Test
|
||||
public void whenJobIsInsertedAlongWithV6BetweenS1AndS2_itShouldReturnFalse() {
|
||||
|
||||
System.out.println("actualEndTime " + route.getEnd().getArrTime());
|
||||
assertEquals(60., route.getEnd().getArrTime(), 0.01);
|
||||
|
||||
Service s4 = Service.Builder.newInstance("s4").setLocation(Location.newInstance("40,0")).build();
|
||||
|
|
@ -315,7 +310,6 @@ public class VehicleDependentTimeWindowTest {
|
|||
@Test
|
||||
public void whenJobIsInsertedAlongWithV6AtTheEndOfRoute_itShouldReturnTrue() {
|
||||
|
||||
System.out.println("actualEndTime " + route.getEnd().getArrTime());
|
||||
assertEquals(60., route.getEnd().getArrTime(), 0.01);
|
||||
|
||||
Service s4 = Service.Builder.newInstance("s4").setLocation(Location.newInstance("40,0")).build();
|
||||
|
|
@ -331,7 +325,6 @@ public class VehicleDependentTimeWindowTest {
|
|||
|
||||
@Test
|
||||
public void whenJobIsInsertedAlongWithNewVehicleThatCanOnlyStartAt60_itShouldReturnFalse() {
|
||||
System.out.println("actualEndTime " + route.getEnd().getArrTime());
|
||||
assertEquals(60., route.getEnd().getArrTime(), 0.01);
|
||||
|
||||
Service s4 = Service.Builder.newInstance("s4").setLocation(Location.newInstance("40,0")).build();
|
||||
|
|
|
|||
|
|
@ -222,7 +222,6 @@ public class VehicleDependentTimeWindowWithStartTimeAndMaxOperationTimeTest {
|
|||
@Test
|
||||
public void whenJobIsInsertedAlongWithNewVehicleThatNeedsToBeHomeAt60_itShouldReturnFalse() {
|
||||
|
||||
System.out.println("actualEndTime " + route.getEnd().getArrTime());
|
||||
assertEquals(60., route.getEnd().getArrTime(), 0.01);
|
||||
|
||||
Service s4 = Service.Builder.newInstance("s4").setLocation(Location.newInstance("40,0")).build();
|
||||
|
|
@ -241,7 +240,6 @@ public class VehicleDependentTimeWindowWithStartTimeAndMaxOperationTimeTest {
|
|||
@Test
|
||||
public void whenJobIsInsertedAlongWithNewVehicleThatNeedsToBeHomeAt50_itShouldReturnFalse() {
|
||||
|
||||
System.out.println("actualEndTime " + route.getEnd().getArrTime());
|
||||
assertEquals(60., route.getEnd().getArrTime(), 0.01);
|
||||
|
||||
Service s4 = Service.Builder.newInstance("s4").setLocation(Location.newInstance("40,0")).build();
|
||||
|
|
@ -259,7 +257,6 @@ public class VehicleDependentTimeWindowWithStartTimeAndMaxOperationTimeTest {
|
|||
@Test
|
||||
public void whenJobIsInsertedAlongWithNewVehicleThatNeedsToBeHomeAt10_itShouldReturnFalse() {
|
||||
|
||||
System.out.println("actualEndTime " + route.getEnd().getArrTime());
|
||||
assertEquals(60., route.getEnd().getArrTime(), 0.01);
|
||||
|
||||
Service s4 = Service.Builder.newInstance("s4").setLocation(Location.newInstance("40,0")).build();
|
||||
|
|
@ -277,7 +274,6 @@ public class VehicleDependentTimeWindowWithStartTimeAndMaxOperationTimeTest {
|
|||
@Test
|
||||
public void whenJobIsInsertedAlongWithV6BetweenS2AndS3_itShouldReturnFalse() {
|
||||
|
||||
System.out.println("actualEndTime " + route.getEnd().getArrTime());
|
||||
assertEquals(60., route.getEnd().getArrTime(), 0.01);
|
||||
|
||||
Service s4 = Service.Builder.newInstance("s4").setLocation(Location.newInstance("40,0")).build();
|
||||
|
|
@ -295,7 +291,6 @@ public class VehicleDependentTimeWindowWithStartTimeAndMaxOperationTimeTest {
|
|||
@Test
|
||||
public void whenJobIsInsertedAlongWithV6BetweenS1AndS2_itShouldReturnFalse() {
|
||||
|
||||
System.out.println("actualEndTime " + route.getEnd().getArrTime());
|
||||
assertEquals(60., route.getEnd().getArrTime(), 0.01);
|
||||
|
||||
Service s4 = Service.Builder.newInstance("s4").setLocation(Location.newInstance("40,0")).build();
|
||||
|
|
@ -313,7 +308,6 @@ public class VehicleDependentTimeWindowWithStartTimeAndMaxOperationTimeTest {
|
|||
@Test
|
||||
public void whenJobIsInsertedAlongWithV6AtTheEndOfRoute_itShouldReturnTrue() {
|
||||
|
||||
System.out.println("actualEndTime " + route.getEnd().getArrTime());
|
||||
assertEquals(60., route.getEnd().getArrTime(), 0.01);
|
||||
|
||||
Service s4 = Service.Builder.newInstance("s4").setLocation(Location.newInstance("40,0")).build();
|
||||
|
|
@ -329,7 +323,6 @@ public class VehicleDependentTimeWindowWithStartTimeAndMaxOperationTimeTest {
|
|||
|
||||
@Test
|
||||
public void whenJobIsInsertedAlongWithNewVehicleThatCanOnlyStartAt60_itShouldReturnFalse() {
|
||||
System.out.println("actualEndTime " + route.getEnd().getArrTime());
|
||||
assertEquals(60., route.getEnd().getArrTime(), 0.01);
|
||||
|
||||
Service s4 = Service.Builder.newInstance("s4").setLocation(Location.newInstance("40,0")).build();
|
||||
|
|
|
|||
|
|
@ -163,21 +163,18 @@ public class TimeTest {
|
|||
@Test
|
||||
public void whenSecIs3600_shouldReturnCorrectTimeString() {
|
||||
String time = Time.parseSecondsToTime(3600);
|
||||
System.out.println(time);
|
||||
assertEquals(3600., Time.parseTimeToSeconds(time), 0.01);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenSecIs4000_shouldReturnCorrectTimeString() {
|
||||
String time = Time.parseSecondsToTime(4000);
|
||||
System.out.println(time);
|
||||
assertEquals(4000., Time.parseTimeToSeconds(time), 0.01);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenSecIs86399_shouldReturnCorrectTimeString() {
|
||||
String time = Time.parseSecondsToTime(86399);
|
||||
System.out.println(time);
|
||||
assertEquals(86399., Time.parseTimeToSeconds(time), 0.01);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue