MATSIM
Public Member Functions | Private Attributes | List of all members
org.matsim.core.router.speedy.SpeedyALTFactory Class Reference
Inheritance diagram for org.matsim.core.router.speedy.SpeedyALTFactory:
Inheritance graph
[legend]

Public Member Functions

LeastCostPathCalculator createPathCalculator (Network network, TravelDisutility travelCosts, TravelTime travelTimes)
 

Private Attributes

final Map< Network, SpeedyGraphgraphs = new ConcurrentHashMap<>()
 
final Map< SpeedyGraph, SpeedyALTData > landmarksData = new ConcurrentHashMap<>()
 

Detailed Description

Author
mrieser / Simunto, sponsored by SBB Swiss Federal Railways

Definition at line 15 of file SpeedyALTFactory.java.

Member Function Documentation

◆ createPathCalculator()

LeastCostPathCalculator org.matsim.core.router.speedy.SpeedyALTFactory.createPathCalculator ( Network  network,
TravelDisutility  travelCosts,
TravelTime  travelTimes 
)

Creational method, since Network may not be exactly the scenario's network

Implements org.matsim.core.router.util.LeastCostPathCalculatorFactory.

Definition at line 21 of file SpeedyALTFactory.java.

References org.matsim.core.router.speedy.SpeedyGraphBuilder.build().

21  {
22  SpeedyGraph graph = this.graphs.get(network);
23  if (graph == null) {
24  graph = SpeedyGraphBuilder.build(network);
25  this.graphs.put(network, graph);
26  }
27  SpeedyALTData landmarks = this.landmarksData.get(graph);
28  if (landmarks == null) {
29  int landmarksCount = Math.min(16, graph.nodeCount);
30  landmarks = new SpeedyALTData(graph, landmarksCount, travelCosts);
31  this.landmarksData.put(graph, landmarks);
32  }
33  return new SpeedyALT(landmarks, travelTimes, travelCosts);
34  }
final Map< SpeedyGraph, SpeedyALTData > landmarksData
final Map< Network, SpeedyGraph > graphs
Here is the call graph for this function:

Member Data Documentation

◆ graphs

final Map<Network, SpeedyGraph> org.matsim.core.router.speedy.SpeedyALTFactory.graphs = new ConcurrentHashMap<>()
private

Definition at line 17 of file SpeedyALTFactory.java.

◆ landmarksData

final Map<SpeedyGraph, SpeedyALTData> org.matsim.core.router.speedy.SpeedyALTFactory.landmarksData = new ConcurrentHashMap<>()
private

Definition at line 18 of file SpeedyALTFactory.java.


The documentation for this class was generated from the following file: