Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sagemathgh-37181: Fix subtour elimination constraints in
longest_cycle
An issue has been raised (see sagemath#37028 (comment)) on the formulation used to find the longest (induced) cycle. This was due to the subtour elimination constraints that were not correct. We change these constraints to fix this issue. The new constraints force to use edges from the boundary of a subtour only when a vertex of that subtour is selected. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#37181 Reported by: David Coudert Reviewer(s): Travis Scrimshaw
- Loading branch information