Add a perturbation step to the VNS engine #305

Merged
bustikiller merged 11 commits from vns-perturbations into main 2025-07-24 12:21:02 +00:00
Owner

The previous version of the VNS algorithm was focused on the local optimizations (swap and shift) but did not implement any perturbation.

In this PR, we are introducing a perturbation of variable size (1 to 3 guests randomly swapped to other tables) to visit other neighborhoods where the local optimum may be better than the best solution so far. Some values are hard-coded, and the engine probably needs some refactor to use a list of perturbations instead of knowing about Table::WheelSwap. Nevertheless, the benchmark rake task already shows significant benefits in using the perturbation local optimization VS not using it.

The previous version of the VNS algorithm was focused on the local optimizations (swap and shift) but did not implement any perturbation. In this PR, we are introducing a perturbation of variable size (1 to 3 guests randomly swapped to other tables) to visit other neighborhoods where the local optimum may be better than the best solution so far. Some values are hard-coded, and the engine probably needs some refactor to use a list of perturbations instead of knowing about `Table::WheelSwap`. Nevertheless, the benchmark rake task already shows significant benefits in using the perturbation local optimization VS not using it.
bustikiller added 9 commits 2025-07-24 11:45:07 +00:00
bustikiller added 1 commit 2025-07-24 11:45:20 +00:00
Merge branch 'main' into vns-perturbations
All checks were successful
Run unit tests / rubocop (pull_request) Successful in 1m4s
Run unit tests / check-licenses (pull_request) Successful in 1m28s
Run unit tests / copyright_notice (pull_request) Successful in 3m7s
Run unit tests / unit_tests (pull_request) Successful in 5m28s
Run unit tests / build-static-assets (pull_request) Successful in 30m6s
81f1e79b6d
bustikiller scheduled this pull request to auto merge when all checks succeed 2025-07-24 11:45:30 +00:00
bustikiller added 1 commit 2025-07-24 11:46:31 +00:00
Add copyright notice
All checks were successful
Run unit tests / rubocop (pull_request) Successful in 2m24s
Run unit tests / check-licenses (pull_request) Successful in 2m32s
Run unit tests / copyright_notice (pull_request) Successful in 2m56s
Run unit tests / unit_tests (pull_request) Successful in 5m22s
Run unit tests / build-static-assets (pull_request) Successful in 29m2s
3260b0b422
bustikiller merged commit 8662652e1a into main 2025-07-24 12:21:02 +00:00
Sign in to join this conversation.
No Reviewers
No Label
No Milestone
No project
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bustikiller/wedding-planner#305
No description provided.