diff --git a/.pkg b/.pkg index 40b362aefe..855af77945 100644 --- a/.pkg +++ b/.pkg @@ -77,7 +77,7 @@ [utl] url=git@github.com:motis-project/utl.git branch=master - commit=711afd25f2242ad9f750a5283b810582af41e9e2 + commit=24d9b12d579898be088ea5a75a4ff35e81079728 [guess] url=git@github.com:motis-project/guess.git branch=master @@ -96,8 +96,8 @@ commit=8bfc669e6ffd5800ed47144cf59c15b3e752ba10 [nigiri] url=git@github.com:motis-project/nigiri.git - branch=wip - commit=130c30538dd753886ff4cc10cdcb308606fa70fd + branch=interval + commit=ddbaa94bf90ca97bfca13b162c64f9a53456b9cb [osmium] url=git@github.com:motis-project/libosmium.git branch=master diff --git a/.pkg.lock b/.pkg.lock index 6ff3f3bc81..f4443ae851 100644 --- a/.pkg.lock +++ b/.pkg.lock @@ -1,4 +1,4 @@ -15204145168404904756 +15024647137660108562 cista 6ab3056ab95cca74dfcdd5356a9d7898a8a28aed zlib d1c943390ba4f97aa2f50bedc629b6d29027fa0e boost ad6cbb38470efd74265715e0972cb5ae44527fb1 @@ -10,7 +10,7 @@ libosmium bc09725a4636d5036bfed30de2db0764cdff2de9 protozero 8c9f3fa97c2cfdceef86d0b61818ae98e9328f29 Catch2 47d56f28a9801911c048d011b375e5631dbb658f fmt c68ab4be8f3cb0e5c6eb181b3f419622e15e02bd -utl 0be21a91d96f27f2de4583eb5badfd1c873e3f6c +utl 24d9b12d579898be088ea5a75a4ff35e81079728 address-typeahead b6b5e60faac2921f1c0b3813da9c11731a3ca31d conf 71febe940c0715ea69aa0c9980e08d31c5c946b8 context 797dd16e2b5e959997ddcd5bdeac4f80931169b6 @@ -26,7 +26,7 @@ miniz 1edbdece9d71dc65c6ff405572ee37cbdcef7af4 libressl 502ef24e637b026290d641528c4fa82267033d36 net e9996f1df2375240e7402dc471e2a1746312ef58 wyhash 1e012b57fc2227a9e583a57e2eacb3da99816d99 -nigiri 130c30538dd753886ff4cc10cdcb308606fa70fd +nigiri ddbaa94bf90ca97bfca13b162c64f9a53456b9cb lua 7bb93325b26f84c7e8b51fcbd857361ce7605a1d luabind 9223568bbcf818ecfb1001d49f567627ee10852a tbb 2067af88257710d07253761655a802732a32496e diff --git a/modules/nigiri/src/routing.cc b/modules/nigiri/src/routing.cc index 5985e42059..6d04d8ccd0 100644 --- a/modules/nigiri/src/routing.cc +++ b/modules/nigiri/src/routing.cc @@ -132,19 +132,21 @@ motis::module::msg_ptr route(std::vector const& tags, using motis::routing::RoutingRequest; auto const req = motis_content(RoutingRequest, msg); + auto min_connection_count = static_cast(0U); + auto extend_interval_earlier = false; + auto extend_interval_later = false; auto start_time = n::routing::start_time_t{}; auto start_station = n::location_idx_t::invalid(); if (req->start_type() == routing::Start_PretripStart) { auto const start = reinterpret_cast(req->start()); - utl::verify(start->min_connection_count() == 0U && - !start->extend_interval_earlier() && - !start->extend_interval_later(), - "nigiri currently does not support interval extension"); start_time = n::interval{ to_nigiri_unixtime(start->interval()->begin()), to_nigiri_unixtime(start->interval()->end()) + std::chrono::minutes{1}}; start_station = get_location_idx(tags, tt, start->station()->id()->str()); + min_connection_count = start->min_connection_count(); + extend_interval_earlier = start->extend_interval_earlier(); + extend_interval_later = start->extend_interval_later(); } else if (req->start_type() == routing::Start_OntripStationStart) { auto const start = reinterpret_cast(req->start()); @@ -251,9 +253,9 @@ motis::module::msg_ptr route(std::vector const& tags, .via_destinations_ = {}, .allowed_classes_ = cista::bitset::max(), .max_transfers_ = n::routing::kMaxTransfers, - .min_connection_count_ = 0U, - .extend_interval_earlier_ = false, - .extend_interval_later_ = false}; + .min_connection_count_ = min_connection_count, + .extend_interval_earlier_ = extend_interval_earlier, + .extend_interval_later_ = extend_interval_later}; utl::verify(!q.start_.empty(), "no start edges"); utl::verify(!q.destinations_[0].empty(), "no destination edges");