Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue setting options #51

Open
LaureP0urcel opened this issue Sep 6, 2024 · 0 comments
Open

Issue setting options #51

LaureP0urcel opened this issue Sep 6, 2024 · 0 comments

Comments

@LaureP0urcel
Copy link

Hi,

I am trying to set options on Bonmin to limit the execution time, the problem is convex but we do not need the optimal solution.

I am using pyomo, python 3.12.4 and Bonmin 1.8.8 installed through AMPL. The solver is working, although it seems to disregard the options passed.

I've tried to add a time limit :

opt=SolverFactory('bonmin')
opt.options['bonmin.time_limit']=300
result = opt.solve(model, tee=True)

But it is exceeded :

Bonmin 1.8.8 using Cbc 2.10.5 and Ipopt 3.12.13
bonmin: bonmin.time_limit=300
bonmin.time_limit=300


******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
 Ipopt is released as open source code under the Eclipse Public License (EPL).
         For more information visit http://projects.coin-or.org/Ipopt
******************************************************************************

NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I             1         OPT -1.514741e-28        6 1.383608
NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I             1         OPT -0.4303059      589 173.10537
NLP0014I             2         OPT -0.43169179      628 186.60571
NLP0014I             3         OPT -0.43169179      800 243.44488
NLP0014I             4         OPT -0.4303059      725 226.74718
NLP0014I             5         OPT -0.4303059      447 139.51801
NLP0014I             6         OPT -0.4303059      496 153.68822
NLP0014I             7         OPT -0.43169179      449 137.66981

Similarly I'm trying to put a maximum number of iterations :

opt=SolverFactory('bonmin')
opt.options['bonmin.iteration_limit']=2000
result = opt.solve(model, tee=True)

returning :

Bonmin 1.8.8 using Cbc 2.10.5 and Ipopt 3.12.13
bonmin: bonmin.iteration_limit=2000
bonmin.iteration_limit=2000


******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
 Ipopt is released as open source code under the Eclipse Public License (EPL).
         For more information visit http://projects.coin-or.org/Ipopt
******************************************************************************

NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I             1         OPT -3.3330098e-21        6 0.644561
NLP0012I 
              Num      Status      Obj             It       time                 Location
NLP0014I             1         OPT -0.48566339      382 53.58268
NLP0014I             2         OPT -0.4856634      381 52.969596
NLP0014I             3         OPT -0.4856634      371 53.310332
NLP0014I             4         OPT -0.48566339      357 52.153079
NLP0014I             5         OPT -0.48566344      455 63.509842
NLP0014I             6         OPT -0.48566344      451 62.744809
NLP0014I             7         OPT -0.48566344      484 67.618617
NLP0014I             8         OPT -0.48575226      242 30.986154
NLP0014I             9         OPT -0.48566339      211 27.083205
NLP0014I            10         OPT -0.49043647      266 33.115329
NLP0014I            11         OPT -0.48541294      242 31.765181
NLP0014I            12         OPT -0.4854867      195 25.745563
NLP0014I            13         OPT -0.48565364      188 23.712693
NLP0014I            14         OPT -0.48565363      174 22.136406
[...]
NLP0014I           153         OPT -0.44819175       25 0.743984
NLP0014I           154      INFEAS 0.0056641157       32 0.56372

I'm not sure what I'm doing wrong since the solver does log the options. Any help would be greatly appreciated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant