mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
add Examples and testTemplate for open-routes
This commit is contained in:
parent
f662e5a469
commit
2291bd23c2
8 changed files with 1448 additions and 2 deletions
|
|
@ -16,6 +16,7 @@
|
|||
******************************************************************************/
|
||||
package jsprit.core.algorithm.recreate;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
|
@ -80,12 +81,14 @@ public class TestCalculatesServiceInsertion {
|
|||
when(vehicle.getLocationId()).thenReturn("depot");
|
||||
when(vehicle.getEarliestDeparture()).thenReturn(0.0);
|
||||
when(vehicle.getLatestArrival()).thenReturn(100.0);
|
||||
when(vehicle.isReturnToDepot()).thenReturn(true);
|
||||
|
||||
newVehicle = mock(Vehicle.class);
|
||||
when(newVehicle.getCapacity()).thenReturn(1000);
|
||||
when(newVehicle.getLocationId()).thenReturn("depot");
|
||||
when(newVehicle.getEarliestDeparture()).thenReturn(0.0);
|
||||
when(newVehicle.getLatestArrival()).thenReturn(100.0);
|
||||
when(newVehicle.isReturnToDepot()).thenReturn(true);
|
||||
|
||||
driver = DriverImpl.noDriver();
|
||||
|
||||
|
|
@ -264,6 +267,9 @@ public class TestCalculatesServiceInsertion {
|
|||
assertEquals(2, iData.getDeliveryInsertionIndex());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void whenInsertingAndRouteIsOpen(){
|
||||
assertTrue(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
package jsprit.core.algorithm.recreate;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
|
|
@ -239,4 +240,10 @@ public class TestCalculatesServiceInsertionOnRouteLevel {
|
|||
assertEquals(2, iData.getDeliveryInsertionIndex());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenInsertingAndRouteIsOpen(){
|
||||
assertTrue(false);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package jsprit.core.problem.solution.route;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import jsprit.core.problem.driver.Driver;
|
||||
|
|
@ -58,4 +59,19 @@ public class VehicleRouteBuilderTest {
|
|||
assertEquals(4,route.getTourActivities().getActivities().size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenBuildingOpenRoute(){
|
||||
assertTrue(false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenSettingDepartureTime(){
|
||||
assertTrue(false);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void whenSettingEndTime(){
|
||||
assertTrue(false);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
<start>0.0</start>
|
||||
<end>1.7976931348623157E308</end>
|
||||
</timeSchedule>
|
||||
<returnToDepot>true</returnToDepot>
|
||||
</vehicle>
|
||||
<vehicle>
|
||||
<id>v2</id>
|
||||
|
|
@ -27,6 +28,7 @@
|
|||
<start>0.0</start>
|
||||
<end>1.7976931348623157E308</end>
|
||||
</timeSchedule>
|
||||
<returnToDepot>true</returnToDepot>
|
||||
</vehicle>
|
||||
</vehicles>
|
||||
<vehicleTypes>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue