Package org.onebusaway.transit_data_federation.impl.otp

Examples of org.onebusaway.transit_data_federation.impl.otp.SearchTerminationStrategyImpl


    Vertex target = options.isArriveBy() ? fromVertex : toVertex;
    State init = new OBAState(time.getTime(), origin, options);
    options.remainingWeightHeuristic = new TPRemainingWeightHeuristicImpl();
    GenericAStar search = new GenericAStar();
    search.setSkipTraverseResultStrategy(new SkipVertexImpl());
    search.setSearchTerminationStrategy(new SearchTerminationStrategyImpl());
    search.setShortestPathTreeFactory(TripSequenceShortestPathTree.FACTORY);

    ShortestPathTree spt = search.getShortestPathTree(graph, init, target);
    return spt.getPaths(target, true);
  }
View Full Code Here


  private static class GenericAStarFactoryImpl implements GenericAStarFactory {

    @Override
    public GenericAStar createAStarInstance() {
      GenericAStar instance = new GenericAStar();
      instance.setSearchTerminationStrategy(new SearchTerminationStrategyImpl());
      instance.setShortestPathTreeFactory(TripSequenceShortestPathTree.FACTORY);
      return instance;
    }
View Full Code Here

TOP

Related Classes of org.onebusaway.transit_data_federation.impl.otp.SearchTerminationStrategyImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.