和顺 / 明行 返回所属 Agent
MX-04.01

候选线路

原能力

串联交通方式、停留节点和各段时点,保留不同时长与预算的路线。(细化版 p.10–11)

首选项目

OpenTripPlanner(LGPL-3.0,局部按许可头)。 OpenTripPlanner

匹配范围

OTP GraphQL 多模式旅程,Valhalla 道路或步行路线。

源码

OpenTripPlanner · public RoutingResponse route()

application/src/main/java/org/opentripplanner/routing/algorithm/RoutingWorker.java · 193–206 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
  public RoutingResponse route() {
    OTPRequestTimeoutException.checkForTimeout();
    this.debugTimingAggregator.finishedPrecalculating();
    var result = RoutingResult.empty();

    try (var temporaryVerticesContainer = new TemporaryVerticesContainer()) {
      this.currentLinkingContext = createLinkingContext(temporaryVerticesContainer);

      if (OTPFeature.ParallelRouting.isOn()) {
        // TODO: This is not using {@link OtpRequestThreadFactory} which means we do not get
        //       log-trace-parameters-propagation and graceful timeout handling here.
        try {
          var r1 = CompletableFuture.supplyAsync(() -> routeDirectStreet());
          var r2 = CompletableFuture.supplyAsync(() -> routeDirectFlex());

实现与验收要点

跨境完整覆盖、实时供应、证件与航班服务独立验证。