Objective tolerance / stopping criterion for CONOPT

Dear GAMS users,

I’m using GAMS with the CONOPT solver to fit data to a kind of nonlinear regression model. The objective is a simple sum of squared errors between data points and the corresponding model variables, and in addition there are some nonlinear constraints. The solver works well, but I find that it spends most of its time trying to achieve very high solution accuracy, which is completely unnecessary in our case. Typically, it’s trying to bring my objective down to 10^-8, when 10^-2 would do just fine.

To speed things up, I’m wondering if there is some way to specify a tolerance so that CONOPT stops when the objective reaches a certain threshold? I would have thought this is a common thing to do, but I can’t find any suitable option in either the GAMS or CONOPT manuals. The “optCA” option (“absolute optimality criterion”) seems to be what I want, but this apparently only applies to mixed-integer problems (mine is all continuous variables) and is ignored by GAMS in my case.

Any help appreciated!


Best,

Roland Nilsson
Karolinska Institutet
Sweden


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Hi Roland



The ’straight-forward’ method would be to add a lower bound on your objective. When it is binding there is nothing more to optimize and CONOPT would stop. Unfortunately it prevents CONOPT from identifying most of the model is ‘post-triangular’ and each iteration is much slower and the overall time will most likely increase.



However, you can reformulate your objective definition from



objdef … obj =E= sum(i, sqr(res(i)) );



to



objdef … obj =E= max( 0.01, sum(i, sqr(res(i)) ) );



and solve the model as a DNLP instead of as NLP. Initially, the iterations will be exactly as before. If the squared sum of residuals becomes less than 0.01 then the max-operator turns off the res-term, the gradient becomes zero, and CONOPT stops and returns obj = 0.01 (independent of the res-variables).



Good luck



Arne


\

Arne Stolbjerg Drud

ARKI Consulting & Development A/S

Bagsvaerdvej 246A, DK-2880 Bagsvaerd, Denmark

Phone: (+45) 44 49 03 23, Fax: (+45) 44 49 03 33, email: adrud@arki.dk



From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of roland.nilsson.ki@gmail.com
Sent: Wednesday, August 13, 2014 3:49 PM
To: gamsworld@googlegroups.com
Subject: Objective tolerance / stopping criterion for CONOPT



Dear GAMS users,



I’m using GAMS with the CONOPT solver to fit data to a kind of nonlinear regression model. The objective is a simple sum of squared errors between data points and the corresponding model variables, and in addition there are some nonlinear constraints. The solver works well, but I find that it spends most of its time trying to achieve very high solution accuracy, which is completely unnecessary in our case. Typically, it’s trying to bring my objective down to 10^-8, when 10^-2 would do just fine.



To speed things up, I’m wondering if there is some way to specify a tolerance so that CONOPT stops when the objective reaches a certain threshold? I would have thought this is a common thing to do, but I can’t find any suitable option in either the GAMS or CONOPT manuals. The “optCA” option (“absolute optimality criterion”) seems to be what I want, but this apparently only applies to mixed-integer problems (mine is all continuous variables) and is ignored by GAMS in my case.



Any help appreciated!





Best,



Roland Nilsson

Karolinska Institutet

Sweden


\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Reply-to: gamsworld@googlegroups.com

Thanks Arne, will give it a try !

// Roland

Den onsdagen den 13:e augusti 2014 kl. 17:06:52 UTC+2 skrev Arne Stolbjerg Drud:

Hi Roland



The ’straight-forward’ method would be to add a lower bound on your objective. When it is binding there is nothing more to optimize and CONOPT would stop. Unfortunately it prevents CONOPT from identifying most of the model is ‘post-triangular’ and each iteration is much slower and the overall time will most likely increase.



However, you can reformulate your objective definition from



objdef … obj =E= sum(i, sqr(res(i)) );



to



objdef … obj =E= max( 0.01, sum(i, sqr(res(i)) ) );



and solve the model as a DNLP instead of as NLP. Initially, the iterations will be exactly as before. If the squared sum of residuals becomes less than 0.01 then the max-operator turns off the res-term, the gradient becomes zero, and CONOPT stops and returns obj = 0.01 (independent of the res-variables).



Good luck



Arne


\

Arne Stolbjerg Drud

ARKI Consulting & Development A/S

Bagsvaerdvej 246A, DK-2880 Bagsvaerd, Denmark

Phone: (+45) 44 49 03 23, Fax: (+45) 44 49 03 33, email: ad…@arki.dk



From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of roland.n...@gmail.com
Sent: Wednesday, August 13, 2014 3:49 PM
To: gams...@googlegroups.com
Subject: Objective tolerance / stopping criterion for CONOPT



Dear GAMS users,



I’m using GAMS with the CONOPT solver to fit data to a kind of nonlinear regression model. The objective is a simple sum of squared errors between data points and the corresponding model variables, and in addition there are some nonlinear constraints. The solver works well, but I find that it spends most of its time trying to achieve very high solution accuracy, which is completely unnecessary in our case. Typically, it’s trying to bring my objective down to 10^-8, when 10^-2 would do just fine.



To speed things up, I’m wondering if there is some way to specify a tolerance so that CONOPT stops when the objective reaches a certain threshold? I would have thought this is a common thing to do, but I can’t find any suitable option in either the GAMS or CONOPT manuals. The “optCA” option (“absolute optimality criterion”) seems to be what I want, but this apparently only applies to mixed-integer problems (mine is all continuous variables) and is ignored by GAMS in my case.



Any help appreciated!





Best,



Roland Nilsson

Karolinska Institutet

Sweden


\

To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.