From 8d4172cf38eaac13fbd3f261b163efdec0bd1523 Mon Sep 17 00:00:00 2001 From: Kai Martins-Turner Date: Fri, 15 Nov 2024 15:53:47 +0100 Subject: [PATCH] fix: use PickupServiceTime when converting to CarrierService for collection --- .../resourceImplementations/CollectionCarrierScheduler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/matsim/freight/logistics/resourceImplementations/CollectionCarrierScheduler.java b/src/main/java/org/matsim/freight/logistics/resourceImplementations/CollectionCarrierScheduler.java index 708f5797..cd8e8411 100644 --- a/src/main/java/org/matsim/freight/logistics/resourceImplementations/CollectionCarrierScheduler.java +++ b/src/main/java/org/matsim/freight/logistics/resourceImplementations/CollectionCarrierScheduler.java @@ -86,7 +86,7 @@ private CarrierService convertToCarrierService(LspShipment lspShipment) { CarrierService carrierService = CarrierService.Builder.newInstance(serviceId, lspShipment.getFrom()) .setServiceStartTimeWindow(TimeWindow.newInstance(lspShipment.getPickupTimeWindow().getStart(), lspShipment.getPickupTimeWindow().getEnd())) .setCapacityDemand(lspShipment.getSize()) - .setServiceDuration(lspShipment.getDeliveryServiceTime()) + .setServiceDuration(lspShipment.getPickupServiceTime()) .build(); //ensure that the ids of the lspShipment and the carrierService are the same. This is needed for updating the LSPShipmentPlan if (! Objects.equals(lspShipment.getId().toString(), carrierService.getId().toString())) { @@ -134,7 +134,7 @@ private void addShipmentLoadElement( double startTimeOfLoading = legBeforeService.getExpectedDepartureTime() + legBeforeService.getExpectedTransportTime(); builder.setStartTime(startTimeOfLoading); - builder.setEndTime(startTimeOfLoading + lspShipment.getDeliveryServiceTime()); + builder.setEndTime(startTimeOfLoading + lspShipment.getPickupServiceTime()); LspShipmentPlanElement load = builder.build(); String idString =