Open makansij opened 1 year ago
I've discovered that GLPK does not tell the user if the initial point is infeasible. Using the example above:
pe.value(m.c8.expr)
>>>> False
However, this still doesn't explain why it cannot find the optimal solution when using all 0's for the initial value of L
?
I do know however, that GLPK
would tell me if the problem were unbounded, since when constraints c1
and c2
are removed, it reports "unbounded".
It seems as if glpk also requires that there be no free variables in the optimization. In the example above m.L[1,0] + m.L[1,1] + m.L[1,2] + m.l[1]
is unbounded below. Even though it doesn't play a role in the objective function, since it is unconstrained, glpk returns status other
.
Summary
I’m using Pyomo + GLPK to solve an LP involving 2 variables. There are 2 aspects of GLPK’s behavior for this simple problem which puzzle me:
It does not give a certificate of optimality. The termination status is “other”, and it doesn’t give an upper and lower bound as it does for other linear problems, for example, any of the problems in this workbook: https://jckantor.github.io/CBE30338/06.04-Linear-Production-Model-in-Pyomo.html
Secondly, by providing a different initial value for the decision variable, I’m able to achieve a lower objective function value than is found by GLPK. Simply change the initial value of
L
to be0
instead of1
. This probably is related to the fact that there’s no certificate of optimality.Below is a minimal example to reproduce this behavior.
Steps to reproduce the issue
Output
Maybe I’m missing something, but I’m not able to find anything about status "other" on the website: https://www.gnu.org/software/glpk/. Since GLPK is a linear solver, why is it having difficulty obtaining the optimal solution to a simple problem like this?
Information on your system
Pyomo version: 6.4.1 Python version: 3.10 Operating system: MacOS Monterey How Pyomo was installed (PyPI, conda, source): conda Solver (if applicable): GLPK