MATSIM
core
router
AStarEuclideanFactory.java
Go to the documentation of this file.
1
/* *********************************************************************** *
2
* project: org.matsim.*
3
* AStarLandmarksFactory
4
* *
5
* *********************************************************************** *
6
* *
7
* copyright : (C) 2009 by the members listed in the COPYING, *
8
* LICENSE and WARRANTY file. *
9
* email : info at matsim dot org *
10
* *
11
* *********************************************************************** *
12
* *
13
* This program is free software; you can redistribute it and/or modify *
14
* it under the terms of the GNU General Public License as published by *
15
* the Free Software Foundation; either version 2 of the License, or *
16
* (at your option) any later version. *
17
* See also COPYING, LICENSE and WARRANTY file *
18
* *
19
* *********************************************************************** */
20
package
org.matsim.core.router;
21
22
import
java.util.HashMap;
23
import
java.util.Map;
24
25
import
org
.
matsim
.
api
.
core
.
v01
.
network
.
Network
;
26
import
org
.
matsim
.
core
.
router
.
util
.
LeastCostPathCalculator
;
27
import
org
.
matsim
.
core
.
router
.
util
.
LeastCostPathCalculatorFactory
;
28
import
org
.
matsim
.
core
.
router
.
util
.
PreProcessEuclidean
;
29
import
org
.
matsim
.
core
.
router
.
util
.
TravelDisutility
;
30
import
org
.
matsim
.
core
.
router
.
util
.
TravelTime
;
31
35
public
class
AStarEuclideanFactory
implements
LeastCostPathCalculatorFactory
{
36
37
private
final
Map<Network, PreProcessEuclidean>
preProcessData
=
new
HashMap<>();
38
private
final
double
overdoFactor
;
39
40
public
AStarEuclideanFactory
() {
41
this
(1);
42
}
43
44
public
AStarEuclideanFactory
(
double
overdoFactor) {
45
this.overdoFactor =
overdoFactor
;
46
}
47
48
@Override
49
public
synchronized
LeastCostPathCalculator
createPathCalculator
(
final
Network
network,
50
final
TravelDisutility
travelCosts,
final
TravelTime
travelTimes) {
51
PreProcessEuclidean
preProcessEuclidean = this.preProcessData.get(network);
52
if
(preProcessEuclidean == null) {
53
preProcessEuclidean =
new
PreProcessEuclidean
(travelCosts);
54
preProcessEuclidean.
run
(network);
55
this.preProcessData.put(network, preProcessEuclidean);
56
}
57
58
return
new
AStarEuclidean
(network, preProcessEuclidean, travelCosts, travelTimes, overdoFactor);
59
}
60
}
org.matsim.api.core.v01.network
Definition:
Link.java:20
org.matsim.core.router.AStarEuclideanFactory.overdoFactor
final double overdoFactor
Definition:
AStarEuclideanFactory.java:38
org.matsim.core.router.AStarEuclideanFactory.AStarEuclideanFactory
AStarEuclideanFactory(double overdoFactor)
Definition:
AStarEuclideanFactory.java:44
org.matsim.core.router.util.LeastCostPathCalculator
Definition:
LeastCostPathCalculator.java:30
org.matsim.core.router.util.TravelDisutility
Definition:
TravelDisutility.java:40
org.matsim.core.router.util.PreProcessEuclidean.run
void run(final Network network)
Definition:
PreProcessEuclidean.java:56
org
org.matsim.core.router.util.TravelTime
Definition:
TravelTime.java:35
org.matsim.core.router.AStarEuclideanFactory.preProcessData
final Map< Network, PreProcessEuclidean > preProcessData
Definition:
AStarEuclideanFactory.java:37
org.matsim.core.router.util
Definition:
AStarNodeData.java:21
org.matsim.core.router.AStarEuclidean
Definition:
AStarEuclidean.java:75
org.matsim.api
org.matsim.core.router.AStarEuclideanFactory
Definition:
AStarEuclideanFactory.java:35
org.matsim.core
org.matsim.core.router
Definition:
AnalysisMainModeIdentifier.java:20
org.matsim.api.core
org.matsim.core.router.util.LeastCostPathCalculatorFactory
Definition:
LeastCostPathCalculatorFactory.java:33
org.matsim.core.router.util.PreProcessEuclidean
Definition:
PreProcessEuclidean.java:37
org.matsim.core.router.AStarEuclideanFactory.createPathCalculator
synchronized LeastCostPathCalculator createPathCalculator(final Network network, final TravelDisutility travelCosts, final TravelTime travelTimes)
Definition:
AStarEuclideanFactory.java:49
org.matsim.api.core.v01.network.Network
Definition:
Network.java:32
org.matsim
org.matsim.core.router.AStarEuclideanFactory.AStarEuclideanFactory
AStarEuclideanFactory()
Definition:
AStarEuclideanFactory.java:40
org.matsim.api.core.v01
Definition:
BasicLocation.java:20
Generated by
1.8.13