Skip to content

Commit

Permalink
add share of person waste
Browse files Browse the repository at this point in the history
  • Loading branch information
rewertvsp committed May 16, 2024
1 parent 616bb46 commit 164e14f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ public int calculateWasteDemandPerDay(Person freightDemandDataRelation) {
}
//if zone has a waste collection on this day, calculate the demand
if (zonesWithWasteCollectionsOnThisDay.get(destination).contains(originCell)){
int numberOfCollectionsPerWeek = 1;
double kilogramsPerDay = 0;
double tonsPerYear = CommercialTrafficUtils.getTonsPerYear(freightDemandDataRelation);
kilogramsPerDay = tonsPerYear * 1000 / (52 * numberOfCollectionsPerWeek);
kilogramsPerDay = Math.floor(kilogramsPerDay + this.rnd.nextDouble());
return (int) kilogramsPerDay;
int numberOfCollectionsPerWeek = 1;
double shareOfPersonalWaste = 0.15; //TODO the current matrix has a wrong demand, because the tons per year are inclusive commercial/construction waste -> the share of personal waste is 0.15
double tonsPerYear = CommercialTrafficUtils.getTonsPerYear(freightDemandDataRelation) * shareOfPersonalWaste;
double kilogramsPerDay = tonsPerYear * 1000 / (52 * numberOfCollectionsPerWeek);
kilogramsPerDay = Math.floor(kilogramsPerDay + this.rnd.nextDouble());
return (int) kilogramsPerDay;
}
return 0;
}
Expand Down

0 comments on commit 164e14f

Please sign in to comment.