Skip to content

Refactor SolutionIndicators struct#755

Merged
jcoupey merged 13 commits intomasterfrom
enhancement/filter-solutions
Aug 4, 2022
Merged

Refactor SolutionIndicators struct#755
jcoupey merged 13 commits intomasterfrom
enhancement/filter-solutions

Conversation

@jcoupey
Copy link
Copy Markdown
Collaborator

@jcoupey jcoupey commented Aug 2, 2022

Issue

Fixes #750.

Tasks

  • Dedicated function to compute SolutionIndicators
  • Compare solutions beyond global indicators/cost
    - [x] Split the solving multithreading between heuristic and local search
    - [x] Remove "identical" solutions
  • Update CHANGELOG.md
  • review

@jcoupey
Copy link
Copy Markdown
Collaborator Author

jcoupey commented Aug 4, 2022

I've tried benchmarking the changes here and the difference is not noticeable because:

  • instances for which there are several similar heuristic solutions are mostly the easy/small ones so convergence is already super fast on those;
  • medium to big instances seldom have similar heuristic solutions, even with -x 5;
  • removing a couple local searches does not usually impact overall computing time in a context where multiple threads are used.

So I don't think it's actually worth adding this as is since:

  • it adds quite some boilerplate to the solving code in cvrp.cpp and vrptw.cpp, splitting the multi-threading part;
  • the current solution comparison based on global indicators can also "shadow" some solutions that look identical but for which actual routes are different; in some cases this actually cuts unwanted searches, sometimes leading to a slightly poorer overall solution.

@jcoupey jcoupey changed the title Filter heuristic solutions Refactor SolutionIndicators struct Aug 4, 2022
@jcoupey jcoupey merged commit d51ec04 into master Aug 4, 2022
@jcoupey jcoupey deleted the enhancement/filter-solutions branch August 30, 2022 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify SolutionIndicators logic

1 participant