how to specify the settings of solver Baron through ampl Matlab API

169 views
Skip to first unread message

Allan

unread,
Nov 20, 2016, 10:24:19 AM11/20/16
to am...@googlegroups.com
Dear stuff at AMPL,

I am new to AMPL, and I am using AMPL Matlab API to solve some complex non-convex problems by using the solver Baron. In some cases, Baron may take a very long time (can be a couple of hours) to solve a problem, so I would like to limit the maximum running time of Baron and achieve a tradeoff between performance and computational time. I have checked some materials (e.g., http://ampl.com/products/solvers/solvers-we-sell/baron/options/ ), but I still haven't figured out how to set the parameters pertinent to solver Baron through AMPL Matlab API. I wonder if you can give me some hints and details (some examples are better) on my problem.

I am looking forward to your reply, and thanks in advance.

Best regards,
Rui



 

Robert Fourer

unread,
Nov 21, 2016, 10:12:12 AM11/21/16
to am...@googlegroups.com
In the MATLAB API you can use the setOption method, for example like this:

ampl.setOption('baron_options','maxtime=3600');

If you want to set other options for BARON then you should add them to this baron_options string; for example:

ampl.setOption('baron_options','maxtime=3600 prtime=60');

The recognized options are on the page http://ampl.com/products/solvers/solvers-we-sell/baron/options/ that you were looking at.

Bob Fourer
am...@googlegroups.com

=======
Reply all
Reply to author
Forward
0 new messages