Skip to content
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

front: fix travel time >1h in OSRD → NGE conversion #9035

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

emersion
Copy link
Member

Multiple issues here:

  • Source or target "time" may be zero or null, zero means it's set but top of the hour, null means unset/unknown. We still want to compute the travel time if it's zero.
  • Travel "time" field doesn't need to be computed modulo 1h, because it's a duration, not an absolute time.
  • Travel "consecutiveTime" field needs to be populated as well.

Closes: #8862

@emersion emersion requested a review from a team as a code owner September 27, 2024 08:56
Copy link
Contributor

@louisgreiner louisgreiner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and it's working very well, thanks :)

For the code part, I still have some warning about linting

@emersion emersion force-pushed the emr/fix-nge-1h-travel branch 2 times, most recently from b28a16d to ccbf09a Compare September 27, 2024 09:26
@emersion
Copy link
Member Author

For the code part, I still have some warning about linting

Apologies, should be fixed now!

@emersion
Copy link
Member Author

Small cleanup to get rid of unnecessary null assertions after discussing with @sim51.

@sim51
Copy link
Contributor

sim51 commented Sep 27, 2024

good for me !

Copy link
Contributor

@SharglutDev SharglutDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm and tested

Multiple issues here:

- Source or target "time" may be zero or null, zero means it's
  set but top of the hour, null means unset/unknown. We still want
  to compute the travel time if it's zero.
- Travel "time" field doesn't need to be computed modulo 1h, because
  it's a duration, not an absolute time.
- Travel "consecutiveTime" field needs to be populated as well.

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: #8862
@emersion emersion added this pull request to the merge queue Oct 1, 2024
Merged via the queue into dev with commit 8b4265f Oct 1, 2024
24 checks passed
@emersion emersion deleted the emr/fix-nge-1h-travel branch October 1, 2024 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Travel times (consecutiveTime) not set properly when > 60'
4 participants