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

Different solutions with same indicators #1199

Closed
jcoupey opened this issue Dec 10, 2024 · 1 comment · Fixed by #1205
Closed

Different solutions with same indicators #1199

jcoupey opened this issue Dec 10, 2024 · 1 comment · Fixed by #1205

Comments

@jcoupey
Copy link
Collaborator

jcoupey commented Dec 10, 2024

While working on #1196, I've come across situations where two different heuristic solutions have exactly the same indicators.

Example on instance X-n251-k28 from the CVRP benchmarks:

basic_none_0 3_heuristic_sol_bbox

basic_higher_amount_0 3_heuristic_sol_bbox

Of course this is related to the fact that those benchmarks use euclidean distances with rounding and this is much less prone to happen with real-life instances: it would require different solutions with "real" indicators to be equal to the second and meter.

Yet the consequence is that in this situation one of the solution "shadows" the other and one of the local search phase is skipped, potentially resulting in a different overall solution. This was already a thing before but used to be deterministic since the deduplication was done from heuristic solutions stored in a std::vector. After #1196, this is now depending on which heuristic solution we get first., resulting in different solutions across runs in those edge cases.

@jcoupey
Copy link
Collaborator Author

jcoupey commented Dec 10, 2024

A way to prevent this would be to adjust SolutionIndicators::operator== to catch more differences. This is not trivial in general since we can't just "compare routes": we do not want to tag identical solutions as different simply because they have the same routes shuffled across vehicles.

In order to get a reasonably more robust filtering, we could maybe add more precision to the solutions indicators by storing (a hash based on) the ordered sizes of all routes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant