Skip to content

Commit

Permalink
core: add flag for train stops on stop signals
Browse files Browse the repository at this point in the history
  • Loading branch information
eckter authored and flomonster committed Apr 25, 2024
1 parent 3a83ec2 commit 9e125cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class SimulationScheduleItem(
@Json(name = "path_offset") val pathOffset: Offset<Path>,
val arrival: TimeDelta?,
@Json(name = "stop_for") val stopFor: Duration?,
@Json(name = "on_stop_signal") val onStopSignal: Boolean?,
)

sealed class MarginValue {
Expand Down
2 changes: 2 additions & 0 deletions editoast/src/core/v2/simulation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ pub struct SimulationScheduleItem {
pub arrival: Option<u64>,
/// Duration of the stop in ms
pub stop_for: Option<u64>,
/// Whether the next signal is expected to be blocking while stopping
pub on_stop_signal: Option<bool>,
}

#[derive(Debug, Serialize, Hash)]
Expand Down
1 change: 1 addition & 0 deletions editoast/src/views/v2/train_schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ async fn build_simulation_request(
.stop_for
.as_ref()
.map(|t| t.num_milliseconds() as u64),
on_stop_signal: None,
})
.collect();

Expand Down

0 comments on commit 9e125cc

Please sign in to comment.