Skip to content
Advertisement

Installing Couenne solver on Python’s Pymo extension

How do I install the Pyomo’s “Cuenne” optimizer extension? I have downloaded the binaries from: https://www.coin-or.org/download/binary/Couenne/

Here is an official guide from Pyomo’s site on how to solve problems, with ASL:

The basic work flow that takes place above can be summarized as:

Create an ASL solver plugin that uses the ipopt executable appearing in the shell search PATH.

Output the Pyomo model as an NL file. Invoke the solver (which produces an SOL file).

Check the solver termination condition stored in the results object.

Load the solution stored in the results object into the Pyomo model.Construct a Pyomo model.

Solve the PyomoRead the SOL file into a Pyomo results object.

http://nbviewer.jupyter.org/github/Pyomo/PyomoGallery/blob/master/asl_io/asl_io.ipynb

But it doesn’t detail how to get Pyomo to recognize the Couenne solver at all.

Advertisement

Answer

You have to make sure that the Couenne executable is in your PATH environment variable. You will know this is done correctly if you can open a terminal and type couenne and get the following output:

$ couenne
Couenne 0.5.6 -- an Open-Source solver for Mixed Integer Nonlinear Optimization
Mailing list: couenne@list.coin-or.org
Instructions: http://www.coin-or.org/Couenne
No stub!
usage: couenne [options] stub [-AMPL] [<assignment> ...]

Options:
    --  {end of options}
    -=  {show name= possibilities}
    -?  {show usage}
    -bf {read boundsfile f}
    -e  {suppress echoing of assignments}
    -of {write .sol file to file f}
    -s  {write .sol file (without -AMPL)}
    -v  {just show version}

Similarly you should open a terminal and verify that Pyomo is successfully installed. Once you verify those two things then you can use Couenne from Pyomo simply by specifying 'couenne' as the solver.

Advertisement