Skip to content

Commit

Permalink
add money event handler
Browse files Browse the repository at this point in the history
  • Loading branch information
GregorRyb committed Aug 19, 2024
1 parent d5dfbff commit a1d9a71
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ protected void prepareControler(Controler controler) {
if (simpleMobilityBudget != 0.0) {
double oldDailyMonetaryConstant = controler.getScenario().getConfig().scoring().getModes().get(TransportMode.car).getDailyMonetaryConstant();
controler.getScenario().getConfig().scoring().getModes().get(TransportMode.car).setDailyMonetaryConstant(oldDailyMonetaryConstant + simpleMobilityBudget);
controler.getScenario().getConfig().scoring().getModes().get(TransportMode.ride).setDailyMonetaryConstant(simpleMobilityBudget);
//controler.getScenario().getConfig().scoring().getModes().get(TransportMode.ride).setDailyMonetaryConstant(simpleMobilityBudget);
}
}

Expand All @@ -107,7 +107,7 @@ private static void addKlimaTaler(Controler controler, DistanceBasedMoneyReward
public void install() {
addEventHandlerBinding().toInstance(klimaTaler);
addControlerListenerBinding().toInstance(klimaTaler);
new PersonMoneyEventsAnalysisModule();
install(new PersonMoneyEventsAnalysisModule());
}
});
}
Expand All @@ -118,7 +118,7 @@ private static void addMobilityBudgetHandler(Controler controler, MobilityBudget
public void install() {
addEventHandlerBinding().toInstance(mobilityBudgetEventHandler);
addControlerListenerBinding().toInstance(mobilityBudgetEventHandler);
new PersonMoneyEventsAnalysisModule();
install(new PersonMoneyEventsAnalysisModule());
}
});
}
Expand Down

0 comments on commit a1d9a71

Please sign in to comment.