Repository navigation
バス路線に専用の速度プロファイルを追加し地下鉄・優等列車扱いによるETA過小評価を修正する - #1580
Merged
Merged
Conversation
GTFSインポートはバス路線のline_typeにGTFSのroute_type(バス=3)をそのまま 格納しており、StationAPIの路線種別(3=地下鉄)と衝突するため、ETA推定で バスが基本速度75km/hの地下鉄として扱われていた。さらにバス経路の kind=7(BusRoute)が優等種別判定(kind != 0 → ×1.2)に該当し、最高速度 90km/hで計算されていた。停留所間隔が短い市街地路線(池65など)では 加減速支配のため影響が出ないが、停留所間隔の長い区間では所要時間が 大幅に過小評価される。 transport_typeでバスを判定し、最高速度50km/h(優等補正なし)・ 迂回係数1.30(道路)の専用プロファイルを適用する。池65 落合南長崎駅前→目白駅前相当(約300m×7区間)で実乗車時間約10分と 整合することを較正テストで確認。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KZrVUqfmEjpBcmNbF4ZyG8
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
👮 Files not reviewed due to content moderation or server errors (1)
📝 Walkthrough
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
7 of 10 tasks
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.
概要
GTFS由来のバス路線が到着時間推定で「地下鉄の優等列車」(最高速度 75km/h × 1.2 = 90km/h)として扱われていた問題を修正し、
transport_typeで判定するバス専用の速度プロファイルを追加する。変更の種類
変更内容
line_typeにGTFSのroute_type(バス=3)をそのまま格納しており、StationAPIの路線種別(3=地下鉄)と衝突するため、ETA推定でバスが基本速度75km/hの地下鉄として扱われていた。さらにバス経路のkind=7(BusRoute)が優等種別判定(kind != 0→ ×1.2)に該当し、最高速度90km/hで計算されていたarrival_estimation.rsにtransport_type == Busで判定する専用プロファイルを追加: 最高速度BUS_MAX_SPEED_KMH = 50.0(優等補正×1.2はバイパス)、フォールバック迂回係数BUS_FALLBACK_DETOUR = 1.30(道路)max_speed_kmh/fallback_detour_factor/detour_factor_for/detour_factors_by_lineにtransport_typeを伝搬(変更はarrival_estimation.rsに閉じており、proto・インポート・リポジトリ層の変更なし)kind=7に優等補正が掛からないことのガードテスト
cargo fmt --all -- --checkが通ることcargo clippy -- -D warningsが通ることcargo test(SQLX_OFFLINE=true)が通ること関連Issue
スクリーンショット(任意)
🤖 Generated with Claude Code
https://claude.ai/code/session_01KZrVUqfmEjpBcmNbF4ZyG8
Generated by Claude Code