move the demos of the genetic_algorithms and simulated_annealing modules in the optim...
Yann Collette [Thu, 10 Dec 2009 13:05:03 +0000 (14:05 +0100)]
scilab/modules/genetic_algorithms/etc/genetic_algorithms.start
scilab/modules/optimization/demos/optimization.dem.gateway.sce
scilab/modules/simulated_annealing/etc/simulated_annealing.start

index 2a4be1b..f38842a 100644 (file)
@@ -16,11 +16,3 @@ load("SCI/modules/genetic_algorithms/macros/lib");
 if WITH_HELPTOOLS then
        add_module_help_chapter("genetic_algorithms");
 end
-
-// Add demos
-// =============================================================================
-if WITH_DEMOS then
-       pathdemos = pathconvert(SCI+"/modules/genetic_algorithms/demos/genetic_algorithms.dem.gateway.sce",%f,%t);
-       add_demo(gettext("Genetic Algorithms"),pathdemos);
-       clear pathdemos;
-end
index 5936609..fb9baff 100644 (file)
@@ -7,31 +7,46 @@
 
 demopath = get_absolute_file_path("optimization.dem.gateway.sce");
 subdemolist = [
-"Non linear data fitting"         "datafit/datafit.dem.sce"       
-"optim/Rosenbrock"                "optim/optim_rosenbrock.sce"       
-"optim/Output"                    "optim/optim_output.sce"       
-"optim/Plot"                      "optim/optim_plot.sce"       
-"optim/Derivative"                "optim/optim_withderivative.sce"       
-"fminsearch/Rosenbrock"           "neldermead/fminsearch_rosenbrock.sce"       
-"fminsearch/tolx"                 "neldermead/fminsearch_tolx.sce"   
-"fminsearch/Output Function"      "neldermead/fminsearch_outputfunction.sce"   
-"fminsearch/Option Display"       "neldermead/fminsearch_display.sce"   
-"fminsearch/Plot Func Count"      "neldermead/fminsearch_optimplotfunccount.sce"   
-"fminsearch/Plot F"               "neldermead/fminsearch_optimplotfval.sce"   
-"fminsearch/Plot X"               "neldermead/fminsearch_optimplotx.sce"   
-"neldermead/Rosenbrock Variable"  "neldermead/neldermead_rosenbrock.sce"       
-"neldermead/Output Command"       "neldermead/neldermead_outputcmd.sce"       
-"neldermead/Box A"                "neldermead/neldermead_boxproblemA.sce"       
-"neldermead/Box B"                "neldermead/neldermead_boxproblemB.sce"       
-"nmplot/Han #1"             "neldermead/nmplot_han1.sce"       
-"nmplot/Han #2"             "neldermead/nmplot_han2.sce"       
-"nmplot/McKinnon #1"        "neldermead/nmplot_mckinnon.sce"       
-"nmplot/McKinnon #2"        "neldermead/nmplot_mckinnon2.sce"       
-"nmplot/Quadratic Fixed #1" "neldermead/nmplot_quadratic.fixed.sce"       
-"nmplot/Quadratic Fixed #2" "neldermead/nmplot_quadratic.fixed2.sce"       
-"nmplot/Rosenbrock Fixed"   "neldermead/nmplot_rosenbrock.fixed.sce"       
-"nmplot/Rosenbrock Variable"         "neldermead/nmplot_rosenbrock.sce"       
-];
+"Non linear data fitting",               "datafit/datafit.dem.sce"; ...
+"optim/Rosenbrock",                      "optim/optim_rosenbrock.sce"; ...
+"optim/Output",                          "optim/optim_output.sce"; ...
+"optim/Plot",                            "optim/optim_plot.sce"; ...
+"optim/Derivative",                      "optim/optim_withderivative.sce"; ...
+"fminsearch/Rosenbrock",                 "neldermead/fminsearch_rosenbrock.sce"; ...
+"fminsearch/tolx",                       "neldermead/fminsearch_tolx.sce"; ...
+"fminsearch/Output Function",            "neldermead/fminsearch_outputfunction.sce"; ...
+"fminsearch/Option Display",             "neldermead/fminsearch_display.sce"; ...
+"fminsearch/Plot Func Count",            "neldermead/fminsearch_optimplotfunccount.sce"; ...
+"fminsearch/Plot F",                     "neldermead/fminsearch_optimplotfval.sce"; ...
+"fminsearch/Plot X",                     "neldermead/fminsearch_optimplotx.sce"; ...
+"neldermead/Rosenbrock Variable",        "neldermead/neldermead_rosenbrock.sce"; ...
+"neldermead/Output Command",             "neldermead/neldermead_outputcmd.sce"; ...
+"neldermead/Box A",                      "neldermead/neldermead_boxproblemA.sce"; ...
+"neldermead/Box B",                      "neldermead/neldermead_boxproblemB.sce"; ...
+"nmplot/Han #1",                         "neldermead/nmplot_han1.sce"; ...
+"nmplot/Han #2",                         "neldermead/nmplot_han2.sce"; ...
+"nmplot/McKinnon #1",                    "neldermead/nmplot_mckinnon.sce"; ...
+"nmplot/McKinnon #2",                    "neldermead/nmplot_mckinnon2.sce"; ...
+"nmplot/Quadratic Fixed #1",             "neldermead/nmplot_quadratic.fixed.sce"; ...
+"nmplot/Quadratic Fixed #2",             "neldermead/nmplot_quadratic.fixed2.sce"; ...
+"nmplot/Rosenbrock Fixed",               "neldermead/nmplot_rosenbrock.fixed.sce"; ...
+"nmplot/Rosenbrock Variable",            "neldermead/nmplot_rosenbrock.sce"];
+
+if with_module('genetic_algorithms') then
+  subdemolist = [subdemolist; ...
+                 "Genetic algorithms",                    "../../genetic_algorithms/demos/GAdemo.sce"; ...
+                 "Genetic algorithms and Ising problem",  "../../genetic_algorithms/demos/GAIsing2ddemo.sce"; ...
+                 "MultiObjective Genetic Algorithm",      "../../genetic_algorithms/demos/MOGAdemo.sce"; ...
+                 "Niched Sharing Genetic Algorithm",      "../../genetic_algorithms/demos/NSGAdemo.sce"; ...
+                 "Niched Sharing Genetic Algorithm II",   "../../genetic_algorithms/demos/NSGA2demo.sce"];
+end 
+
+if with_module('simulated_annealing') then
+  subdemolist = [subdemolist; ...
+                 "Simulated Annealing",                   "../../simulated_annealing/demos/SAdemo.sce"; ...
+                 "Simulated Annealing and Ising problem", "../../simulated_annealing/demos/SAIsing2ddemo.sce"];
+end
+
 subdemolist(:,2) = demopath + subdemolist(:,2)
 
 
index b5fde21..3604212 100644 (file)
@@ -16,11 +16,3 @@ load("SCI/modules/simulated_annealing/macros/lib");
 if WITH_HELPTOOLS then
        add_module_help_chapter("simulated_annealing");
 end
-
-// Add demos
-// =============================================================================
-if WITH_DEMOS then
-       pathdemos = pathconvert(SCI+"/modules/simulated_annealing/demos/simulated_annealing.dem.gateway.sce",%f,%t);
-       add_demo(gettext("Simulated Annealing"),pathdemos);
-       clear pathdemos;
-end