0

我正在尝试解决 GLPK 和/或 CBC 中的 MIP。.lp 文件有 907 兆字节,大约有 500 万个变量,但它甚至不能在 CBC 上运行,并且在 GLPK 上运行了 8 天以上,但没有找到解决方案。此外,每当我对 GLPK 设置时间限制时,它都会显示 TIME LIMIT EXCEEDED;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
4

1 回答 1

0

通常,LP 模型是可解的。8天太多了。你可以在这里找到 lp 求解器的比较“ http://plato.asu.edu/ftp/lpsimp.html ”。您可以更改求解器。

如果求解器在终止之前找到解决方案,您可以从 python-pyomo 访问。

此外,CBC 是 MIP 求解器。但是你说你的模型是LP。

于 2018-09-10T12:27:30.623 回答