我正在尝试解决GLPK和/或CBC中的MIP问题。 .lp文件是907兆字节,大约有5百万个变量,但它甚至没有在CBC上运行,并且在GLPK上运行了8天以上,没有找到解决方案。此外,每当我设定GLPK的时间限制时,它表示时间限制已超出; SEARCH TERMINATED并且想知道是否可以使用CMD窗口或python获得输出。
ERROR: "[base]\site-packages\pyomo\opt\base\solvers.py", 616, solve
Solver (cbc) returned non-zero return code (-1073740791) ERROR: "[base]\site-packages\pyomo\opt\base\solvers.py", 619, solve
See the solver log above for diagnostic information. Traceback (most recent call last):
File "<ipython-input-1-55698ac3ed56>", line 1, in <module>
runfile('D:/Data/Central Data Repository/Pooling Optimisation/Python Scripts/Run_Solver_From_Spyder v2.py', wdir='D:/Data/Central Data Repository/Pooling Optimisation/Python Scripts')
File "C:\ProgramData\Anaconda2\lib\site-packages\spyder\utils\site\sitecustomize.py", line 710, in runfile
execfile(filename, namespace)
File "C:\ProgramData\Anaconda2\lib\site-packages\spyder\utils\site\sitecustomize.py", line 86, in execfile
exec(compile(scripttext, filename, 'exec'), glob, loc)
File "D:/Data/Central Data Repository/Pooling Optimisation/Python Scripts/Run_Solver_From_Spyder v2.py", line 37, in <module>
results = opt.solve(instance, options=solver_opt, tee=True, keepfiles=True)
File "C:\ProgramData\Anaconda2\lib\site-packages\pyomo\opt\base\solvers.py", line 623, in solve
"Solver (%s) did not exit normally" % self.name)
ApplicationError: Solver (cbc) did not exit normally
通常,LP模型是可解决的。 8天太多了。你可以在这里找到lp解算器的比较“http://plato.asu.edu/ftp/lpsimp.html”。你可以改变你的解算器。
如果求解器在终止之前找到解决方案,则可以从python-pyomo到达。
此外,CBC是MIP求解器。但你说你的模型是LP。