Skip to content

Commit

Permalink
debug emission analysis: create injector and install EmissionModule
Browse files Browse the repository at this point in the history
  • Loading branch information
tschlenther committed Jun 19, 2024
1 parent 34f2283 commit 7b95b05
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import org.matsim.core.config.Config;
import org.matsim.core.config.ConfigUtils;
import org.matsim.core.controler.AbstractModule;
import org.matsim.core.controler.Injector;
import org.matsim.core.events.EventsUtils;
import org.matsim.core.events.MatsimEventsReader;
import org.matsim.core.network.NetworkUtils;
Expand Down Expand Up @@ -159,6 +160,10 @@ public void install(){
}
};

com.google.inject.Injector injector = Injector.createInjector(config, module);
// Emissions module will be installed to the event handler
injector.getInstance(EmissionModule.class);

EmissionsOnLinkEventHandler emissionsEventHandler = new EmissionsOnLinkEventHandler(3600);
eventsManager.addHandler(emissionsEventHandler);
eventsManager.initProcessing();
Expand Down

0 comments on commit 7b95b05

Please sign in to comment.