Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: stdcm: add a stop at the end to avoid signal propagation #10622

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import fr.sncf.osrd.graph.Pathfinding
import fr.sncf.osrd.graph.PathfindingEdgeLocationId
import fr.sncf.osrd.railjson.schema.common.graph.EdgeDirection
import fr.sncf.osrd.railjson.schema.rollingstock.Comfort
import fr.sncf.osrd.railjson.schema.schedule.RJSTrainStop
import fr.sncf.osrd.reporting.exceptions.ErrorType
import fr.sncf.osrd.reporting.exceptions.OSRDError
import fr.sncf.osrd.reporting.warnings.DiagnosticRecorderImpl
Expand Down Expand Up @@ -171,6 +172,16 @@ class STDCMEndpointV2(private val infraManager: InfraManager) : Take {
temporarySpeedLimitManager: TemporarySpeedLimitManager?,
comfort: Comfort,
): SimulationSuccess {
val scheduleItems = parseSimulationScheduleItems(path.stopResults).toMutableList()
// Add a short stop at the end to avoid signal propagation
scheduleItems.add(
SimulationScheduleItem(
Offset(path.trainPath.getLength()),
null,
0.1.seconds,
RJSTrainStop.RJSReceptionSignal.STOP
)
)
val reportTrain =
runScheduleMetadataExtractor(
path.envelope,
Expand All @@ -179,7 +190,7 @@ class STDCMEndpointV2(private val infraManager: InfraManager) : Take {
infra,
path.routePath.toIdxList(),
rollingStock,
parseSimulationScheduleItems(path.stopResults),
scheduleItems,
listOf(),
)

Expand Down
Loading