From 2759938e59aef1a6c061f8599434082bfbf91e92 Mon Sep 17 00:00:00 2001 From: Ricardo Ewert Date: Tue, 7 May 2024 13:59:49 +0200 Subject: [PATCH] add comment --- .../prepare/commercial/DefaultDemandPerDayCalculator.java | 8 +++++++- .../prepare/commercial/LTLFreightAgentGeneratorRuhr.java | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/matsim/prepare/commercial/DefaultDemandPerDayCalculator.java b/src/main/java/org/matsim/prepare/commercial/DefaultDemandPerDayCalculator.java index c0b3a27..54d34be 100644 --- a/src/main/java/org/matsim/prepare/commercial/DefaultDemandPerDayCalculator.java +++ b/src/main/java/org/matsim/prepare/commercial/DefaultDemandPerDayCalculator.java @@ -31,6 +31,12 @@ public int calculateKilogramsPerDay(double tonsPerYear) { return (int) kilogramsPerDay; } + /** + * Calculate the waste demand per day. The assumption is that waste is collected once a week and is collected in 20% of the zones on each day. + * + * @param freightDemandDataRelation the freight demand data relation + * @return the waste demand per day + */ @Override public int calculateWasteDemandPerDay(Person freightDemandDataRelation) { String destination = CommercialTrafficUtils.getDestinationLocationId(freightDemandDataRelation); @@ -55,7 +61,7 @@ public int calculateWasteDemandPerDay(Person freightDemandDataRelation) { } /** - * @param parcelsPerYear the number of parcels per year + * @param parcelsPerYear the number of parcels per year. This demand calculation contains no sampling. This results in a 100% demand. * @return the number of parcels per day */ @Override diff --git a/src/main/java/org/matsim/prepare/commercial/LTLFreightAgentGeneratorRuhr.java b/src/main/java/org/matsim/prepare/commercial/LTLFreightAgentGeneratorRuhr.java index eaa3a3d..79a466e 100644 --- a/src/main/java/org/matsim/prepare/commercial/LTLFreightAgentGeneratorRuhr.java +++ b/src/main/java/org/matsim/prepare/commercial/LTLFreightAgentGeneratorRuhr.java @@ -330,6 +330,7 @@ private void addShipment(Network filteredNetwork, Carrier existingCarrier, Perso Id toLinkId) { CarrierShipment newCarrierShipment; + // parcel delivery or general goods if (toLinkId == null) { Link toLink = NetworkUtils.getNearestLink(filteredNetwork, new Coord(CommercialTrafficUtils.getDestinationX(freightDemandDataRelation), CommercialTrafficUtils.getDestinationY(freightDemandDataRelation)));