chiark / gitweb /
allow COBYLA to increase trust-region radius (rho) if predicted improvement was appro...
authorstevenj <stevenj@alum.mit.edu>
Mon, 5 Apr 2010 00:33:44 +0000 (20:33 -0400)
committerstevenj <stevenj@alum.mit.edu>
Mon, 5 Apr 2010 00:33:44 +0000 (20:33 -0400)
darcs-hash:20100405003344-c8de0-d288279ade2dfafe7b9bcf9facf7807288f28010.gz

cobyla/cobyla.c

index c45b626bbaba87c015281f84ff355ff9b5f16435..ea34c895f012b7e97e38c5cc36314539a8be6e0b 100644 (file)
@@ -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: