Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Mar 22, 2023
1 parent 4d61fbb commit 96fec96
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .pkg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .pkg.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
15204145168404904756
15024647137660108562
cista 6ab3056ab95cca74dfcdd5356a9d7898a8a28aed
zlib d1c943390ba4f97aa2f50bedc629b6d29027fa0e
boost ad6cbb38470efd74265715e0972cb5ae44527fb1
Expand All @@ -10,7 +10,7 @@ libosmium bc09725a4636d5036bfed30de2db0764cdff2de9
protozero 8c9f3fa97c2cfdceef86d0b61818ae98e9328f29
Catch2 47d56f28a9801911c048d011b375e5631dbb658f
fmt c68ab4be8f3cb0e5c6eb181b3f419622e15e02bd
utl 0be21a91d96f27f2de4583eb5badfd1c873e3f6c
utl 24d9b12d579898be088ea5a75a4ff35e81079728
address-typeahead b6b5e60faac2921f1c0b3813da9c11731a3ca31d
conf 71febe940c0715ea69aa0c9980e08d31c5c946b8
context 797dd16e2b5e959997ddcd5bdeac4f80931169b6
Expand All @@ -26,7 +26,7 @@ miniz 1edbdece9d71dc65c6ff405572ee37cbdcef7af4
libressl 502ef24e637b026290d641528c4fa82267033d36
net e9996f1df2375240e7402dc471e2a1746312ef58
wyhash 1e012b57fc2227a9e583a57e2eacb3da99816d99
nigiri 130c30538dd753886ff4cc10cdcb308606fa70fd
nigiri ddbaa94bf90ca97bfca13b162c64f9a53456b9cb
lua 7bb93325b26f84c7e8b51fcbd857361ce7605a1d
luabind 9223568bbcf818ecfb1001d49f567627ee10852a
tbb 2067af88257710d07253761655a802732a32496e
Expand Down
16 changes: 9 additions & 7 deletions modules/nigiri/src/routing.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,19 +132,21 @@ motis::module::msg_ptr route(std::vector<std::string> const& tags,
using motis::routing::RoutingRequest;
auto const req = motis_content(RoutingRequest, msg);

auto min_connection_count = static_cast<std::uint8_t>(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<routing::PretripStart const*>(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<n::unixtime_t>{
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<routing::OntripStationStart const*>(req->start());
Expand Down Expand Up @@ -251,9 +253,9 @@ motis::module::msg_ptr route(std::vector<std::string> const& tags,
.via_destinations_ = {},
.allowed_classes_ = cista::bitset<n::kNumClasses>::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");
Expand Down

0 comments on commit 96fec96

Please # to comment.