Subsolver for MINLP

144 views
Skip to first unread message

Murilo Souza

unread,
Mar 9, 2019, 9:16:51 AM3/9/19
to AMPL Modeling Language
Hello, i need to solve a MINLP problem.

I've only tried Couenne so far, and i've seen it uses CBC to solve the LP. Is there anyway i can use CPLEX instead? I've seen in the web something about a couenne.opt file, can anyone explain me how to change CBC for CPLEX in that file?

I'm going to test my problem on Baron too. How can i change those subsolvers in Baron?

Thanks in advance!

Pietro Belotti

unread,
Mar 10, 2019, 7:43:52 AM3/10/19
to AMPL Modeling Language
Hi,

Couenne uses COIN-OR's OsiClpSolverInterface to solve the LP, which uses the Clp solver library. In order to use Cplex as an LP solver, add the line

lp_solver cplex

to the couenne.opt option file. However, note that that option was not tested for a long time and that some issues were observed recently when using that option: Couenne may return a wrong solution or terminate with an error.

Regards,
Pietro

AMPL Google Group

unread,
Mar 10, 2019, 9:17:18 AM3/10/19
to Ampl Modeling Language
For BARON, see the options lsolver (for local nonlinear solver) and lpsolver (for linear programming solver) at https://ampl.com/products/solvers/solvers-we-sell/baron/options/. For example, to set CPLEX as the linear solver, give the AMPL command

option baron_options 'lpsolver=cplex';

To also set the nonlinear solver as Knitro, the command is

option baron_options 'lpsolver=cplex lsolver=knitro';

--
Robert Fourer
am...@googlegroups.com
{#HS:797653687-38151#}

Murilo Souza

unread,
Mar 11, 2019, 11:54:53 AM3/11/19
to AMPL Modeling Language
Hello,

I've put the couenne.opt file in the same folder as my .mod, .data and .run files. And i've write inside of it, the "lp_solver cplex".

But i'm getting this error:

ANALYSIS TEST: Couenne was compiled without CPLEX interface. Please reconfigure, recompile, and try again.
exit value 18446744073709551615

How can i fix it?

Another question. First i tried without CPLEX, and Couenne solved my problem in 7 minutes. Then, i tried with Baron, but it couldn't solve my problem. This kind of thing usually happens? 

Pietro Belotti

unread,
Mar 12, 2019, 6:24:07 AM3/12/19
to AMPL Modeling Language
Hi,

Couenne needs to be re-built with a few extra options for the configure command:

--with-cpx-incdir followed by the directory with the include files;
--with-cpx-lib followed by the necessary linker options to compile with Cplex libraries, i.e. -L+directory of libraries and -l+name of the library without "lib".

Hope this helps.

Regards,
Pietro
Message has been deleted

Murilo Souza

unread,
Mar 12, 2019, 6:56:09 AM3/12/19
to AMPL Modeling Language
Thanks for the response Pietro, i'll try that.

Regarding messages i get in the console while my problem is being solved... in Couenne i got messages like this:

Cbc0010I After 2500 nodes, 430 on tree, 1e+050 best solution, best possible 10.622026 (175.38 seconds)
Couenne: new cutoff value 1.0977331349e+001 (247.137 seconds)
Cbc0012I Integer solution of 10.977331 found by Couenne Rounding NLP after 433408 iterations and 2517 nodes (176.12 seconds)
Cbc0010I After 2600 nodes, 127 on tree, 10.977331 best solution, best possible 10.622031 (177.59 seconds)

While in Baron, after using the "include" command to run my .run file, nothing seems to happen, as you can see in the picture i've attached:

Is there anyway i can set baron to show messages like Couenne?
Baron.png

AMPL Google Group

unread,
Mar 12, 2019, 11:22:48 AM3/12/19
to Ampl Modeling Language
To get a progress log from BARON, add outlev=1 to your baron_options string.

--
Robert Fourer
am...@googlegroups.com
{#HS:797653687-38151#}
While in Baron, after using the "include" command to run my .run file, nothing seems to happen, as you can see in this picture:

f4c5223b-245b-45c8-a6b0-a0eaf1aedf31




Is there anyway i can set baron to show messages like Couenne?

--
You received this message because you are subscribed to the Google Groups "AMPL Modeling Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to



On Tue, Mar 12, 2019 at 10:24 AM UTC, Ampl Modeling Language <am...@googlegroups.com> wrote:
Hi,

Couenne needs to be re-built with a few extra options for the configure command:

--with-cpx-incdir followed by the directory with the include files;
--with-cpx-lib followed by the necessary linker options to compile with Cplex libraries, i.e. -L+directory of libraries and -l+name of the library without "lib".

Hope this helps.

Regards,
Pietro



On Mon, Mar 11, 2019 at 3:54 PM UTC, Ampl Modeling Language <am...@googlegroups.com> wrote:
Hello,

I've put the couenne.opt file in the same folder as my .mod, .data and .run files. And i've write inside of it, the "lp_solver cplex".

But i'm getting this error:

ANALYSIS TEST: Couenne was compiled without CPLEX interface. Please reconfigure, recompile, and try again.
exit value 18446744073709551615

How can i fix it?

Another question. First i tried without CPLEX, and Couenne solved my problem in 7 minutes. Then, i tried with Baron, but it couldn't solve my problem. This kind of thing usually happens?

Em domingo, 10 de março de 2019 08:43:52 UTC-3, Pietro Belotti escreveu:



On Sun, Mar 10, 2019 at 1:16 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
For BARON, see the options lsolver (for local nonlinear solver) and lpsolver (for linear programming solver) at https://ampl.com/products/solvers/solvers-we-sell/baron/options/. For example, to set CPLEX as the linear solver, give the AMPL command

option baron_options 'lpsolver=cplex';

To also set the nonlinear solver as Knitro, the command is

option baron_options 'lpsolver=cplex lsolver=knitro';

--
Robert Fourer
am...@googlegroups.com


Reply all
Reply to author
Forward
0 new messages