MATSIM
DefaultRoutingModules.java
Go to the documentation of this file.
1 /* *********************************************************************** *
2  * project: org.matsim.* *
3  * *
4  * *********************************************************************** *
5  * *
6  * copyright : (C) 2008 by the members listed in the COPYING, *
7  * LICENSE and WARRANTY file. *
8  * email : info at matsim dot org *
9  * *
10  * *********************************************************************** *
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * See also COPYING, LICENSE and WARRANTY file *
17  * *
18  * *********************************************************************** */
19 package org.matsim.core.router;
20 
21 import org.matsim.api.core.v01.Scenario;
28 
29 import javax.annotation.Nullable;
30 
35 public final class DefaultRoutingModules {
36  // despite the fact that this class is in "old", I actually think that it is ok, providing a public interface to functionality that could be changed
37  // underneath. Have to keep in in the "old" package in order to package-protect the infrastructure that is used underneath. kai, mar'15
38 
39 
40  private DefaultRoutingModules(){} // do not instantiate
41 
42  public static RoutingModule createPseudoTransitRouter( String mode, PopulationFactory popFac, Network net, LeastCostPathCalculator routeAlgo,
45  mode,
46  popFac,
47  net,
48  routeAlgo,
49  params) ;
50  }
51 
52  public static RoutingModule createTeleportationRouter( String mode, Scenario scenario, TeleportedModeParams params ) {
53  return new TeleportationRoutingModule(
54  mode,
55  scenario,
56  params.getTeleportedModeSpeed(),
57  params.getBeelineDistanceFactor() );
58  }
59 
63  @Deprecated // use AccessEgressNetworkRouter instead
64  public static RoutingModule createPureNetworkRouter( String mode, PopulationFactory popFact, Network net, final LeastCostPathCalculator routeAlgo ) {
65  return new NetworkRoutingModule(
66  mode,
67  popFact,
68  net,
69  routeAlgo);
70  }
71 
72  // TODO: make package private again
73  // Please use injection (NetworkRoutingProvider) to get a NetworkRoutingInclAccessEgressModule - kn/gl nov'19
74  public static RoutingModule createAccessEgressNetworkRouter( String mode,
75  final LeastCostPathCalculator routeAlgo, Scenario scenario,
76  Network filteredNetwork, RoutingModule accessEgressToNetworkRouter,
77  TimeInterpretation timeInterpretation, MultimodalLinkChooser multimodalLinkChooser) {
78 
80  mode,
81  routeAlgo,
82  scenario, filteredNetwork, null, accessEgressToNetworkRouter, accessEgressToNetworkRouter, timeInterpretation, multimodalLinkChooser);
83  }
84 
85  // TODO: make package private again
86  // Please use injection (NetworkRoutingProvider) to get a NetworkRoutingInclAccessEgressModule - kn/gl nov'19
87  public static RoutingModule createAccessEgressNetworkRouter( String mode,
88  final LeastCostPathCalculator routeAlgo, Scenario scenario,
89  Network filteredNetwork, RoutingModule accessToNetworkRouter, RoutingModule egressFromNetworkRouter,
90  TimeInterpretation timeInterpretation, MultimodalLinkChooser multimodalLinkChooser) {
92  mode,
93  routeAlgo,
94  scenario, filteredNetwork,null, accessToNetworkRouter, egressFromNetworkRouter, timeInterpretation, multimodalLinkChooser);
95  }
96 
103  static RoutingModule createAccessEgressNetworkRouter(String mode, final LeastCostPathCalculator routeAlgo, Scenario scenario,
104  Network filteredNetwork, @Nullable Network invertedNetwork,
105  RoutingModule accessToNetworkRouter, RoutingModule egressFromNetworkRouter,
106  TimeInterpretation timeInterpretation, MultimodalLinkChooser multimodalLinkChooser) {
108  mode, routeAlgo, scenario, filteredNetwork, invertedNetwork, accessToNetworkRouter, egressFromNetworkRouter, timeInterpretation,
109  multimodalLinkChooser);
110  }
111 
112 }
static RoutingModule createPureNetworkRouter(String mode, PopulationFactory popFact, Network net, final LeastCostPathCalculator routeAlgo)
static RoutingModule createAccessEgressNetworkRouter(String mode, final LeastCostPathCalculator routeAlgo, Scenario scenario, Network filteredNetwork, RoutingModule accessEgressToNetworkRouter, TimeInterpretation timeInterpretation, MultimodalLinkChooser multimodalLinkChooser)
static RoutingModule createTeleportationRouter(String mode, Scenario scenario, TeleportedModeParams params)
static RoutingModule createAccessEgressNetworkRouter(String mode, final LeastCostPathCalculator routeAlgo, Scenario scenario, Network filteredNetwork, RoutingModule accessToNetworkRouter, RoutingModule egressFromNetworkRouter, TimeInterpretation timeInterpretation, MultimodalLinkChooser multimodalLinkChooser)
static RoutingModule createPseudoTransitRouter(String mode, PopulationFactory popFac, Network net, LeastCostPathCalculator routeAlgo, RoutingConfigGroup.TeleportedModeParams params)