Skip to content

Commit

Permalink
remove --longDistance parameter, behave as if set to true (#1723)
Browse files Browse the repository at this point in the history
  • Loading branch information
abyrd committed Jan 31, 2015
1 parent 40efb56 commit 455677e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,6 @@ public class CommandLineParameters implements Cloneable {
@Parameter(names = {"--autoReload"}, description = "Auto-reload registered graphs when source data is modified.")
public boolean autoReload = false;

@Parameter(names = {"--longDistance"},
description = "Use an algorithm tailored for big graphs (the size of New York or the Netherlands).")
public boolean longDistance = false;

@Parameter(names = {"--port"}, validateWith = AvailablePort.class,
description = "Server port for plain HTTP.")
public Integer port;
Expand Down
21 changes: 5 additions & 16 deletions src/main/java/org/opentripplanner/standalone/OTPConfigurator.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ public GraphBuilderTask builderFromParameters() {
graphBuilder.addGraphBuilder(new TransitToTaggedStopsGraphBuilderImpl());
graphBuilder.addGraphBuilder(new TransitToStreetNetworkGraphBuilderImpl());
}
// The stops can be linked to each other once they are already linked to the street network.
if (params.longDistance && !params.useTransfersTxt) {
// This module will use streets or straight line distance depending on whether OSM data is found in the graph.
// The stops are linked to the street network. They can now be linked to one another with transfer edges.
if (!params.useTransfersTxt) {
// This module will use streets or straight line distance depending on whether OSM data is in the graph.
graphBuilder.addGraphBuilder(new DirectTransferGenerator());
}
gtfsBuilder.setFareServiceFactory(new DefaultFareServiceFactory());
Expand Down Expand Up @@ -284,19 +284,8 @@ public void startupRouter(Router router, Preferences config) {

router.sptServiceFactory = new GenericAStarFactory();
// Choose a PathService to wrap the SPTService, depending on expected maximum path lengths
if (params.longDistance) {
LongDistancePathService pathService = new LongDistancePathService(router.graph,
router.sptServiceFactory);
router.pathService = pathService;
} else {
RetryingPathServiceImpl pathService = new RetryingPathServiceImpl(router.graph,
router.sptServiceFactory);
pathService.setFirstPathTimeout(10.0);
pathService.setMultiPathTimeout(1.0);
router.pathService = pathService;
// cpf.bind(RemainingWeightHeuristicFactory.class,
// new DefaultRemainingWeightHeuristicFactoryImpl());
}
LongDistancePathService pathService = new LongDistancePathService(router.graph, router.sptServiceFactory);
router.pathService = pathService;
router.planGenerator = new PlanGenerator(router.graph, router.pathService);
router.tileRendererManager = new TileRendererManager(router.graph);

Expand Down

0 comments on commit 455677e

Please sign in to comment.