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

bugfix issue #79

This commit is contained in:
Stefan Schroeder 2014-01-23 12:13:57 +01:00
parent 8f749c9fdf
commit d50ce05a76
3 changed files with 28 additions and 3 deletions

View file

@ -221,7 +221,7 @@ public class VrpReaderV2Test {
new VrpXMLReader(builder, null).read(inFileName);
VehicleRoutingProblem vrp = builder.build();
Shipment s = (Shipment) vrp.getJobs().get("3");
assertEquals(100.0,s.getPickupServiceTime(),0.01);
assertEquals(100.0,s.getDeliveryServiceTime(),0.01);
}
@Test
@ -279,5 +279,23 @@ public class VrpReaderV2Test {
Shipment s = (Shipment) vrp.getJobs().get("4");
assertEquals("[x=10.0][y=0.0]",s.getDeliveryLocation());
}
@Test
public void whenReadingJobs_pickupServiceTimeOfShipment4IsReadCorrectly(){
VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance();
new VrpXMLReader(builder, null).read(inFileName);
VehicleRoutingProblem vrp = builder.build();
Shipment s = (Shipment) vrp.getJobs().get("4");
assertEquals(0.0,s.getPickupServiceTime(),0.01);
}
@Test
public void whenReadingJobs_deliveryServiceTimeOfShipment4IsReadCorrectly(){
VehicleRoutingProblem.Builder builder = VehicleRoutingProblem.Builder.newInstance();
new VrpXMLReader(builder, null).read(inFileName);
VehicleRoutingProblem vrp = builder.build();
Shipment s = (Shipment) vrp.getJobs().get("4");
assertEquals(100.0,s.getDeliveryServiceTime(),0.01);
}
}

View file

@ -133,7 +133,6 @@
<shipment id="4">
<pickup>
<coord x="10.0" y="10.0"/>
<duration>10.0</duration>
<timeWindows>
<timeWindow>
<start>1000.0</start>