/* the worst trip we are willing to accept is at most twice as bad or twice as long */
if (somePaths.isEmpty()) {
// if there is no first path, there won't be any other paths
return null;
}
GraphPath path = somePaths.get(0);
long duration = path.getDuration();
LOG.debug("Setting max time and weight for subsequent searches.");
LOG.debug("First path start time: {}", path.getStartTime());
maxTime = path.getStartTime() +
MAX_TIME_FACTOR * (currOptions.arriveBy ? -duration : duration);
LOG.debug("First path duration: {}", duration);
LOG.debug("Max time set to: {}", maxTime);
maxWeight = path.getWeight() * MAX_WEIGHT_FACTOR;
LOG.debug("Max weight set to: {}", maxWeight);
if (path.getWalkDistance() > maxWalk) {
maxWalk = path.getWalkDistance() * 1.25;
}
}
if (somePaths.isEmpty()) {
//try again doubling maxwalk
LOG.debug("No paths were found.");