Skip to content

Commit

Permalink
Extend max duration to address the other part of opentripplanner#2148
Browse files Browse the repository at this point in the history
…(biasing results by only including the trips with least waiting)
  • Loading branch information
mattwigway committed Oct 19, 2015
1 parent 040258d commit a435731
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/main/java/org/opentripplanner/profile/RaptorWorker.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ public class RaptorWorker {

private static final Logger LOG = LoggerFactory.getLogger(RaptorWorker.class);
public static final int UNREACHED = Integer.MAX_VALUE;
static final int MAX_DURATION = 120 * 60;

// this should be somewhat longer than the cutoff in the UI because we don't want to take away, say,
// the longer half of the ways to reach a destination and take the average of the rest
static final int MAX_DURATION = 180 * 60;

/**
* The number of randomized frequency schedule draws to take for each minute of the search.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public TIntIntMap findInitialStops(boolean dest, RaptorWorkerData data) {
if (data == null) {
// Non-transit mode. Search out to the full 120 minutes.
// Should really use directModes.
rr.worstTime = rr.dateTime + 120 * 60;
rr.worstTime = rr.dateTime + RaptorWorker.MAX_DURATION;
rr.dominanceFunction = new DominanceFunction.EarliestArrival();
} else {
// Transit mode, limit pre-transit travel.
Expand Down

0 comments on commit a435731

Please sign in to comment.