From aa5077f1dfee20a483a754e7ee90a9d37efc2131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20H=C3=B6rl?= Date: Sat, 7 Dec 2024 11:00:11 +0100 Subject: [PATCH] fix code error --- .../contrib/ev/stats/EvStatsModule.java | 33 +++++++++++-------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/contribs/ev/src/main/java/org/matsim/contrib/ev/stats/EvStatsModule.java b/contribs/ev/src/main/java/org/matsim/contrib/ev/stats/EvStatsModule.java index 4a1f7efd57d..a161e566961 100644 --- a/contribs/ev/src/main/java/org/matsim/contrib/ev/stats/EvStatsModule.java +++ b/contribs/ev/src/main/java/org/matsim/contrib/ev/stats/EvStatsModule.java @@ -20,9 +20,6 @@ package org.matsim.contrib.ev.stats; -import com.google.inject.Inject; -import com.google.inject.Provider; -import com.google.inject.Singleton; import org.matsim.contrib.common.timeprofile.ProfileWriter; import org.matsim.contrib.ev.EvConfigGroup; import org.matsim.contrib.ev.EvModule; @@ -32,6 +29,10 @@ import org.matsim.core.controler.listener.ControlerListener; import org.matsim.core.mobsim.qsim.AbstractQSimModule; +import com.google.inject.Inject; +import com.google.inject.Provider; +import com.google.inject.Singleton; + /** * @author Michal Maciejewski (michalm) */ @@ -49,17 +50,21 @@ public void install() { installQSimModule(new AbstractQSimModule() { @Override protected void configureQSim() { - addQSimComponentBinding(EvModule.EV_COMPONENT).toProvider(SocHistogramTimeProfileCollectorProvider.class); - addQSimComponentBinding(EvModule.EV_COMPONENT).toProvider(IndividualChargeTimeProfileCollectorProvider.class); - addQSimComponentBinding(EvModule.EV_COMPONENT).toProvider(ChargerOccupancyTimeProfileCollectorProvider.class); - addQSimComponentBinding(EvModule.EV_COMPONENT).to(ChargerOccupancyXYDataCollector.class).asEagerSingleton(); - addQSimComponentBinding(EvModule.EV_COMPONENT).toProvider(VehicleTypeAggregatedChargeTimeProfileCollectorProvider.class); + addQSimComponentBinding(EvModule.EV_COMPONENT) + .toProvider(SocHistogramTimeProfileCollectorProvider.class); + addQSimComponentBinding(EvModule.EV_COMPONENT) + .toProvider(IndividualChargeTimeProfileCollectorProvider.class); + addQSimComponentBinding(EvModule.EV_COMPONENT) + .toProvider(ChargerOccupancyTimeProfileCollectorProvider.class); + addQSimComponentBinding(EvModule.EV_COMPONENT).to(ChargerOccupancyXYDataCollector.class) + .asEagerSingleton(); + addQSimComponentBinding(EvModule.EV_COMPONENT) + .toProvider(VehicleTypeAggregatedChargeTimeProfileCollectorProvider.class); - bind(EnergyConsumptionCollector.class).asEagerSingleton(); - addMobsimScopeEventHandlerBinding().to(EnergyConsumptionCollector.class); - addQSimComponentBinding(EvModule.EV_COMPONENT).to(EnergyConsumptionCollector.class); - // add more time profiles if necessary - } + bind(EnergyConsumptionCollector.class).asEagerSingleton(); + addMobsimScopeEventHandlerBinding().to(EnergyConsumptionCollector.class); + addQSimComponentBinding(EvModule.EV_COMPONENT).to(EnergyConsumptionCollector.class); + // add more time profiles if necessary } }); bind(ChargerPowerTimeProfileCalculator.class).asEagerSingleton(); @@ -73,7 +78,7 @@ protected void configureQSim() { @Override public ControlerListener get() { var profileView = new ChargerPowerTimeProfileView(calculator); - return new ProfileWriter(matsimServices,"ev",profileView,"charger_power_time_profiles"); + return new ProfileWriter(matsimServices, "ev", profileView, "charger_power_time_profiles"); } });