mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
Update SchrimpfAcceptanceTest.java
This commit is contained in:
parent
19172f5084
commit
632ce5b594
1 changed files with 2 additions and 2 deletions
|
|
@ -92,7 +92,7 @@ public class SchrimpfAcceptanceTest {
|
||||||
schrimpfAcceptance.setInitialThreshold(0.5);
|
schrimpfAcceptance.setInitialThreshold(0.5);
|
||||||
schrimpfAcceptance.informIterationStarts(500, mock(VehicleRoutingProblem.class), Collections.<VehicleRoutingProblemSolution>emptyList());
|
schrimpfAcceptance.informIterationStarts(500, mock(VehicleRoutingProblem.class), Collections.<VehicleRoutingProblemSolution>emptyList());
|
||||||
//according to the acceptance-function, it should just accept every solution less than 2.0 + 0.15749013123
|
//according to the acceptance-function, it should just accept every solution less than 2.0 + 0.15749013123
|
||||||
//threshold(1000) = 0.15749013123
|
//threshold(500) = 0.15749013123
|
||||||
boolean accepted = schrimpfAcceptance.acceptSolution(memory, createSolutionWithCost(2.15748));
|
boolean accepted = schrimpfAcceptance.acceptSolution(memory, createSolutionWithCost(2.15748));
|
||||||
assertTrue(accepted);
|
assertTrue(accepted);
|
||||||
}
|
}
|
||||||
|
|
@ -103,7 +103,7 @@ public class SchrimpfAcceptanceTest {
|
||||||
schrimpfAcceptance.setInitialThreshold(0.5);
|
schrimpfAcceptance.setInitialThreshold(0.5);
|
||||||
schrimpfAcceptance.informIterationStarts(500, mock(VehicleRoutingProblem.class), Collections.<VehicleRoutingProblemSolution>emptyList());
|
schrimpfAcceptance.informIterationStarts(500, mock(VehicleRoutingProblem.class), Collections.<VehicleRoutingProblemSolution>emptyList());
|
||||||
//according to the acceptance-function, it should just accept every solution less than 2.0 + 0.15749013123
|
//according to the acceptance-function, it should just accept every solution less than 2.0 + 0.15749013123
|
||||||
//threshold(1000) = 0.15749013123
|
//threshold(500) = 0.15749013123
|
||||||
boolean accepted = schrimpfAcceptance.acceptSolution(memory, createSolutionWithCost(2.1575));
|
boolean accepted = schrimpfAcceptance.acceptSolution(memory, createSolutionWithCost(2.1575));
|
||||||
assertFalse(accepted);
|
assertFalse(accepted);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue