chiark / gitweb /
use opt->dx in local sub-algorithm
authorstevenj <stevenj@alum.mit.edu>
Sun, 4 Apr 2010 21:48:51 +0000 (17:48 -0400)
committerstevenj <stevenj@alum.mit.edu>
Sun, 4 Apr 2010 21:48:51 +0000 (17:48 -0400)
darcs-hash:20100404214851-c8de0-5e39ad9719b7c5068a704a83e4907e98950c4065.gz

api/optimize.c

index 8cb7e675591b1eeba1ae08b00b87ee05ac27f546..5072871e5ee52faebe054cc5120c211d4ff875c1 100644 (file)
@@ -350,6 +350,7 @@ nlopt_result nlopt_optimize(nlopt_opt opt, double *x, double *minf)
                   nlopt_set_xtol_rel(local_opt, opt->xtol_rel);
                   nlopt_set_xtol_abs(local_opt, opt->xtol_abs);
                   nlopt_set_maxeval(local_opt, nlopt_local_search_maxeval);
+                  nlopt_set_initial_step(local_opt, opt->dx);
              }
              for (i = 0; i < n && stop.xtol_abs[i] > 0; ++i) ;
              if (local_opt->ftol_rel <= 0 && local_opt->ftol_abs <= 0 &&
@@ -454,6 +455,8 @@ nlopt_result nlopt_optimize(nlopt_opt opt, double *x, double *minf)
                   nlopt_set_ftol_abs(local_opt, opt->ftol_abs);
                   nlopt_set_xtol_rel(local_opt, opt->xtol_rel);
                   nlopt_set_xtol_abs(local_opt, opt->xtol_abs);
+                  nlopt_set_maxeval(local_opt, nlopt_local_search_maxeval);
+                  nlopt_set_initial_step(local_opt, opt->dx);
              }
              ret = auglag_minimize(n, f, f_data, 
                                    opt->m, opt->fc,