How to access (or install) different solvers? Specifically CONOPT (Newbie to pyomo)

493 views
Skip to first unread message

Harpreet

unread,
Dec 30, 2016, 5:09:28 PM12/30/16
to Pyomo Forum
Hi. I am quite new to Pyomo and the optimization using solvers. I have mostly used in-built black-box optimization within Python and Matlab. However, my problem requires optimization using CONOPT, so I came across Pyomo while searching for that. I was wondering if someone could guide me how to access (or install) different solvers that can be read by Pyomo? I am specifically interested in using CONOPT for the non-linear optimization problem I posted here 2 days ago for which I am still awaiting some help. Thanks!

Gabriel Hackebeil

unread,
Dec 30, 2016, 5:21:11 PM12/30/16
to pyomo...@googlegroups.com
You need to obtain the CONOPT solver executable that can be used with AMPL. We interface to AMPL solvers using the NL file input format. I’m not exactly sure how to obtain that executable, but perhaps the CONOPT documentation will explain how to do that. You might also need to compile it from source.

Once you have that executable on your machine, you need to add the directory where it is located to your shell’s search path. This usually involves modifying the PATH environment variable. Once this is done, it should work with Pyomo (the solver name is the executable name).

Gabe

On Dec 30, 2016, at 4:09 PM, Harpreet <harpre...@gmail.com> wrote:

Hi. I am quite new to Pyomo and the optimization using solvers. I have mostly used in-built black-box optimization within Python and Matlab. However, my problem requires optimization using CONOPT, so I came across Pyomo while searching for that. I was wondering if someone could guide me how to access (or install) different solvers that can be read by Pyomo? I am specifically interested in using CONOPT for the non-linear optimization problem I posted here 2 days ago for which I am still awaiting some help. Thanks!

--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Harpreet

unread,
Jan 2, 2017, 8:53:59 PM1/2/17
to Pyomo Forum
Thanks, Gabe.

Can you give some thoughts on how to model this problem? Would I need to bring each variable and function within the model's class as `model.x`, `model.fn` etc. or they can be used independently without adding them to the class?
Reply all
Reply to author
Forward
0 new messages