-
Notifications
You must be signed in to change notification settings - Fork 4
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
Improves value function performance #42
Improves value function performance #42
Conversation
hasTravelDistance := solutionStop.Previous().ModelStop().Location().IsValid() && | ||
solutionStop.ModelStop().Location().IsValid() | ||
if data, ok := solutionStop.Vehicle().ModelVehicle().VehicleType().Data().(vehicleTypeData); ok && hasTravelDistance { |
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.
This is the fix for the removed nil
and IsValid
checks (value funcs).
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.
@merschformann this PR will make the code also faster likely
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.
Should we wait on that one? Is it close?
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 is done but has not been benchmarked on larger instances yet
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 can quickly do that in our current experiments. I will also run a larger one anyway and will include it there as well. 👍
Give me some time.
Description
Fixes a performance regression that surfaces under particular circumstances that was caused by extra checks in the value function and the new (more generic) stop generation logic.
Changes
factory/format.go
.