我正在尝试解决GLPK和/或CBC中的MIP。 .lp文件为907兆字节,大约有500万个变量,但它甚至没有在CBC上运行,并且已经在GLPK上运行了8天以上,但没有找到解决方案。 同样,每当我为GLPK设置时间限制时,它就会显示“ TIME LIMIT EXCEEDED”;搜索终止,想知道是否可以使用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
答案 0 :(得分:0)
通常,LP模型是可解决的。 8天太多了。您可以在“ http://plato.asu.edu/ftp/lpsimp.html”中找到lp解算器的比较。您可以更改您的求解器。
如果求解器在终止之前找到了解决方案,则可以从python-pyomo到达。
此外,CBC是MIP求解器。但是您说您的模型是LP。