Page 1 of 1

Barons restricting the iteration numbers

Posted: Wed Mar 02, 2022 2:58 am
by danish3186
I am solving a nlp using barons, I tried restricting the number of iterations to a fixed value like 100.
I am sending my problem to neos and it always solves problem to optimality.

I am adding the following code to restrict iterations

Code: Select all

$onecho > baron.opt
MaxIter 100
$offecho


How can I restrict the number of iterations?

Thanks!

Re: Barons restricting the iteration numbers

Posted: Thu Mar 03, 2022 11:53 am
by Ebru
Hi,

I solved this problem as adding the following code set.

Code: Select all

model yourmodel /all/;
$onecho > baron.opt
MaxIter 100
$offecho

yourmodel.optfile = 1;

option minlp = baron;
solve yourmodel using minlp minimizing z_value;