You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output of linprog_simplex is not correct. Specifically,
The output of linprog_simplex in QuantEcon is not deterministic. On subsequent runs, the optimal value changes unpredictably.
Due to this, the outputs also do not match those from scipy.
Reproducing the Error
Here are the files containing a minimal reproducible example comparing the optimal value to that obtained using scipy: mre.zip. I've zipped up 16 fixed linear programs from my use case along with a script that solves each of them using QuantEcon and scipy.
The dependencies and their versions in the MRE are
numpy==1.24.3
quantecon==0.7.1
scipy==1.10.1
In the attached files, the optimal values of 16 LPs from scipy are consistently given by
I've checked the correctness of the scipy outputs vs. cvxpy and multiple solver backends. The results always agree with scipy, which points to a bug in the simplex method implementation of QuantEcon.
The text was updated successfully, but these errors were encountered:
@alberthli Thank you for the report. Good that you found how to resolve the issues.
Maybe we should give useful examples in the docstring of linprog_simplex (#716).
The Problem
The output of
linprog_simplex
is not correct. Specifically,linprog_simplex
inQuantEcon
is not deterministic. On subsequent runs, the optimal value changes unpredictably.scipy
.Reproducing the Error
Here are the files containing a minimal reproducible example comparing the optimal value to that obtained using
scipy
: mre.zip. I've zipped up 16 fixed linear programs from my use case along with a script that solves each of them usingQuantEcon
andscipy
.The dependencies and their versions in the MRE are
In the attached files, the optimal values of 16 LPs from
scipy
are consistently given byHowever, when using
QuantEcon
, here are two example outputs given simply by running the MRE script twice:Additional Info
I've checked the correctness of the
scipy
outputs vs.cvxpy
and multiple solver backends. The results always agree withscipy
, which points to a bug in the simplex method implementation ofQuantEcon
.The text was updated successfully, but these errors were encountered: