Closed Theorell closed 3 years ago
Hi
Thanks for the report. I think the problem might be that you set the lower bound of variables using lb=-np.inf
in line 4 of gurobi_solve
. Could you try changing it to lb=None
?
Can confirm that it works well with lb=None. That is the output I get with GLPK:
Scaling...
A: min|aij| = 1.000e+00 max|aij| = 1.000e+00 ratio = 1.000e+00
Problem data seem to be well scaled
does not crash
crashes before this print if backend is glpk
Yes, it works for me too, thanks! Maybe it would be helpful with a warning or a check for this, since it crashes without stack trace.
Problem description
I'm trying to calculate the chebyshev center of a polytope using optlang with the backends gurobi and glpk. In an effort to find the problem, I have created a minimal example which first finds the minimum of a 2d square (works with both backends) and then extends the problem to find the center of the same square (fails for glpk but not gurobi).
It is of course possibly that this is a general glpk problem, however, that is hard for me to believe, since it fails already for a very trivial example which glpk should be able to solve. Instead, I believe that the problem lies in how the problem is served to glpk.
Code Sample
Context