001 002/* *********************************************************************** * 003 * project: org.matsim.* 004 * NewControlerModule.java 005 * * 006 * *********************************************************************** * 007 * * 008 * copyright : (C) 2019 by the members listed in the COPYING, * 009 * LICENSE and WARRANTY file. * 010 * email : info at matsim dot org * 011 * * 012 * *********************************************************************** * 013 * * 014 * This program is free software; you can redistribute it and/or modify * 015 * it under the terms of the GNU General Public License as published by * 016 * the Free Software Foundation; either version 2 of the License, or * 017 * (at your option) any later version. * 018 * See also COPYING, LICENSE and WARRANTY file * 019 * * 020 * *********************************************************************** */ 021 022 package org.matsim.core.controler; 023 024import org.matsim.analysis.IterationStopWatch; 025 026public final class NewControlerModule extends AbstractModule { 027 @Override 028 public void install() { 029 bind(ControlerI.class).to(NewControler.class).asEagerSingleton(); 030 bind(ControlerListenerManagerImpl.class).asEagerSingleton(); 031 bind(ControlerListenerManager.class).to(ControlerListenerManagerImpl.class); 032 033 bind(IterationStopWatch.class).asEagerSingleton(); 034 bind(OutputDirectoryHierarchy.class).asEagerSingleton(); 035 bind(TerminationCriterion.class).to(TerminateAtFixedIterationNumber.class); 036 bind(MatsimServices.class).to(MatsimServicesImpl.class); 037 038 bind(IterationCounter.class).to(MatsimServicesImpl.class); 039 // (I don't want to always inject the whole MatsimServices just to get the iteration number. If 040 // someone has a better idea, please let me know. kai, aug'18) 041 042 bind(PrepareForSim.class).to(PrepareForSimImpl.class); 043 bind(PrepareForMobsim.class).to(PrepareForMobsimImpl.class); 044 } 045}