You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
solve_tsp_record_to_record reachers Infinite loop with a simple example #53
@yang-tsao@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.
Activity
fillipe-gsm commentedon Apr 5, 2024
Hey, @yang-tsao , thanks for reporting it.
The bug actually happens in the
solve_tsp_lin_kernighansolver, which the Record to Record uses as internal solver.I opened a draft pull request with a test replicating the problem, and I'll leave the fix for @luanleonardo.
Since this is a veeery corner case (a TSP with only two nodes), if he cannot take it I'll just put an early return.
luanleonardo commentedon Apr 8, 2024
@yang-tsao @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.Attempt to handle Issue #53 (#54)
fillipe-gsm commentedon Jul 12, 2024
Sorry for the long delay, but the issue should be fixed now in version 0.4.2.
Thanks for reporting it.