From 3dd3526a0c76bfa049b0c2e59cf8ebc7d8452759 Mon Sep 17 00:00:00 2001 From: stevenj Date: Sun, 4 Apr 2010 20:33:44 -0400 Subject: [PATCH] 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 --- cobyla/cobyla.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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: -- 2.30.2