0

I am trying to solve an MIP in GLPK and/or CBC. The .lp file is 907 megabytes and there is roughly 5 Million variables but it doesn't even run on CBC and has been running for over 8 days on GLPK with no solution found. Also whenever I set a time limit on GLPK it says TIME LIMIT EXCEEDED; SEARCH TERMINATED and was wondering if it is possible to get an output either using the CMD window or 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
  • For an LP this is large but not exceedingly so (we miss the number nonzeros which is more important for an LP; your LP file size indicates it may be rather dense). If the model is an LP and it is sparse you may want to look into using an interior point solver. If your model is a MIP (i.e. contains discrete variables) then often the best way is to look at a commercial solver. It would be good to show the first part of the solver log. – Erwin Kalvelagen Sep 10 '18 at 17:05
  • Added the solver log for the cbc error. @ErwinKalvelagen – redanimal375 Sep 11 '18 at 10:44
  • My guess is that you are running out of memory – Erwin Kalvelagen Sep 11 '18 at 10:57
  • The computer this is running on has 128GB of RAM so I hope not! – redanimal375 Sep 11 '18 at 12:20

1 Answers1

0

Generally, LP models are solvable. 8 days is too much. You can find the comparison of lp solvers here "http://plato.asu.edu/ftp/lpsimp.html". You can change your solver.

If solver finds a solution before the termination, you can reach from python-pyomo.

Also, CBC is MIP solver. But you said your model is LP.

kur ag
  • 591
  • 8
  • 19
  • Sorry, it is indeed a MIP. Do you recommend any of the open-source solvers which could tackle this problem. Regarding if it finds a solution, do you know what the code is to output it in pyomo. Thanks. – redanimal375 Sep 10 '18 at 14:10
  • If you are a student, there are commercial solvers' free versions. You can use them with pyomo. Similar to lp page, there is comparison page for MIP, please examine http://plato.asu.edu/ftp/milpc.html. You can find a good example on this page http://hselab.org/pyomo-get-variable-values.html for getting values. Also, as a SO user, please look here https://stackoverflow.com/help/someone-answers. – kur ag Sep 10 '18 at 14:38