Repository navigation
line_typeベースの速度テーブルと迂回係数を導入して到着時間推定精度を改善 - #1572
Merged
Merged
Conversation
LINE_TYPE_SHINKANSENの値を実データに合わせて7→1に修正し、 路線種別ごとの基本速度(新幹線250/地下鉄75/路面電車40/AGT60/ケーブル12/在来線85km/h)と 迂回係数(新幹線1.15/地下鉄1.20/路面電車1.40/AGT1.20/ケーブル1.10/在来線1.30)を設定。 速達種別は基本速度×1.2で算出するように変更。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ag6fgiLJj5ExLa9bqnfAhj
…l-estimation-speed-profile
Contributor
📝 WalkthroughWalkthrough到着推定用の Changes到着推定パラメータの再構成
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)該当なし(単一ファイル内のロジック変更のため)。 Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
4 of 10 tasks
7 of 10 tasks
This was referenced Jul 5, 2026
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.
概要
到着時間推定 (
estimate_arrival_minutes) の精度を改善する。路線種別 (line_type) ごとに基本速度と迂回係数を分けることで、新幹線・地下鉄・路面電車・AGT/モノレール・ケーブルカー等の特性を反映する。変更の種類
変更内容
LINE_TYPE_SHINKANSENの値を7→1に修正(実データのline_type値と一致させる。従来は新幹線 250km/h が一切適用されていなかった)LINE_TYPE_SUBWAY(3),LINE_TYPE_TRAM(4),LINE_TYPE_AGT(5),LINE_TYPE_CABLE(0)base_speed_kmh()を新設し、路線種別ごとの基本最高速度を返す(新幹線 250 / 地下鉄 75 / 路面電車 40 / AGT 60 / ケーブル 12 / 在来線 85 km/h)max_speed_kmh()をbase_speed_kmhベースに書き換え、速達種別はbase × 1.2で算出fallback_detour_factor()に路線種別ごとの迂回係数を追加(地下鉄 1.20 / 路面電車 1.40 / AGT 1.20 / ケーブル 1.10)line_typeをSome(1)→Some(2)に修正(意図せず新幹線扱いになっていた)テスト
cargo fmt --all -- --checkが通ることcargo clippy -- -D warningsが通ることcargo test(SQLX_OFFLINE=true)が通ること関連Issue
スクリーンショット(任意)