From: Paul BIGNIER Date: Fri, 25 Oct 2013 08:15:40 +0000 (+0200) Subject: * Bug #13015 fixed - Genetic_algorithms: proper computation of Efficiency X-Git-Tag: 5.5.0~1234 X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=commitdiff_plain;h=813f48e9b1e521e507e93ae3f36cd109a483e135 * Bug #13015 fixed - Genetic_algorithms: proper computation of Efficiency The default 'select_fun' parameter for optim_nsga is 'select_ga_elitist', which correctly computes Efficiency. So Efficiency yielded an erroneous value (at least, not optimal) on the first iteration, then it was updated to the proper value thanks to 'select_ga_elitist'. Change-Id: Ibdd9c1ec653c49d4c8f92eb1613acbca10c318b6 --- diff --git a/scilab/CHANGES_5.5.X b/scilab/CHANGES_5.5.X index 48fe29f..596c2fe 100644 --- a/scilab/CHANGES_5.5.X +++ b/scilab/CHANGES_5.5.X @@ -78,7 +78,9 @@ Scilab Bug Fixes * Bug #13012 fixed - Vectorial export of rotated strings was wrong. -* Bug #13014 fixed - Improvement for the optim_ga algorithm: update of the Efficiency inner variable. +* Bug #13014 fixed - Update of the Efficiency inner variable improved in optim_ga. + +* Bug #13015 fixed - Computation of Efficiency innver variable improved in optim_ga. Xcos Bug Fixes diff --git a/scilab/modules/genetic_algorithms/macros/optim_nsga.sci b/scilab/modules/genetic_algorithms/macros/optim_nsga.sci index 666476c..e739a38 100644 --- a/scilab/modules/genetic_algorithms/macros/optim_nsga.sci +++ b/scilab/modules/genetic_algorithms/macros/optim_nsga.sci @@ -112,7 +112,7 @@ function [pop_opt, fobj_pop_opt, pop_init, fobj_pop_init] = optim_nsga(ga_f, pop FObj_Pop_Min = min(FObj_Pop); // Normalization of the efficiency - Efficiency = (1 - pressure) * (FObj_Pop - FObj_Pop_Min) / max([FObj_Pop_Max - FObj_Pop_Min %eps]) + pressure; + Efficiency = (1 - pressure) * (FObj_Pop_Max - FObj_Pop) / max([FObj_Pop_Max - FObj_Pop_Min %eps]) + pressure; // // Selection