Skip to content

Commit

Permalink
go back to old parkingproxy method
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Kohl committed Jan 23, 2024
1 parent bcfc290 commit 02cab0e
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,10 @@ public void notifyBeforeMobsim(BeforeMobsimEvent event) {
private void changeEgressTimesByGridcell(Collection<? extends Person> population, boolean reverse) {
for (Person p : population) {
for (LegActPair walkActPair : this.egressFinder.findEgressWalks(p.getSelectedPlan())) {
double penalty = Math.round(this.observer.getPenaltyCalculator().getPenalty(walkActPair.leg.getDepartureTime().seconds(), walkActPair.act.getCoord()));
if (reverse) {
Object readPenalty = walkActPair.leg.getAttributes().getAttribute(PENALTY_ATTRIBUTE);
if (readPenalty != null) {
setTimes(walkActPair, - (double) readPenalty);
walkActPair.leg.getAttributes().removeAttribute(PENALTY_ATTRIBUTE);
}
setTimes(walkActPair, -penalty);
} else {
double penalty = Math.round(this.observer.getPenaltyCalculator().getPenalty(walkActPair.leg.getDepartureTime().seconds(), walkActPair.act.getCoord()));
setTimes(walkActPair, penalty);
walkActPair.leg.getAttributes().putAttribute(PENALTY_ATTRIBUTE, penalty);
}
Expand Down

0 comments on commit 02cab0e

Please sign in to comment.