Skip to content
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.

Commit

Permalink
Revert "increase latest end for auxiliary carrier. add assertion to e…
Browse files Browse the repository at this point in the history
…nsure that earliestStart is before latestEnd."

This reverts commit 6d53b0c.
  • Loading branch information
nixlaos committed Sep 22, 2023
1 parent 7a7bc28 commit da61b96
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -257,9 +256,7 @@ private Carrier createAuxiliaryCarrier(ArrayList<LspShipmentWithTime> 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);
Expand Down

0 comments on commit da61b96

Please sign in to comment.