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

Attempt to handle Issue #53 #54

Conversation

fillipe-gsm
Copy link
Owner

One of the inner Lin Kernighan loops gets hanged forever when the incoming distance matrix has only two nodes.

This seems to happen regardless of the matrix being symmetric or asymmetric.

In this pull request I setup a test that should pass once the bug has been solved.

I leave the rest to @luanleonardo to handle it properly.

Copy link
Collaborator

@luanleonardo luanleonardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: @fillipe-gsm, the Lin-Kernighan heuristic assumes the existence of at least 4 nodes (named a, b, c, d) that play important roles in defining the neighborhood of a solution. If the problem is small, with less than 4 nodes, the heuristic does not apply. In this case, it is preferable to solve the problem using brute force.

I committed this suggestion, what do you think? If it's ok for you, I suggest merging the PR.

@fillipe-gsm fillipe-gsm merged commit 4416f56 into master Apr 8, 2024
4 checks passed
@fillipe-gsm
Copy link
Owner Author

I cannot approve the PR since I was the one who opened it (I just realized it now 🦆 ).

Thanks for the help, @luanleonardo , I'll merge it the way it is.

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

Successfully merging this pull request may close these issues.

2 participants