I have a Pyomo model that eventually gets solved like so:
solver = SolverFactory('ipopt')
results = solver.solve(model,tee=False)
The model current runs for 3000 iterations before giving up.
In my mind, there must be a way to use one of these two lines to limit the number of iterations. How can I do that?
Does this work?
solver = SolverFactory('ipopt')
solver.options['max_iter'] = 10
results = solver.solve(model,tee=False)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With