Skip to content

Commit

Permalink
core: stdcm: add comment to clarify earliest conflict operation
Browse files Browse the repository at this point in the history
Signed-off-by: Eloi Charpentier <[email protected]>
  • Loading branch information
eckter committed Feb 4, 2025
1 parent 60e6a3f commit 518a61f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/src/main/kotlin/fr/sncf/osrd/stdcm/graph/TimeData.kt
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,13 @@ data class TimeData(
val nextEarliestReachableTime =
earliestReachableTime + extraTravelTime + (extraStopTime ?: 0.0)
var timeOfNextConflict = timeOfNextConflictAtLocation
if (maxAdditionalStopTime != null)
if (maxAdditionalStopTime != null) {
// We could have added a `min(timeOfNextConflict, ...)`,
// but we're specifically not interested in what happens before
// the stop. Engineering margins and other delay constraints
// would stop at the stop and ignore anything before.
timeOfNextConflict = nextEarliestReachableTime + maxAdditionalStopTime
}
if (extraStopTime != null) {
val stopDataCopy = newStopData.toMutableList()
stopDataCopy.add(
Expand Down

0 comments on commit 518a61f

Please sign in to comment.