Skip to content

Commit

Permalink
fix raptor reconstruction (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
julianharbarth authored Nov 25, 2021
1 parent b3dd717 commit 9c5536c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions modules/raptor/include/motis/raptor/reconstructor.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,17 @@ struct intermediate_journey {
}
}

// We only have a single lcon_ptr array for the forward search,
// therefore we need to adjust the index
auto const& get_d_track = [&](auto&& lcon) {
if (transports_.empty() || transports_.back().is_walk()) {
return lcon->full_con_->d_track_;
} else {
return transports_.back().con_->full_con_->d_track_;
}
};

auto const lcon = raptor_sched.lcon_ptr_[stop_time_idx];
auto const a_track = lcon->full_con_->a_track_;
auto const d_track = transports_.empty()
? lcon->full_con_->d_track_
: transports_.back().con_->full_con_->d_track_;
auto const d_track = get_d_track(lcon);

if (!valid(a_time)) {
a_time = lcon->a_time_;
Expand Down

0 comments on commit 9c5536c

Please sign in to comment.