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

替代安排

原能力

比较改签、取消或重新衔接的成本、时限和后果,保留旅行者确认点。(细化版 p.10–11)

首选项目

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

匹配范围

更新交通数据后重算备选路线。

源码

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());

实现与验收要点

比改签限制、取消费用、预订可用性与旅行者决定。