Rail curve radius analysis and max speed evaluation#1793
Rail curve radius analysis and max speed evaluation#1793
Conversation
|
This is the feature branch to be used on some of our instances |
tahini
left a comment
There was a problem hiding this comment.
J'ai testé rapidement localement: pourquoi ça ne fonctionne pas avec le métro?
| "TotalTripTime": "Temps total du trajet", | ||
| "TravelTime": "Temps de parcours", | ||
| "GeometryResolutionWarningNone": "La forme du parcours utilise seulement des lignes droites entre les stations. Les courbes sont ignorées dans le calcul; les temps de parcours utilisent un calcul cinématique simple (accélération/vitesse de croisière/décélération).", | ||
| "GeometryResolutionWarningLow": "La forme du parcours a une résolution faible (changements de direction abrupts détectés). Les courbes sont ignorées dans le calcul; les temps de parcours utilisent un calcul cinématique simple. Les sommets avec une précision insuffisante sont surlignés par des cercles orange sur la carte. Ajoutez ou ajustez les points de passage à ces endroits pour lisser le parcours et activer l'analyse des courbes.", |
There was a problem hiding this comment.
"Les courbes sont ignorées dans le calcul" qu'est-ce que ça implique? Pendant cette distance, est-ce que ça roule à pleine vitesse? Ou à une vitesse minimale?. "calcul cinématique simple", dans le cas des courbes trop abruptes? c'est quoi le calcul?
Ce serait bien d'avoir l'option lissage.
Reduce comments lines length for easier reading.
Rail modes are now a subset of transit modes and a function is provided to check if a mode is a rail mode.
Closes #128 Implement curve radius analysis for rail transit paths (tram, metro, rail, monorail, etc.) that estimates speed limits imposed by track curvature and adjusts travel times accordingly when geometry is precise enough. transition-backend: - Add railCurves/ module with geometry analysis (radius estimation via inscribed circle method), curvature segmentation, speed profile generation (forward-backward pass with acceleration/deceleration), and segment travel time calculation - Add transitPaths.curveAnalysis socket API endpoint for on-demand curve analysis from the frontend - Add transitPathCurves.socketRoutes.test.ts with 14 tests covering edge cases, multi-segment paths, all rail modes, large angle detection, dwell time impact, and speed impact - Register new socket route in all.socketRoutes.ts transition-common: - Add railCurves/types.ts to transition-common (shared types) - Add geometry resolution detection (high/low/none/almostStraight) to skip curve analysis when path shapes are too coarse transition-frontend: - Add CurveStatsPanel with interactive speed profile chart (Recharts) supporting time and distance X-axis modes, proportional chart width, and configurable tick intervals - Add CurveStatsTable for per-segment travel time breakdown - Add map layers for curve segments (orange) and large-angle vertices (orange circles) to help users identify imprecise path geometry - Update TransitPathEdit to fetch curve analysis from backend API, auto-refresh on geometry changes (waypoint drag, node add/remove, undo/redo), and show progress notification during calculation - Apply curve-aware travel times to path data (operatingTime, speeds) so schedules and saved paths use curve-adjusted values - Add pathStale warning when parameters or geometry change, cleared after route recalculation - Update TransitPathStatistics to show curve-aware travel times for rail modes, hiding curve comparison when geometry is not high-res - Add styles for curve stats panel, table, chart, and toggle controls Locales: - Add English and French translations for all new curve analysis UI strings, warnings, labels, and progress notifications New package: - recharts for curve stats panel chart
852144b to
9338525
Compare
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Implement a backend service that applies Chaikin's corner-cutting algorithm to smooth path geometry between transit nodes. Each node-to-node segment is smoothed independently while preserving node positions. A convergence check (same deflection angle + spacing criteria as the curve analysis geometry resolution detector) prevents adding waypoints to segments that are already smooth, so repeated clicks do not cause unbounded point growth. Backend: - New chaikinSmoothing.ts service with hasCoarseVertices(), chaikinSmoothSegment(), and chaikinSmoothPath() - New transitPaths.smoothPath socket route (separate from curve analysis) - 30 unit tests covering the algorithm and socket route Frontend: - Add a smooth button (bezier curve icon) in the path edit form, visible only when the routing engine is 'manual' (click on map) - The button sets smoothed coordinates as waypoints then calls updateGeography() to recalculate distances, travel times and stats - Add travel time and speed rows that compare with/without curve limits when curve analysis is available (both including and excluding dwell times)
Summary by CodeRabbit
Release Notes
New Features
UI & UX
Screenshots: