-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[jormungandr] implement access_points in transfer path #3872
Conversation
a9a512b
to
74d0caa
Compare
source/jormungandr/jormungandr/scenarios/helper_classes/transfer.py
Outdated
Show resolved
Hide resolved
@@ -766,3 +777,34 @@ def complete_transfer(pt_journey, transfer_pool): | |||
if section.type != response_pb2.TRANSFER: | |||
continue | |||
transfer_pool.wait_and_complete(section) | |||
|
|||
|
|||
def prepend_first_and_append_last_coord(dp, origin, destination): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe split this function in two prepend_first_coord()
and append_last_coord()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And don't you already have the exact same function here ?
nb_coords = sum((len(sec.street_network.coordinates) for sec in dp.journeys[0].sections)) | ||
if nb_coords < 2: | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand this check. Maybe add some comments ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it just checks the length of the geojson
of the street network, there should be at least 2 points in a geojson
logically
Kudos, SonarCloud Quality Gate passed! |
With this PR. transfer paths are allowed between surface transport vehicles (
tramway
,bus
etc...) and underground transport vehicles (metro
etc...) via access points.Note that :
How the access point (if multiple access points are present for the underlying stop point) is picked in a nutshell:
Let's say we need to calculate the path from
stop_point:Tramway
tostop_point: Metro
, given thatstop_point: Metro
has 3 access points around it. The first step is to choose the eligible access points by requesting thegeoref
all the access points ofstop_point:Metro
and filtering out those areis_entrance == False
. Then we compute a matrix of1xN
(reciprocallyNx1
when transferring fromstop_point:Metro
tostop_point:Tramway
). By adding up thetraversal_time
of each access points to the street network duration, we pick the most rapid access point to get tostop_point:Metro
. Then we launch the real street network computation betweenstop_point:Tramway
and the chosen access point.In the following example, the blue line (underground transport) has multiple access points,

but we finally chose the best/most rapid access point to get to the platform
