MATSIM
withinday
trafficmonitoring
WithinDayTravelTimeModule.java
Go to the documentation of this file.
1
2
/* *********************************************************************** *
3
* project: org.matsim.*
4
* WithinDayTravelTimeModule.java
5
* *
6
* *********************************************************************** *
7
* *
8
* copyright : (C) 2019 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
package
org.matsim.withinday.trafficmonitoring;
23
24
import
jakarta.inject.Singleton;
25
26
import
org
.
matsim
.
core
.
config
.
groups
.
ControllerConfigGroup
;
27
import
org
.
matsim
.
core
.
controler
.
AbstractModule
;
28
29
public
class
WithinDayTravelTimeModule
extends
AbstractModule
{
30
31
public
WithinDayTravelTimeModule
() {
32
}
33
34
@Override
35
public
void
install
() {
36
if
(
getConfig
().controller().getRoutingAlgorithmType() !=
ControllerConfigGroup
.
RoutingAlgorithmType
.
Dijkstra
) {
37
throw
new
RuntimeException
(
38
"for me, in KNAccidentScenario, this works with Dijkstra (default until spring 2019), and does not work with AStarLandmarks "
39
+
"(default afterwards). I have not tried the other routing options, nor have I systematically debugged. KN, feb'19"
);
40
}
41
42
bind(
WithinDayTravelTime
.class).in(Singleton.class);
43
addEventHandlerBinding
().to(
WithinDayTravelTime
.class);
44
bindNetworkTravelTime
().to(
WithinDayTravelTime
.class);
45
// yyyyyy also needs to be bound as mobsim listener. There is maybe a reason
46
// why this is not added here, but could someone please explain? thx. kai, dec'17
47
// Trying it out:
48
addMobsimListenerBinding
().to(
WithinDayTravelTime
.class);
49
}
50
}
org.matsim.withinday.trafficmonitoring.WithinDayTravelTimeModule
Definition:
WithinDayTravelTimeModule.java:29
org
org.matsim.core.controler.AbstractModule.addMobsimListenerBinding
final com.google.inject.binder.LinkedBindingBuilder< MobsimListener > addMobsimListenerBinding()
Definition:
AbstractModule.java:172
org.matsim.core.config
Definition:
CommandLine.java:22
org.matsim.core.config.groups.ControllerConfigGroup
Definition:
ControllerConfigGroup.java:34
RuntimeException
org.matsim.withinday.trafficmonitoring.WithinDayTravelTimeModule.install
void install()
Definition:
WithinDayTravelTimeModule.java:35
org.matsim.core.config.groups.ControllerConfigGroup.RoutingAlgorithmType.Dijkstra
Dijkstra
Definition:
ControllerConfigGroup.java:37
org.matsim.withinday.trafficmonitoring.WithinDayTravelTimeModule.WithinDayTravelTimeModule
WithinDayTravelTimeModule()
Definition:
WithinDayTravelTimeModule.java:31
org.matsim.withinday.trafficmonitoring.WithinDayTravelTime
Definition:
WithinDayTravelTime.java:86
org.matsim.core.controler.AbstractModule.bindNetworkTravelTime
final LinkedBindingBuilder< TravelTime > bindNetworkTravelTime()
Definition:
AbstractModule.java:223
org.matsim.core.controler
Definition:
AbstractController.java:20
org.matsim.core
org.matsim.core.controler.AbstractModule.addEventHandlerBinding
final LinkedBindingBuilder< EventHandler > addEventHandlerBinding()
Definition:
AbstractModule.java:129
org.matsim.core.config.groups.ControllerConfigGroup.RoutingAlgorithmType
Definition:
ControllerConfigGroup.java:37
org.matsim.core.controler.AbstractModule
Definition:
AbstractModule.java:76
org.matsim.core.config.groups
Definition:
ChangeLegModeConfigGroup.java:22
org.matsim
org.matsim.core.controler.AbstractModule.getConfig
final Config getConfig()
Definition:
AbstractModule.java:120
Generated by
1.8.13