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

[New user question] Pass options to ipopt #92

Closed
a-jp opened this issue Mar 12, 2022 · 3 comments
Closed

[New user question] Pass options to ipopt #92

a-jp opened this issue Mar 12, 2022 · 3 comments

Comments

@a-jp
Copy link

a-jp commented Mar 12, 2022

I currently use pyomo, when using ipopt I can pass options to ipopt as follows:

solver = SolverFactory('ipopt')
opts = {'halt_on_ampl_error': 'yes',
           'tol': tolerance, 'bound_relax_factor': 0.0}
results = solver.solve(model, tee=False, options=opts)

When using pygmo I set up the ipopt solver like this:

prob = pg.problem(problem)
uda = pg.ipopt()
algo = pg.algorithm(uda)

How would I pass the same options to ipopt that I do when using pyomo?

Thanks,
Andy

@bluescarni
Copy link
Member

Hi @a-jp

you can set Ipopt's options after the construction of the uda object. See the docs here for some examples:

https://esa.github.io/pygmo2/algorithms.html?highlight=ipopt#pygmo.ipopt

@a-jp
Copy link
Author

a-jp commented Mar 12, 2022

Thanks

@bluescarni
Copy link
Member

Feel free to come over to the gitter channel the next time you have a question:

https://gitter.im/pagmo2/Lobby

Closing the report.

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

2 participants