coin-or / Couenne

Convex Over and Under Envelopes for Nonlinear Estimation
Eclipse Public License 1.0
72 stars 8 forks source link

Solver doesn't terminate with defined time limit #79

Open amininilooffar opened 2 months ago

amininilooffar commented 2 months ago

Hi, Thanks for the code provided for Google Colab. I am trying to solve my MINLP problem using 'couenne'. It takes a long time until it gives me the result; however, I want it to stop computations after a defined time frame. I tried this code: from pyomo.opt import SolverFactory, SolverManagerFactory solver = SolverFactory('couenne') solver_manager = SolverManagerFactory('serial') results = solver_manager.solve(model, opt=solver, tee=True, timelimit=600) But I face an error: 'TimeoutExpired: Command '['/content/bin/couenne', '/tmp/tmp4ceh948b.pyomo.nl', '-AMPL']' timed out after 600.99996879700029 seconds' without having any results. Could you please help me in this regard? Thanks, Niloofar

tkralphs commented 2 months ago

It looks like the solver correctly timed out. What kind of a result you are looking for? When the solver times out, it may indeed not have a solution or be able to provide much information. You could ask the Pyomo folks how to see the raw output from Couenne and then you could see exactly what it outputs when it times out. I suspect there just isn't any solution information available.

tkralphs commented 2 months ago

Could you change the title of this issue to be more accurate? It doesn't seem to be true that the solver doesn't terminate. It say in the output "timed out in 600 seconds."