Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: OpenRailAssociation/osrd
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6648a3d5bd95acdb2652549c7903602708712a04
Choose a base ref
..
head repository: OpenRailAssociation/osrd
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: adfa631432d838fe387a8ef3f24aafdd47734811
Choose a head ref
Showing with 3,874 additions and 2,090 deletions.
  1. +1 −12 core/src/main/kotlin/fr/sncf/osrd/stdcm/graph/STDCMEdgeBuilder.kt
  2. +447 −576 editoast/Cargo.lock
  3. +17 −13 editoast/Cargo.toml
  4. +7 −0 editoast/editoast_common/Cargo.toml
  5. +1 −0 editoast/editoast_common/src/lib.rs
  6. +80 −0 editoast/editoast_common/src/tracing.rs
  7. +22 −0 editoast/editoast_models/src/tables.rs
  8. +10 −0 editoast/editoast_schemas/src/infra/direction.rs
  9. +1 −0 editoast/migrations/2024-11-05-113351_macro_nodes/down.sql
  10. +16 −0 editoast/migrations/2024-11-05-113351_macro_nodes/up.sql
  11. +346 −5 editoast/openapi.yaml
  12. +2 −2 editoast/osm_to_railjson/Cargo.toml
  13. +55 −53 editoast/src/client/stdcm_search_env_commands.rs
  14. +9 −0 editoast/src/client/telemetry_config.rs
  15. +34 −0 editoast/src/core/pathfinding.rs
  16. +25 −61 editoast/src/main.rs
  17. +32 −25 editoast/src/models/infra/sql/get_split_track_section_with_data.sql
  18. +62 −0 editoast/src/models/macro_node.rs
  19. +4 −1 editoast/src/models/mod.rs
  20. +1 −22 editoast/src/models/projects.rs
  21. +8 −0 editoast/src/models/scenario.rs
  22. +16 −14 editoast/src/models/stdcm_search_environment.rs
  23. +1 −1 editoast/src/models/study.rs
  24. +32 −0 editoast/src/models/tags.rs
  25. +3 −3 editoast/src/views/authz.rs
  26. +3 −3 editoast/src/views/documents.rs
  27. +5 −5 editoast/src/views/electrical_profiles.rs
  28. +1 −1 editoast/src/views/infra/attached.rs
  29. +1 −1 editoast/src/views/infra/auto_fixes/mod.rs
  30. +1 −1 editoast/src/views/infra/delimited_area.rs
  31. +2 −2 editoast/src/views/infra/edition.rs
  32. +1 −1 editoast/src/views/infra/errors.rs
  33. +1 −1 editoast/src/views/infra/lines.rs
  34. +14 −14 editoast/src/views/infra/mod.rs
  35. +1 −1 editoast/src/views/infra/objects.rs
  36. +1 −1 editoast/src/views/infra/pathfinding.rs
  37. +2 −2 editoast/src/views/infra/railjson.rs
  38. +3 −3 editoast/src/views/infra/routes.rs
  39. +2 −2 editoast/src/views/layers.rs
  40. +9 −8 editoast/src/views/mod.rs
  41. +7 −1 editoast/src/views/pagination.rs
  42. +1 −1 editoast/src/views/path/pathfinding.rs
  43. +99 −98 editoast/src/views/path/projection.rs
  44. +6 −6 editoast/src/views/projects.rs
  45. +8 −8 editoast/src/views/rolling_stock.rs
  46. +3 −3 editoast/src/views/rolling_stock/light.rs
  47. +5 −5 editoast/src/views/rolling_stock/towed.rs
  48. +8 −5 editoast/src/views/scenario.rs
  49. +643 −0 editoast/src/views/scenario/macro_nodes.rs
  50. +1 −1 editoast/src/views/search.rs
  51. +1 −1 editoast/src/views/speed_limit_tags.rs
  52. +2 −2 editoast/src/views/sprites.rs
  53. +14 −12 editoast/src/views/stdcm_search_environment.rs
  54. +5 −5 editoast/src/views/study.rs
  55. +1 −1 editoast/src/views/temporary_speed_limits.rs
  56. +25 −9 editoast/src/views/test_app.rs
  57. +5 −5 editoast/src/views/timetable.rs
  58. +1 −1 editoast/src/views/timetable/stdcm.rs
  59. +7 −7 editoast/src/views/train_schedule.rs
  60. +1 −1 editoast/src/views/train_schedule/projection.rs
  61. +6 −6 editoast/src/views/work_schedules.rs
  62. +1 −0 front/.eslintrc
  63. +12 −12 front/package-lock.json
  64. +2 −2 front/package.json
  65. +5 −2 front/public/locales/en/errors.json
  66. +5 −6 front/public/locales/en/operationalStudies/importTrainSchedule.json
  67. +5 −2 front/public/locales/fr/errors.json
  68. +6 −7 front/public/locales/fr/operationalStudies/importTrainSchedule.json
  69. +1 −2 front/src/applications/editor/tools/rangeEdition/components/RangeEditionLeftPanel.tsx
  70. +2 −2 front/src/applications/editor/tools/rangeEdition/utils.ts
  71. +2 −2 front/src/applications/editor/tools/routeEdition/utils.ts
  72. +1 −5 front/src/applications/editor/tools/switchEdition/components/SwitchEditionLayers.tsx
  73. +227 −0 front/src/applications/operationalStudies/components/MacroEditor/MacroEditorState.ts
  74. +72 −11 front/src/applications/operationalStudies/components/MacroEditor/ngeToOsrd.ts
  75. +0 −57 front/src/applications/operationalStudies/components/MacroEditor/nodeStore.ts
  76. +314 −286 front/src/applications/operationalStudies/components/MacroEditor/osrdToNge.ts
  77. +133 −3 front/src/applications/operationalStudies/components/MacroEditor/utils.ts
  78. +15 −8 front/src/applications/operationalStudies/components/NGE/NGE.tsx
  79. +5 −8 front/src/applications/operationalStudies/components/Project/PictureUploader.tsx
  80. +36 −11 front/src/applications/operationalStudies/components/Scenario/ScenarioContent.tsx
  81. +7 −24 front/src/applications/operationalStudies/utils.ts
  82. +4 −1 front/src/applications/stdcm/hooks/useLinkedTrainSearch.ts
  83. +3 −3 front/src/applications/stdcm/hooks/useStdcm.ts
  84. +1 −1 front/src/applications/stdcm/hooks/useStdcmEnv.tsx
  85. +0 −1 front/src/applications/stdcm/types.ts
  86. +7 −11 front/src/applications/stdcm/utils/computeOpSchedules.ts
  87. +0 −1 front/src/applications/stdcm/utils/formatSimulationReportSheet.ts
  88. +0 −4 front/src/assets/rollingStock/freightRollingStocks.ts
  89. +9 −1 front/src/common/Map/Search/MapSearchSignal.tsx
  90. +5 −5 front/src/common/Map/WarpedMap/SimulationWarpedMap.tsx
  91. +2 −2 front/src/common/Map/WarpedMap/core/helpers.ts
  92. +1 −1 front/src/common/Map/WarpedMap/core/quadtree.ts
  93. +3 −3 front/src/common/Selector/Selector.tsx
  94. +120 −0 front/src/common/api/generatedEditoastApi.ts
  95. +0 −9 front/src/common/types.ts
  96. +4 −54 front/src/common/uploadFileModal.tsx
  97. +1 −1 front/src/index.tsx
  98. +0 −75 front/src/modules/pathfinding/components/Itinerary/DisplayItinerary/ViaStopDurationSelector.tsx
  99. +1 −14 front/src/modules/pathfinding/components/Itinerary/DisplayItinerary/Vias.tsx
  100. +2 −9 front/src/modules/pathfinding/components/Itinerary/Itinerary.tsx
  101. +12 −2 front/src/modules/pathfinding/hooks/usePathfinding.ts
  102. +8 −1 front/src/modules/project/styles/_addOrEditProjectModal.scss
  103. +2 −4 front/src/modules/rollingStock/helpers/utils.ts
  104. +1 −1 front/src/modules/simulationResult/SimulationResultExport/SimulationResultsExport.tsx
  105. +1 −0 front/src/modules/simulationResult/components/ChartHelpers/ChartHelpers.ts
  106. +1 −1 front/src/modules/study/components/AddOrEditStudyModal.tsx
  107. +1 −1 front/src/modules/timesStops/consts.ts
  108. +29 −13 front/src/modules/trainschedule/components/ImportTrainSchedule/ImportTrainScheduleConfig.tsx
  109. +4 −4 front/src/modules/trainschedule/components/ImportTrainSchedule/ImportTrainScheduleTrainsList.tsx
  110. +5 −12 front/src/modules/trainschedule/components/ManageTrainSchedule/AddTrainScheduleButton.tsx
  111. +18 −32 ...le/components/ManageTrainSchedule/ManageTrainScheduleMap/{RenderPopup.tsx → AddPathStepPopup.tsx}
  112. +2 −4 front/src/modules/trainschedule/components/ManageTrainSchedule/ManageTrainScheduleMap/setPointIti.ts
  113. +21 −26 front/src/modules/trainschedule/components/ManageTrainSchedule/Map.tsx
  114. +5 −5 front/src/modules/trainschedule/components/ManageTrainSchedule/TrainSettings.tsx
  115. +3 −3 front/src/modules/trainschedule/components/ManageTrainSchedule/helpers/checkCurrentConfig.ts
  116. +2 −2 front/src/modules/trainschedule/components/ManageTrainSchedule/helpers/formatTrainSchedulePayload.ts
  117. +77 −48 front/src/modules/trainschedule/components/ManageTrainSchedule/helpers/handleParseFiles.ts
  118. +3 −2 front/src/modules/trainschedule/components/ManageTrainSchedule/hooks/useUpdateTrainSchedule.ts
  119. +3 −2 front/src/modules/trainschedule/components/ManageTrainSchedule/types.ts
  120. +1 −1 front/src/modules/trainschedule/components/Timetable/types.ts
  121. +17 −9 front/src/reducers/index.ts
  122. +4 −3 front/src/reducers/osrdconf/helpers.ts
  123. +2 −3 front/src/reducers/osrdconf/operationalStudiesConf/index.ts
  124. +1 −2 front/src/reducers/osrdconf/operationalStudiesConf/operationalStudiesConfReducer.spec.ts
  125. +6 −3 front/src/reducers/osrdconf/operationalStudiesConf/powerRestrictionReducer.ts
  126. +7 −3 front/src/reducers/osrdconf/operationalStudiesConf/selectors.ts
  127. +1 −30 front/src/reducers/osrdconf/osrdConfCommon/__tests__/commonConfBuilder.ts
  128. +1 −31 front/src/reducers/osrdconf/osrdConfCommon/__tests__/utils.ts
  129. +2 −30 front/src/reducers/osrdconf/osrdConfCommon/index.ts
  130. +2 −8 front/src/reducers/osrdconf/osrdConfCommon/selectors.ts
  131. +7 −2 front/src/reducers/osrdconf/stdcmConf/selectors.ts
  132. +6 −8 front/src/reducers/osrdconf/types.ts
  133. +1 −1 front/src/test-data/geojson.ts
  134. +15 −15 front/src/utils/__tests__/date.spec.ts
  135. +14 −16 front/src/utils/date.ts
  136. +1 −1 front/src/utils/timeManipulation.ts
  137. +91 −15 front/tests/006-stdcm.spec.ts
  138. +3 −3 front/tests/008-train-schedule.spec.ts
  139. +19 −0 front/tests/assets/stdcm/towedRollingStock/towedRollingStock.json
  140. +32 −0 front/tests/assets/stdcm/towedRollingStock/towedRollingStockTableResult.json
  141. +3 −2 front/tests/global-setup.ts
  142. +8 −7 front/tests/global-teardown.ts
  143. +208 −58 front/tests/pages/stdcm-page-model.ts
  144. +2 −2 front/tests/test-logger.ts
  145. +50 −3 front/tests/utils/api-setup.ts
  146. +17 −3 front/tests/utils/index.ts
  147. +7 −5 front/tests/utils/setup-utils.ts
  148. +6 −5 front/tests/utils/teardown-utils.ts
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@ internal constructor(
*/
fun makeAllEdges(): Collection<STDCMEdge> {
return try {
if (getEnvelope() == null || hasDuplicateBlocks()) {
if (getEnvelope() == null) {
listOf()
} else {
val delays = getDelaysPerOpening()
@@ -217,17 +217,6 @@ internal constructor(
return if (res == null || graph.delayManager.isRunTimeTooLong(res)) null else res
}

/** Returns true if the current block is already present in the path to this edge */
private fun hasDuplicateBlocks(): Boolean {
var node = prevNode
while (true) {
val prevEdge = node.previousEdge ?: return false
if (!prevEdge.endAtStop && prevEdge.block == infraExplorer.getCurrentBlock())
return true
node = prevEdge.previousNode
}
}

companion object {
fun fromNode(
graph: STDCMGraph,
Loading