Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
rewertvsp committed May 7, 2024
1 parent 1b86acc commit 2759938
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@ private void addShipment(Network filteredNetwork, Carrier existingCarrier, Perso
Id<Link> toLinkId) {
CarrierShipment newCarrierShipment;

// parcel delivery or general goods
if (toLinkId == null) {
Link toLink = NetworkUtils.getNearestLink(filteredNetwork, new Coord(CommercialTrafficUtils.getDestinationX(freightDemandDataRelation),
CommercialTrafficUtils.getDestinationY(freightDemandDataRelation)));
Expand Down

0 comments on commit 2759938

Please sign in to comment.