Skip to content

Commit

Permalink
fix skip cancellations (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling authored Mar 8, 2024
1 parent 3c24b9f commit 8455e30
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .pkg
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
[utl]
[email protected]:motis-project/utl.git
branch=master
commit=4e0e1eb2be611da3e286a306317737071aaf92be
commit=84347b2ef7105ec3106f5ff2a6aeca4c98eea5e2
[guess]
[email protected]:motis-project/guess.git
branch=master
Expand Down
8 changes: 4 additions & 4 deletions .pkg.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
15732894559123610447
351090015702025831
cista f67b3bf31342e0685ec26c510f52328ceff8ff23
zlib fe8e13ffca867612951bc6baf114e5ac8b00f305
boost 2db0acc02ea3f3775d1f8b48ba6c10f58dd6fcc9
Expand All @@ -10,13 +10,13 @@ libosmium 6e6d6b3081cc8bdf25dda89730e25c36eb995516
protozero 8c9f3fa97c2cfdceef86d0b61818ae98e9328f29
Catch2 47d56f28a9801911c048d011b375e5631dbb658f
fmt edb385ac526c24bc917ec4a41bb0edb28f0ca59e
utl 4e0e1eb2be611da3e286a306317737071aaf92be
utl 84347b2ef7105ec3106f5ff2a6aeca4c98eea5e2
address-typeahead b6b5e60faac2921f1c0b3813da9c11731a3ca31d
conf 3aca4248da3f67d2a31ccce358ad9ee6102ab539
context 797dd16e2b5e959997ddcd5bdeac4f80931169b6
ctx d514aa0b0001596b0317abaa17a5a689dc601a55
res 7d97784ba785ce8a2677ea77164040fde484fb04
date 26d109612ddb8ba331edba7619a6452667f842bb
date 2d2c46a39bbf582dc663be1af926b4d58b2e0c9a
flatbuffers a2028f13ae6aafe855010b43a0c93f86e04d9717
doctest 70e8f76437b76dd5e9c0a2eb9b907df190ab71a0
geo 03bee0de6cbcbf34a3445bdb19ab90b07a67e9df
Expand All @@ -29,7 +29,7 @@ abseil-cpp f2b3825f36e37fddd47c5c395096e9b1e99eca12
protobuf 690e03babf0963d3da9615a2dae0891777842719
unordered_dense 4f380fb1d64f1843ca2c993ed39a8342a8747e5d
wyhash 1e012b57fc2227a9e583a57e2eacb3da99816d99
nigiri 81454cae418d3b504f609aef8c58e4b2a8ad3bd9
nigiri 7f0c17b2d363a400cfad191795fb543d7b28b68f
LuaJIT babeae2c3311bed245ee86f3e35a1f244e3da60b
luabind b5d39b6f7511930115964304a423f0e6336e0eb2
tbb b3011be5060ec1be43c76d4a8cc80d5550adb31d
Expand Down
22 changes: 14 additions & 8 deletions modules/nigiri/src/railviz.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,15 @@ struct rt_transport_geo_index {
}

std::vector<n::rt_transport_idx_t> get_rt_transports(
geo::box const& b) const {
n::rt_timetable const& rtt, geo::box const& b) const {
std::vector<n::rt_transport_idx_t> rt_transports;
rtree_.query(bgi::intersects(b), boost::make_function_output_iterator(
[&](rt_transport_box const& v) {
rt_transports.emplace_back(v.second);
}));
rtree_.query(
bgi::intersects(b),
boost::make_function_output_iterator([&](rt_transport_box const& v) {
if (!rtt.rt_transport_is_cancelled_[to_idx(v.second)]) {
rt_transports.emplace_back(v.second);
}
}));
return rt_transports;
}

Expand Down Expand Up @@ -181,9 +184,12 @@ struct railviz::impl {
continue;
}

for (auto const& rt_t : rt_geo_indices_[c].get_rt_transports(area)) {
if (path::should_display(sc, zoom_level, rt_distances_[rt_t])) {
add_rt_transports(rt_t, time_interval, area, runs);
if (rtt_ != nullptr) {
for (auto const& rt_t :
rt_geo_indices_[c].get_rt_transports(*rtt_, area)) {
if (path::should_display(sc, zoom_level, rt_distances_[rt_t])) {
add_rt_transports(rt_t, time_interval, area, runs);
}
}
}

Expand Down

0 comments on commit 8455e30

Please sign in to comment.