@Override
public double getTransportCost(String fromId, String toId,double departureTime, Driver driver, Vehicle vehicle) {
return EuclideanDistanceCalculator.calculateDistance(coords.get(fromId), coords.get(toId));
}
};
Vehicle oldVehicle = VehicleImpl.Builder.newInstance("oldV").setStartLocationId("oldV").build();
VehicleRoute route = VehicleRoute.Builder.newInstance(oldVehicle, DriverImpl.noDriver())
.addService(Service.Builder.newInstance("service").addSizeDimension(0, 0).setLocationId("service").build())
.build();
Vehicle newVehicle = VehicleImpl.Builder.newInstance("newV").setStartLocationId("newV").build();
AdditionalAccessEgressCalculator accessEgressCalc = new AdditionalAccessEgressCalculator(routingCosts);
Job job = Service.Builder.newInstance("service2").addSizeDimension(0, 0).setLocationId("service").build();
JobInsertionContext iContex = new JobInsertionContext(route, job, newVehicle, mock(Driver.class), 0.0);
assertEquals(8.0, accessEgressCalc.getCosts(iContex),0.01);