From 140c0e6756338f4a85c0d6bfce719bc9910efb66 Mon Sep 17 00:00:00 2001 From: mority Date: Fri, 13 Dec 2024 12:58:21 +0100 Subject: [PATCH] set days to iterate to 2 --- include/nigiri/routing/raptor/raptor.h | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/include/nigiri/routing/raptor/raptor.h b/include/nigiri/routing/raptor/raptor.h index 82510859..5bb9cd1b 100644 --- a/include/nigiri/routing/raptor/raptor.h +++ b/include/nigiri/routing/raptor/raptor.h @@ -1007,10 +1007,6 @@ struct raptor { location_idx_t const l) { ++stats_.n_earliest_trip_calls_; - auto const n_days_to_iterate = std::min( - kMaxTravelTime.count() / 1440 + 1, - kFwd ? n_days_ - as_int(day_at_stop) : as_int(day_at_stop) + 1); - auto const event_times = tt_.event_times_at_stop( r, stop_idx, kFwd ? event_type::kDep : event_type::kArr); @@ -1026,14 +1022,13 @@ struct raptor { auto const l_idx = stop{tt_.route_location_seq_[r][stop_idx]}.location_idx(); - trace( - "┊ │k={} et: current_best_at_stop={}, stop_idx={}, location={}, " - "n_days_to_iterate={}\n", - k, tt_.to_unixtime(day_at_stop, mam_at_stop), stop_idx, - location{tt_, l_idx}, n_days_to_iterate); + trace("┊ │k={} et: current_best_at_stop={}, stop_idx={}, location={}\n", + k, tt_.to_unixtime(day_at_stop, mam_at_stop), stop_idx, + location{tt_, l_idx}); #endif - for (auto i = day_idx_t::value_t{0U}; i != n_days_to_iterate; ++i) { + constexpr auto const kNDaysToIterate = day_idx_t::value_t{2U}; + for (auto i = day_idx_t::value_t{0U}; i != kNDaysToIterate; ++i) { auto const ev_time_range = it_range{i == 0U ? seek_first_day() : get_begin_it(event_times), get_end_it(event_times)};