Skip to content

Commit

Permalink
Set upper limit for calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKutzner committed Nov 21, 2024
1 parent 35f64c3 commit 09340f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/nigiri/routing/search.h
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,9 @@ struct search {
}

auto const worst_time_at_dest =
start_time +
(kFwd ? 1 : -1) * std::min(fastest_direct_, kMaxTravelTime);
start_time + (kFwd ? 1 : -1) *
(std::min(fastest_direct_, q_.max_travel_time_) +
duration_t{1});
algo_.execute(start_time, q_.max_transfers_, worst_time_at_dest,
q_.prf_idx_, state_.results_);

Expand Down

0 comments on commit 09340f7

Please sign in to comment.