Repository navigation
feat: let a nearby distance meter declare several distance matrices - #2842
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
6a0f7ed to
bb0c9d7
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
… distance examples
A meter can count its distance matrices from the dataset, for example from the transport types of its vehicles. The solver calls the method once when solving starts, and again after each problem change.
NearbyDistanceMeter keeps only its distance method. A meter with several distance matrices implements the new MatrixAwareNearbyDistanceMeter. Its entry point, initializeDistanceMatrices(Solution_), is called once each time solving starts and may create state. The docs show the plain meter first and the matrices in their own section.
Also align the nearby Javadoc and the upgrade note with the behavior: moved item and neighbor wording, A/B naming, and the changes that apply to every meter.
3d3bf75 to
ba5497f
Compare
Stacked on #2841. Until #2841 merges, this PR also shows its commits.
Review only the 7 commits from "feat: let a nearby distance meter declare several distance matrices" onwards.
NearbyDistanceMetergets default methods for several distance matrices:getDistanceMatrixCount(),getDistanceMatrixIndex(neighbor)andgetNearbyDistance(moved, neighbor, matrix).Existing meters compile and work without changes.
and the upgrade note "Nearby selection ranks moves by the trips they create".