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

Exclude breaks from timeline that occur outside of the vehicle's day #63

Merged
merged 5 commits into from
May 8, 2023

Conversation

jmccollum-woolpert
Copy link
Contributor

Closes #56

.map(createBreakSegment)
.filter(
(brk) =>
brk.startTime.greaterThanOrEqual(vehicleStartTime) &&
Copy link
Contributor

@cmorabito-woolpert cmorabito-woolpert Mar 9, 2023

Choose a reason for hiding this comment

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

What would we expect the behavior to be if vehicleStartTime and/or vehicleEndTime are null? In those cases, this code would remove all break segments, which seems like it could the desired behavior (i.e. can't schedule a break if you didn't schedule start/end time). Mostly asking if it's valid to send a scenario to CFR that includes breaks without also setting vehicle start/end, in which case we'd want to filter differently.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this case, vehicleStartTime and vehicleEndTime are the start and end times of the route and aren't related to the vehicle time windows. May be worth renaming to clarify that, but the question still stands of whether or not a route would ever have a null start or end? I'd assume not, but need to double check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed vehicleStartTime and vehicleEndTime to routeStartTime and routeEndTime to make it clearer what we're checking against.

@cmorabito-woolpert cmorabito-woolpert merged commit b442faf into main May 8, 2023
6 checks passed
@cmorabito-woolpert cmorabito-woolpert deleted the bugfix-breaks-after-vehicle-end branch May 8, 2023 12:43
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.

Do not display breaks outside of vehicle [start, end].
2 participants