Commit 1ba32cd8 authored by Michael Zilske's avatar Michael Zilske

Sanitize

parent 296736bc
......@@ -79,9 +79,7 @@ final class GraphExplorer {
final List<VirtualEdgeIteratorState> extraEdges = reverse ? extraEdgesByDestination.get(label.adjNode) : extraEdgesBySource.get(label.adjNode);
return Stream.concat(
label.adjNode < graph.getNodes() ? mainEdgesAround(label) : Stream.empty(),
extraEdges.stream()).peek(e -> {if (label.adjNode == 2581) {
System.out.println(e);
}}).filter(new EdgeIteratorStatePredicate(label));
extraEdges.stream()).filter(new EdgeIteratorStatePredicate(label));
}
private Stream<EdgeIteratorState> mainEdgesAround(Label label) {
......@@ -177,9 +175,6 @@ final class GraphExplorer {
@Override
public boolean test(EdgeIteratorState edgeIterator) {
if (edgeIterator.getBaseNode() == 2579) {
System.out.println("wurst");
}
final GtfsStorage.EdgeType edgeType = flagEncoder.getEdgeType(edgeIterator.getFlags());
if (walkOnly && edgeType != GtfsStorage.EdgeType.HIGHWAY && edgeType != (reverse ? GtfsStorage.EdgeType.EXIT_PT : GtfsStorage.EdgeType.ENTER_PT)) {
return false;
......
......@@ -107,7 +107,6 @@ public final class GraphHopperGtfs implements GraphHopperAPI {
private GraphExplorer graphExplorer;
RequestHandler(GHRequest request) {
System.out.println(graphWithExtraEdges.getAllEdges().getMaxId());
maxVisitedNodesForRequest = request.getHints().getInt(Parameters.Routing.MAX_VISITED_NODES, 1_000_000);
profileQuery = request.getHints().getBool(PROFILE_QUERY, false);
ignoreTransfers = request.getHints().getBool(Parameters.PT.IGNORE_TRANSFERS, profileQuery);
......
......@@ -104,9 +104,6 @@ class MultiCriteriaLabelSetting {
Label label = fromHeap.poll();
action.accept(label);
explorer.exploreEdgesAround(label).forEach(edge -> {
if (edge == null) {
System.out.println("wurst");
}
GtfsStorage.EdgeType edgeType = flagEncoder.getEdgeType(edge.getFlags());
long nextTime;
if (reverse) {
......
......@@ -81,7 +81,7 @@ public class RealtimeFeed {
final List<VirtualEdgeIteratorState> additionalEdges = new ArrayList<>();
final Graph overlayGraph = new Graph() {
int nNodes = 0;
int firstEdge = 999999; //FIXME
int firstEdge = graph.getAllEdges().getMaxId()+1;
final NodeAccess nodeAccess = new NodeAccess() {
IntIntHashMap additionalNodeFields = new IntIntHashMap();
......
......@@ -22,7 +22,6 @@ import com.google.transit.realtime.GtfsRealtime;
import com.graphhopper.reader.gtfs.GraphHopperGtfs;
import com.graphhopper.reader.gtfs.GtfsStorage;
import com.graphhopper.reader.gtfs.PtFlagEncoder;
import com.graphhopper.reader.gtfs.RealtimeFeed;
import com.graphhopper.routing.util.EncodingManager;
import com.graphhopper.storage.GHDirectory;
import com.graphhopper.storage.GraphHopperStorage;
......@@ -87,7 +86,7 @@ public class RealtimeIT {
final GtfsRealtime.FeedMessage.Builder feedMessageBuilder = GtfsRealtime.FeedMessage.newBuilder();
feedMessageBuilder.setHeader(GtfsRealtime.FeedHeader.newBuilder().setGtfsRealtimeVersion("1"));
feedMessageBuilder.addEntityBuilder()
.setId("pups")
.setId("1")
.getTripUpdateBuilder()
.setTrip(GtfsRealtime.TripDescriptor.newBuilder().setTripId("CITY2").setStartTime("06:00:00"))
.addStopTimeUpdateBuilder()
......@@ -118,7 +117,7 @@ public class RealtimeIT {
final GtfsRealtime.FeedMessage.Builder feedMessageBuilder = GtfsRealtime.FeedMessage.newBuilder();
feedMessageBuilder.setHeader(GtfsRealtime.FeedHeader.newBuilder().setGtfsRealtimeVersion("1"));
feedMessageBuilder.addEntityBuilder()
.setId("pups")
.setId("1")
.getTripUpdateBuilder()
.setTrip(GtfsRealtime.TripDescriptor.newBuilder().setTripId("CITY2").setStartTime("06:00:00"))
.addStopTimeUpdateBuilder()
......@@ -149,7 +148,7 @@ public class RealtimeIT {
final GtfsRealtime.FeedMessage.Builder feedMessageBuilder = GtfsRealtime.FeedMessage.newBuilder();
feedMessageBuilder.setHeader(GtfsRealtime.FeedHeader.newBuilder().setGtfsRealtimeVersion("1"));
feedMessageBuilder.addEntityBuilder()
.setId("pups")
.setId("1")
.getTripUpdateBuilder()
.setTrip(GtfsRealtime.TripDescriptor.newBuilder().setTripId("CITY2").setStartTime("06:00:00"))
.addStopTimeUpdateBuilder()
......@@ -184,7 +183,7 @@ public class RealtimeIT {
feedMessageBuilder.addEntityBuilder()
.setId("pups")
.setId("1")
.getTripUpdateBuilder()
.setTrip(GtfsRealtime.TripDescriptor.newBuilder().setTripId("CITY2").setStartTime("06:00:00"))
.addStopTimeUpdateBuilder()
......@@ -192,7 +191,7 @@ public class RealtimeIT {
.setScheduleRelationship(SKIPPED);
final GtfsRealtime.TripUpdate.Builder extraTripUpdate = feedMessageBuilder.addEntityBuilder()
.setId("pups")
.setId("2")
.getTripUpdateBuilder()
.setTrip(GtfsRealtime.TripDescriptor.newBuilder().setScheduleRelationship(ADDED).setTripId("EXTRA").setRouteId("CITY").setStartTime("06:45:00"));
extraTripUpdate
......@@ -232,7 +231,7 @@ public class RealtimeIT {
final GtfsRealtime.FeedMessage.Builder feedMessageBuilder = GtfsRealtime.FeedMessage.newBuilder();
feedMessageBuilder.setHeader(GtfsRealtime.FeedHeader.newBuilder().setGtfsRealtimeVersion("1"));
feedMessageBuilder.addEntityBuilder()
.setId("pups")
.setId("1")
.getTripUpdateBuilder()
.setTrip(GtfsRealtime.TripDescriptor.newBuilder().setTripId("AB1").setStartTime("00:00:00"))
.addStopTimeUpdateBuilder()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment