Closed soehms closed 1 week ago
Documentation preview for this PR (built with commit f117a9d65161328f382bc96306973b5fa8c99d3e; changes) is ready! :tada: This preview will update shortly after each push to this PR.
Sorry for not seeing this before. I will try to review it in the next days.
As you mention, we first use integer programming to compute the number of bendings of the segments. I am surprised that a lack of checking the outer region has only caused problems in very few cases.
Looks good.
As a side comment for the future, I think it would be worth considering an approach that is based on this.
One minor comment though: I don't understand the rationale behind the "source" and "sink" naming that you use in the comments.
Looks good.
As a side comment for the future, I think it would be worth considering an approach that is based on this.
Sounds like a good idea!
One minor comment though: I don't understand the rationale behind the "source" and "sink" naming that you use in the comments.
I made another attempt in the current commit. I hope I have found a better wording for this.
Thanks for the review, @miguelmarco!
As suspected in https://github.com/sagemath/sage/issues/37587#issuecomment-2051141073 the issue can be fixed by adding the contraint for the exterior region.
In the differences of this branch just the lines below belong to the corresponding correction of the algorithm:
All other changes are intended to improve the readability of the code. To this end I change and introduce new variable names to make the origin of the ideas coming from the class OrthogonalLinkDiagram of Spherogram more explicit. Furthermore I make some codestyle fixes and change the sign of the capacity such that the sink appears to be positive and thus according to the usage in Spherogram and the literature cited there.
With this branch the knot reported in the issue is plotted like this:
New plot
To make comparison with other results more convenient I used different colours for the arcs. The corresponding result for
PPL
is this:New plot with
PPL
Without this branch the
PPL
version with colours has been this:Old plot with
PPL
The coloured wrong result has been this:
Old plot
Note, that this branch also changes other plot results in the documentation. For example:
Previously:
Old documentation
With this branch:
New documentation
:memo: Checklist
:hourglass: Dependencies