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
Fractional Chromatic Index test fails with GLPK #23798
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:3
I suspect that we need to change I don't have access to a 32-bit machine and so cannot test. |
comment:4
You could also forbid using a non-exact solver for this problem. |
comment:5
Sure, we can force
I agree that using a tolerance gap is not a nice solution either. |
comment:6
I don't see better solution than making New commits:
|
Commit: |
Author: David Coudert |
Branch: u/dcoudert/23798 |
comment:7
"Be aware that this method may loop endlessly when using some non exact solvers on 32-bits". I doubt that this is problem specific to 32 bits. The wording seems to imply that it's safe to use non-exact solvers on 64-bit machines. |
comment:8
Also, this isn't quite correct:
followed by a test with GLPK. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:10
Is this more appropriate ? |
comment:11
Well, it depends. Do you consider the code here to be a fix or a workaround? I am asking because you need to decide what to do with
You cannot say that this ticket is a known bug while at the same time fixing this ticket. |
comment:13
The problem is not fixed. That's why I changed the text to |
Changed commit from |
This comment has been minimized.
This comment has been minimized.
comment:27
Following above discussion, I added a tolerance gap for numerical LP solvers. Note that we can use the New commits:
|
comment:28
I don’t like this approach. Without explicit guarantees that these tolerances are correct, it is replacing correct algorithms with heuristics. |
comment:29
This line also needs changing because the test "== 1" is not robust. |
comment:30
I don’t see how one can make the oracle (the inner LP) inexact, without potentially returning a very wrong answer. The oracle checks that there is no maximum weight matching of weight >1. Say, we let it error by epsilon, i.e we terminate with oracle returning 1+epsilon. Potentially, there could be K maximum matchings with this weight, if they are disjoint this means that the final error is K times epsilon, oops… |
Reviewer: Dima Pasechnik |
comment:32
I don't like this solution either but I don't know what to do when a solver returns 0.99999... instead of 1 although we have set the variable type to binary. The solvers are aware of the type of the variable and so should return a value with the correct type and not a double. The solution might be in the backends. |
comment:33
Replying to @dcoudert:
No, my point is that without a special analysis it's not possible to argue that solving the oracle problem (with non-integer objective function) inexactly provides a correct result, even if you "correctly" round 0.9999... to 1. It's because a small oracle error may get amplified a lot in the main LP. |
comment:34
Replying to @dcoudert:
The oracle implementation here is naive, and bound to get very slow; it's integer LP without Edmonds' constraints,
|
comment:35
I took a quick look at the function now. I would suggest the following changes:
|
comment:36
Actually, it seems that even with PPL, the code is just wrong, as PPL does not do MILP, it only does LP, right? |
comment:37
The PPL does have a (very limited) MIP solver. |
comment:40
I tried the ideas from #comment:35. I have let some code for debugging as the code may loop forever when using We should search for another method not relying on LP solvers, if any... |
The test
added in
src/sage/graphs/graph.py
by #23658 fails with GLPK-4.63 on 32-bit.As a workaround, we use PPL by default in #24099.
CC: @dcoudert
Component: graph theory
Author: David Coudert
Branch/Commit: public/graphs/23798_fractional_chromatic_index @
43e8873
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/23798
The text was updated successfully, but these errors were encountered: