Skip to content

Commit cdd1d96

Browse files
committed
analyst fix
1 parent 3e324f1 commit cdd1d96

File tree

2 files changed

+13
-9
lines changed
  • opentripplanner-analyst/src/main/java/org/opentripplanner/analyst/request
  • opentripplanner-routing/src/main/java/org/opentripplanner/routing/core

2 files changed

+13
-9
lines changed

opentripplanner-analyst/src/main/java/org/opentripplanner/analyst/request/TileCache.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ the License, or (at your option) any later version.
1414
package org.opentripplanner.analyst.request;
1515

1616
import org.opentripplanner.analyst.core.DynamicTile;
17+
import org.opentripplanner.analyst.core.TemplateTile;
1718
import org.opentripplanner.analyst.core.Tile;
1819
import org.slf4j.Logger;
1920
import org.slf4j.LoggerFactory;
@@ -51,10 +52,10 @@ public class TileCache extends CacheLoader<TileRequest, Tile>
5152
/** completes the abstract CacheLoader superclass */
5253
public Tile load(TileRequest req) throws Exception {
5354
LOG.debug("tile cache miss; cache size is {}", this.tileCache.size());
54-
//return new TemplateTile(req, sampleFactory);
55+
return new TemplateTile(req, sampleFactory);
5556
//return new TemplateTile(req, hashSampler);
5657
//return new DynamicTile(req, hashSampler);
57-
return new DynamicTile(req, sampleFactory);
58+
//return new DynamicTile(req, sampleFactory);
5859
}
5960

6061
/** delegate to the tile LoadingCache */

opentripplanner-routing/src/main/java/org/opentripplanner/routing/core/RoutingContext.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,16 @@ private RoutingContext(RoutingRequest routingRequest, Graph graph, Vertex from,
171171
else
172172
remainingWeightHeuristic = heuristicFactory.getInstanceForSearch(opt);
173173

174-
LOG.debug("Origin vertex {}", this.origin);
175-
LOG.debug("Origin vertex inbound edges {}", this.origin.getIncoming());
176-
LOG.debug("Origin vertex outbound edges {}", this.origin.getOutgoing());
177-
178-
LOG.debug("Destination vertex {}", this.target);
179-
LOG.debug("Destination vertex inbound edges {}", this.target.getIncoming());
180-
LOG.debug("Destination vertex outbound edges {}", this.target.getOutgoing());
174+
if (this.origin != null) {
175+
LOG.debug("Origin vertex inbound edges {}", this.origin.getIncoming());
176+
LOG.debug("Origin vertex outbound edges {}", this.origin.getOutgoing());
177+
}
178+
// target is where search will terminate, can be origin or destination depending on arriveBy
179+
LOG.debug("Target vertex {}", this.target);
180+
if (this.target!= null) {
181+
LOG.debug("Destination vertex inbound edges {}", this.target.getIncoming());
182+
LOG.debug("Destination vertex outbound edges {}", this.target.getOutgoing());
183+
}
181184
}
182185

183186

0 commit comments

Comments
 (0)