MATSIM
WithinDayModule.java
Go to the documentation of this file.
1 /*
2  * *********************************************************************** *
3  * * project: org.matsim.*
4  * * WithinDayModule.java
5  * * *
6  * * *********************************************************************** *
7  * * *
8  * * copyright : (C) 2015 by the members listed in the COPYING, *
9  * * LICENSE and WARRANTY file. *
10  * * email : info at matsim dot org *
11  * * *
12  * * *********************************************************************** *
13  * * *
14  * * This program is free software; you can redistribute it and/or modify *
15  * * it under the terms of the GNU General Public License as published by *
16  * * the Free Software Foundation; either version 2 of the License, or *
17  * * (at your option) any later version. *
18  * * See also COPYING, LICENSE and WARRANTY file *
19  * * *
20  * * ***********************************************************************
21  */
22 
23 package org.matsim.withinday.controller;
24 
25 import java.util.HashMap;
26 import java.util.Map;
27 
28 import jakarta.inject.Named;
29 
43 
44 import com.google.inject.Provides;
45 
46 public class WithinDayModule extends AbstractModule {
47  @Override
48  public void install() {
50  bind(WithinDayEngine.class);
51  bind(Mobsim.class).toProvider(WithinDayQSimFactory.class);
52  bind(FixedOrderSimulationListener.class).asEagerSingleton();
53  bind(WithinDayControlerListener.class).asEagerSingleton();
55  bind(MobsimDataProvider.class).asEagerSingleton();
56  bind(ActivityReplanningMap.class).asEagerSingleton();
57  bind(LinkReplanningMap.class).asEagerSingleton();
58  bind(EarliestLinkExitTimeProvider.class).asEagerSingleton();
59  }
60 
61  @Provides @Named("lowerBound") Map<String, TravelTime> provideEarliestLinkExitTravelTimes(Map<String, TravelTime> travelTimes) {
62  Map<String, TravelTime> earliestLinkExitTravelTimes = new HashMap<>();
63  earliestLinkExitTravelTimes.putAll(travelTimes);
64  earliestLinkExitTravelTimes.put(TransportMode.car, new FreeSpeedTravelTime());
65  return earliestLinkExitTravelTimes;
66  }
67 }
final LinkedBindingBuilder< ControlerListener > addControlerListenerBinding()