MATSIM
core
router
LeastCostPathCalculatorModule.java
Go to the documentation of this file.
1
/*
2
* *********************************************************************** *
3
* * project: org.matsim.*
4
* * LeastCostPathCalculatorModule.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.core.router;
24
25
import
org
.
matsim
.
core
.
config
.
Config
;
26
import
org
.
matsim
.
core
.
config
.
groups
.
ControllerConfigGroup
;
27
import
org
.
matsim
.
core
.
controler
.
AbstractModule
;
28
import
org
.
matsim
.
core
.
router
.
speedy
.
SpeedyALTFactory
;
29
import
org
.
matsim
.
core
.
router
.
util
.*;
30
31
public
class
LeastCostPathCalculatorModule
extends
AbstractModule
{
32
33
@Override
34
public
void
install
() {
35
// yy The code below will install _one_ LeastCostPathCalculator, which will be Dijkstra or Landmarks or something. It will be the
36
// same Landmarks instance for all modes ... although one could do better by doing the preprocessing separately for the different modes.
37
// kai/mm, jan'17
38
39
Config
config
=
getConfig
();
40
if
(config.
controller
().
getRoutingAlgorithmType
().equals(
ControllerConfigGroup
.
RoutingAlgorithmType
.
Dijkstra
)) {
41
bind(
LeastCostPathCalculatorFactory
.class).to(
DijkstraFactory
.class);
42
}
else
if
(config.
controller
().
getRoutingAlgorithmType
().equals(
ControllerConfigGroup
.
RoutingAlgorithmType
.
AStarLandmarks
)) {
43
bind(
LeastCostPathCalculatorFactory
.class).to(
AStarLandmarksFactory
.class);
44
}
else
if
(config.
controller
().
getRoutingAlgorithmType
().equals(
ControllerConfigGroup
.
RoutingAlgorithmType
.
SpeedyALT
)) {
45
bind(
LeastCostPathCalculatorFactory
.class).to(
SpeedyALTFactory
.class);
46
}
47
}
48
49
}
org.matsim.core.controler.AbstractModule.config
Config config
Definition:
AbstractModule.java:82
org.matsim.core.config.groups.ControllerConfigGroup.RoutingAlgorithmType.AStarLandmarks
AStarLandmarks
Definition:
ControllerConfigGroup.java:37
org.matsim.core.router.DijkstraFactory
Definition:
DijkstraFactory.java:37
org.matsim.core.config.groups.ControllerConfigGroup.RoutingAlgorithmType.SpeedyALT
SpeedyALT
Definition:
ControllerConfigGroup.java:37
org
org.matsim.core.config.Config
Definition:
Config.java:73
org.matsim.core.config
Definition:
CommandLine.java:22
org.matsim.core.config.groups.ControllerConfigGroup
Definition:
ControllerConfigGroup.java:34
org.matsim.core.router.util
Definition:
AStarNodeData.java:21
org.matsim.core.config.groups.ControllerConfigGroup.RoutingAlgorithmType.Dijkstra
Dijkstra
Definition:
ControllerConfigGroup.java:37
org.matsim.core.controler
Definition:
AbstractController.java:20
org.matsim.core
org.matsim.core.router
Definition:
AnalysisMainModeIdentifier.java:20
org.matsim.core.router.util.LeastCostPathCalculatorFactory
Definition:
LeastCostPathCalculatorFactory.java:33
org.matsim.core.config.groups.ControllerConfigGroup.RoutingAlgorithmType
Definition:
ControllerConfigGroup.java:37
org.matsim.core.router.LeastCostPathCalculatorModule.install
void install()
Definition:
LeastCostPathCalculatorModule.java:34
org.matsim.core.router.speedy.SpeedyALTFactory
Definition:
SpeedyALTFactory.java:15
org.matsim.core.controler.AbstractModule
Definition:
AbstractModule.java:76
org.matsim.core.router.AStarLandmarksFactory
Definition:
AStarLandmarksFactory.java:41
org.matsim.core.config.groups
Definition:
ChangeLegModeConfigGroup.java:22
org.matsim
org.matsim.core.controler.AbstractModule.getConfig
final Config getConfig()
Definition:
AbstractModule.java:120
org.matsim.core.config.groups.ControllerConfigGroup.getRoutingAlgorithmType
RoutingAlgorithmType getRoutingAlgorithmType()
Definition:
ControllerConfigGroup.java:194
org.matsim.core.config.Config.controller
final ControllerConfigGroup controller()
Definition:
Config.java:399
org.matsim.core.router.LeastCostPathCalculatorModule
Definition:
LeastCostPathCalculatorModule.java:31
org.matsim.core.router.speedy
Definition:
DAryMinHeap.java:1
Generated by
1.8.13