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

rename badJob into unassignedJob

This commit is contained in:
oblonski 2014-08-11 23:00:43 +02:00
parent 650a20fabc
commit b7b0ff650c
6 changed files with 25 additions and 23 deletions

View file

@ -31,8 +31,8 @@ public class BadJobListTest {
Collection<VehicleRoutingProblemSolution> solutions = algorithm.searchSolutions();
VehicleRoutingProblemSolution solution = Solutions.bestOf(solutions);
assertTrue(!solution.getBadJobs().contains(job1));
assertTrue(solution.getBadJobs().contains(job2));
assertTrue(!solution.getUnassignedJobs().contains(job1));
assertTrue(solution.getUnassignedJobs().contains(job2));
}
@Test
@ -50,8 +50,8 @@ public class BadJobListTest {
Collection<VehicleRoutingProblemSolution> solutions = algorithm.searchSolutions();
VehicleRoutingProblemSolution solution = Solutions.bestOf(solutions);
assertTrue(!solution.getBadJobs().contains(job1));
assertTrue(solution.getBadJobs().contains(job2));
assertTrue(!solution.getUnassignedJobs().contains(job1));
assertTrue(solution.getUnassignedJobs().contains(job2));
}
}

View file

@ -60,7 +60,7 @@ public class VehicleRoutingProblemSolutionTest {
List<Job> badJobs = new ArrayList<Job>();
badJobs.add(badJob);
VehicleRoutingProblemSolution sol = new VehicleRoutingProblemSolution(Collections.<VehicleRoute>emptyList(), badJobs, 10.0);
assertEquals(1,sol.getBadJobs().size());
assertEquals(1,sol.getUnassignedJobs().size());
}
@Test
@ -69,8 +69,8 @@ public class VehicleRoutingProblemSolutionTest {
List<Job> badJobs = new ArrayList<Job>();
badJobs.add(badJob);
VehicleRoutingProblemSolution sol = new VehicleRoutingProblemSolution(Collections.<VehicleRoute>emptyList(), 10.0);
sol.getBadJobs().addAll(badJobs);
assertEquals(1, sol.getBadJobs().size());
sol.getUnassignedJobs().addAll(badJobs);
assertEquals(1, sol.getUnassignedJobs().size());
}
@Test
@ -79,7 +79,7 @@ public class VehicleRoutingProblemSolutionTest {
List<Job> badJobs = new ArrayList<Job>();
badJobs.add(badJob);
VehicleRoutingProblemSolution sol = new VehicleRoutingProblemSolution(Collections.<VehicleRoute>emptyList(), badJobs, 10.0);
assertEquals(badJob,sol.getBadJobs().iterator().next());
assertEquals(badJob,sol.getUnassignedJobs().iterator().next());
}
@Test
@ -88,8 +88,8 @@ public class VehicleRoutingProblemSolutionTest {
List<Job> badJobs = new ArrayList<Job>();
badJobs.add(badJob);
VehicleRoutingProblemSolution sol = new VehicleRoutingProblemSolution(Collections.<VehicleRoute>emptyList(), 10.0);
sol.getBadJobs().addAll(badJobs);
assertEquals(badJob, sol.getBadJobs().iterator().next());
sol.getUnassignedJobs().addAll(badJobs);
assertEquals(badJob, sol.getUnassignedJobs().iterator().next());
}
}