Skip to content

Commit

Permalink
fix code error
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhoerl committed Dec 7, 2024
1 parent 4662e90 commit aa5077f
Showing 1 changed file with 19 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
*/
Expand All @@ -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();
Expand All @@ -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");

}
});
Expand Down

0 comments on commit aa5077f

Please sign in to comment.