From da61b96aa0ad9fe263e22bb6c669c5b940297c83 Mon Sep 17 00:00:00 2001 From: nixlaos Date: Fri, 22 Sep 2023 12:03:22 +0200 Subject: [PATCH] Revert "increase latest end for auxiliary carrier. add assertion to ensure that earliestStart is before latestEnd." This reverts commit 6d53b0c6c59550154b9a08a01f5056e82a49493c. --- .../distributionCarrier/DistributionCarrierScheduler.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/lsp/resourceImplementations/distributionCarrier/DistributionCarrierScheduler.java b/src/main/java/lsp/resourceImplementations/distributionCarrier/DistributionCarrierScheduler.java index 5fbe508c..75783a86 100644 --- a/src/main/java/lsp/resourceImplementations/distributionCarrier/DistributionCarrierScheduler.java +++ b/src/main/java/lsp/resourceImplementations/distributionCarrier/DistributionCarrierScheduler.java @@ -25,7 +25,6 @@ import lsp.resourceImplementations.ResourceImplementationUtils; import lsp.shipment.ShipmentPlanElement; import lsp.shipment.ShipmentUtils; -import org.locationtech.jts.util.Assert; import org.matsim.api.core.v01.Id; import org.matsim.contrib.freight.carrier.*; import org.matsim.contrib.freight.carrier.CarrierCapabilities.FleetSize; @@ -257,9 +256,7 @@ private Carrier createAuxiliaryCarrier(ArrayList shipmentsI CarrierVehicle.Builder vBuilder = CarrierVehicle.Builder.newInstance(carrierVehicle.getId(), carrierVehicle.getLinkId(), vehicleType); vBuilder.setEarliestStart(startTime); - final int latestEnd = 72 * 60 * 60; - Assert.isTrue(latestEnd > startTime, "latest End must be later than earliest start. start: " + startTime + " ; end: " +latestEnd); - vBuilder.setLatestEnd(latestEnd); + vBuilder.setLatestEnd(24 * 60 * 60); CarrierVehicle cv = vBuilder.build(); auxiliaryCarrier.getCarrierCapabilities().getCarrierVehicles().put(cv.getId(), cv); auxiliaryCarrier.getCarrierCapabilities().setFleetSize(FleetSize.FINITE);