Class ControlerUtils

    • Method Detail

      • createAdhocInjector

        public static com.google.inject.Injector createAdhocInjector​(Config config,
                                                                     Scenario scenario)
        This is meant for creating the matsim injector if one does not need/want Controler. Technical reason is that Controler creates the injector in the run method, and then it is too late to extract material in a direct way.
        Parameters:
        config -
        scenario -
        Returns:
      • checkConfigConsistencyAndWriteToLog

        public static final void checkConfigConsistencyAndWriteToLog​(Config config,
                                                                     String message)
        Design decisions:
        • I extracted this method since it is now called twice: once directly after reading, and once before the iterations start. The second call seems more important, but I wanted to leave the first one there in case the program fails before that config dump. Might be put into the "unexpected shutdown hook" instead. kai, dec'10 Removed the first call for now, because I am now also checking for consistency with loaded controler modules. If still desired, we can put it in the shutdown hook.. michaz aug'14
        Parameters:
        config - TODO
        message - the message that is written just before the config dump