trainRouteのEstimatedモードと線路の長さによる到着時間推定を本番へ反映 - #1716
Merged
Merged
Conversation
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* 到着時間推定を実際の所要時間と比べるベンチマークを追加し、CIで推定の悪化を検出できるようにした Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 所要時間ベンチマークで記録済みの基準を推定できなくなったら失敗させ、generatedのデータでは記録と比べないようにした Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 所要時間ベンチマークの記録を生成データで作り、build_worker.ymlで生成データを作ってから比べるようにした Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * 所要時間ベンチマークに典型的な所要時間の列を足し、回帰の見張りを範囲からの外れではなく典型値からのずれで判定するようにした Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…1712) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…dRoutesを元の計算に戻した (#1714) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…edRoutesは元の計算のまま残した (#1715)
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
dev の変更を master(本番)へ反映します。
trainRouteにmodel: TrainRouteModel引数を追加し、到着時間推定のモデルで区間の値を返すEstimatedを選べるようにします(trainRouteに到着時間推定のモデルで区間の値を返すEstimatedモードを追加 #1710)。省略時のLegacyはこれまでと同じ値です。estimateArrivalTimesが、駅間の距離に線路の長さを使い、その距離で求め直した速度の較正で推定するようになります(到着時間推定の駅間距離に線路の長さを使い、速度の較正をその距離で求め直した #1712, 線路の長さと求め直した較正をtrainRouteのEstimatedだけで使い、estimateArrivalTimesとconnectedRoutesを元の計算に戻した #1714, estimateArrivalTimesをtrainRouteのEstimatedと同じ計算にし、経路検索は元の計算のまま残した #1715)。これで MobileApp のオートモード(Estimated)・ETA・GPX の所要時間がそろいます。変更の種類
変更内容
trainRouteにEstimatedモードを追加(Closes trainRoute の値で走らせた所要時間が、同じ較正値を使う estimateArrivalTimes より短くなる #1709)enum TrainRouteModel { Legacy Estimated }、trainRoute(model:)、TrainRouteSegment.arrivalCumulativeMinutes/departureCumulativeMinutesを追加します。追加だけで、既存のフィールドは変わりません。Legacy(既定)の値は変えていません。求め直す前の速度の表をdomain/legacy_speed_table.rsに凍結し、配布済みアプリのオートモードが動かないようにしています。travel_times/cases.csv)と推定を比べるベンチマークを追加cargo test -p stationapi-workerがtravel_times/baseline.csvから悪化したケースを検出します。build_worker.ymlでデータ生成後に実行します。make travel-time-reportで全ケースの表を出せます。trainRouteのEstimatedとestimateArrivalTimesです。connectedRoutesとtrainRouteのLegacyは元の計算のままで、探索結果と並び順は変わりません。デプロイ時の注意
estimateArrivalTimesの値が変わります。 線路の長さと求め直した較正で推定するためです。connectedRoutesの結果とtrainRoute(model省略時)の値は変わりません。make schemaで SDL が一致すること、trainRoute(..., model: Estimated)のarrivalCumulativeMinutesが埋まること、modelを省いたときにnullのままであることを確かめてください。テスト
make fmtが通ることmake clippyが通ること(wasm32 ターゲットを含む)make testが通ること各 PR(trainRouteに到着時間推定のモデルで区間の値を返すEstimatedモードを追加 #1710, 到着時間推定を実際の所要時間と比べるベンチマークを追加し、CIで推定の悪化を検出できるようにした #1711, 到着時間推定の駅間距離に線路の長さを使い、速度の較正をその距離で求め直した #1712, 線路の長さと求め直した較正をtrainRouteのEstimatedだけで使い、estimateArrivalTimesとconnectedRoutesを元の計算に戻した #1714, estimateArrivalTimesをtrainRouteのEstimatedと同じ計算にし、経路検索は元の計算のまま残した #1715)で上の 3 項目を通しています。
dev の最新コミット(3dd6ab3)では
Continuous integrationとDeploy to stagingがどちらも成功しています。関連Issue
Refs #1709, #1704
スクリーンショット(任意)
🤖 Generated with Claude Code