From: stevenj Date: Mon, 5 Apr 2010 00:33:44 +0000 (-0400) Subject: allow COBYLA to increase trust-region radius (rho) if predicted improvement was appro... X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=3dd3526a0c76bfa049b0c2e59cf8ebc7d8452759;p=nlopt.git allow COBYLA to increase trust-region radius (rho) if predicted improvement was approximately right and simplex is ok, following suggestion in SAS manual for PROC NLP darcs-hash:20100405003344-c8de0-d288279ade2dfafe7b9bcf9facf7807288f28010.gz --- diff --git a/cobyla/cobyla.c b/cobyla/cobyla.c index c45b626..ea34c89 100644 --- a/cobyla/cobyla.c +++ b/cobyla/cobyla.c @@ -939,6 +939,17 @@ L440: /* Branch back for further iterations with the current RHO. */ if (trured > 0. && trured >= prerem * .1) { + /* SGJ, 2010: following a suggestion in the SAS manual (which + mentions a similar modification to COBYLA, although they didn't + publish their source code), increase rho if predicted reduction + is sufficiently close to the actual reduction. Otherwise, + COBLYA seems to easily get stuck making very small steps. + Also require iflag != 0 (i.e., acceptable simplex), again + following SAS suggestion (otherwise I get convergence failure + in some cases.) */ + if (trured >= prerem * 0.9 && trured <= prerem * 1.1 && iflag) { + rho *= 2.0; + } goto L140; } L550: