Fixed demos of neldermead
Michaƫl Baudin [Mon, 1 Mar 2010 14:19:40 +0000 (15:19 +0100)]
scilab/modules/optimization/demos/neldermead/neldermead_boxbounds.sce
scilab/modules/optimization/demos/neldermead/neldermead_boxpost.sce
scilab/modules/optimization/demos/neldermead/neldermead_boxproblemA.sce
scilab/modules/optimization/demos/neldermead/neldermead_boxproblemB.sce
scilab/modules/optimization/demos/optimization.dem.gateway.sce

index 6e87e35..b803843 100644 (file)
@@ -54,6 +54,7 @@ mprintf("Searching (please wait)...\n");
 nm = nmplot_search(nm);
 mprintf("...Done\n");
 nmplot_display(nm);
+mprintf("==========================\n");
 xcomp = nmplot_get(nm,"-xopt");
 mprintf("x computed=%s\n",strcat(string(xcomp)," "));
 mprintf("x expected=%s\n",strcat(string(xopt)," "));
@@ -72,7 +73,7 @@ mprintf("Plot contour (please wait)...\n");
 f = scf(100001);
 xset("fpf"," ")
 drawlater();
-contour ( xdata , ydata , zdata , linspace(min(zdata),max(zdata),20) )
+contour ( xdata , ydata , zdata , linspace(min(zdata),max(zdata),10) )
 nmplot_simplexhistory ( nm );
 drawnow();
 
index eb8dceb..ee1a9b9 100644 (file)
@@ -15,7 +15,7 @@
 //   Rosenbrock's Post Office
 //
 
-mprintf("Illustrates Box'' algorithm on Box problem A.\n");
+mprintf("Illustrates Box'' algorithm on Rosenbrock''s Post Office Problem.\n");
 mprintf("Defining Rosenbrock Post Office function...\n");
 
 //
@@ -115,8 +115,10 @@ nm = neldermead_configure(nm,"-boxboundsalpha" , 0.0001 );
 //
 // Perform optimization
 //
+mprintf("Searching (please wait)...\n");
 nm = neldermead_search(nm);
 neldermead_display(nm);
+mprintf("==========================\n");
 xcomp = neldermead_get(nm,"-xopt");
 mprintf("x computed=%s\n",strcat(string(xcomp)," "));
 mprintf("x expected=%s\n",strcat(string(xopt)," "));
index 22419e2..a600aa4 100644 (file)
@@ -163,6 +163,7 @@ mprintf("Searching (please wait)...\n");
 nm = neldermead_search(nm);
 mprintf("...Done\n");
 neldermead_display(nm);
+mprintf("==========================\n");
 xcomp = neldermead_get(nm,"-xopt");
 mprintf("x computed=%s\n",strcat(string(xcomp)," "));
 mprintf("x expected=%s\n",strcat(string(xopt)," "));
index be382f1..cf57c1e 100644 (file)
@@ -119,6 +119,7 @@ nm = neldermead_configure(nm,"-boxboundsalpha" , 0.0001 );
 mprintf("Searching (please wait)...\n");
 nm = neldermead_search(nm);
 neldermead_display(nm);
+mprintf("==========================\n");
 xcomp = neldermead_get(nm,"-xopt");
 mprintf("x computed=%s\n",strcat(string(xcomp)," "));
 mprintf("x expected=%s\n",strcat(string(xopt)," "));
index 9ffae6d..0e91302 100644 (file)
@@ -32,7 +32,7 @@ subdemolist = [
 "neldermead/Box A",                      "neldermead/neldermead_boxproblemA.sce"; ...
 "neldermead/Box B",                      "neldermead/neldermead_boxproblemB.sce"; ...
 "neldermead/Box Bounds",                 "neldermead/neldermead_boxbounds.sce"; ...
-"neldermead/Box Post",                   "neldermead/neldermead_boxpost.sce"]
+"neldermead/Box Post",                   "neldermead/neldermead_boxpost.sce" ...
 ];
 
 if with_module('genetic_algorithms') then