MATSIM
LinkStatsModule.java
Go to the documentation of this file.
1 /*
2  * *********************************************************************** *
3  * * project: org.matsim.*
4  * * LinkStatsModules.java
5  * * *
6  * * *********************************************************************** *
7  * * *
8  * * copyright : (C) 2014 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.analysis;
24 
26 
27 public final class LinkStatsModule extends AbstractModule {
28 
29  @Override
30  public void install() {
31  bind(CalcLinkStats.class).asEagerSingleton();
32  if (getConfig().linkStats().getWriteLinkStatsInterval() > 0) {
33  // "Do not use this, as it may not contain values in every iteration."
34  // says the original comment on the getter in the Controler.
35  // I assume this is still true.
36  /*TODO [MR] linkStats uses ttcalc and volumes, but ttcalc has
37  15min-steps, while volumes uses 60min-steps! It works a.t.m., but the
38  traveltimes in linkStats are the avg. traveltimes between xx.00 and
39  xx.15, and not between xx.00 and xx.59*/
40  bind(LinkStatsControlerListener.class).asEagerSingleton();
41  addControlerListenerBinding().to(LinkStatsControlerListener.class);
42  }
43  }
44 
45 }
final LinkedBindingBuilder< ControlerListener > addControlerListenerBinding()