rr.walkSpeed = request.walkSpeed;
// If max trip duration is not limited, searches are of course much slower.
int worstElapsedTime = request.maxWalkTime * 60; // convert from minutes to seconds, assume walking at egress
rr.worstTime = (rr.dateTime + worstElapsedTime);
rr.batch = (true);
GenericAStar astar = new GenericAStar();
rr.setNumItineraries(1);
for (TransitStop tstop : graph.index.stopVertexForStop.values()) {
int index = tstop.getIndex();
// Generate a tree outward from all stops that have been touched in the basic profile search
if (mins[index] == TimeSurface.UNREACHABLE || maxs[index] == TimeSurface.UNREACHABLE) continue;
rr.setRoutingContext(graph, tstop, null); // Set origin vertex directly instead of generating link edges
astar.setTraverseVisitor(new ExtremaPropagationTraverseVisitor(mins[index], maxs[index]));
ShortestPathTree spt = astar.getShortestPathTree(rr, 5);
rr.rctx.destroy();
}
minSurface = new TimeSurface(this, false);
maxSurface = new TimeSurface(this, true);
LOG.info("done making timesurfaces.");