Skip to content

Commit

Permalink
rsl: early departure tolerance fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pablohoch committed Oct 31, 2023
1 parent ce2ff7d commit b3edab3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/paxmon/src/rt_updates.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ void check_broken_interchanges(
auto const to = ice->to(uv);
auto const ic = static_cast<int>(to->current_time()) -
static_cast<int>(from->current_time());
auto const early_departure = static_cast<int>(to->schedule_time()) -
static_cast<int>(to->current_time());
auto const early_departure = to->current_time() < to->schedule_time()
? static_cast<int>(to->schedule_time()) -
static_cast<int>(to->current_time())
: 0;
if (ice->is_canceled(uv) ||
(from->station_ != 0 && to->station_ != 0 &&
ic < ice->transfer_time()) ||
(from->station_ == 0 &&
early_departure <= uv.early_departure_tolerance_)) {
early_departure > uv.early_departure_tolerance_)) {
if (ice->broken_) {
continue;
}
Expand Down

0 comments on commit b3edab3

Please sign in to comment.