BIMK / PlatEMO

Evolutionary multi-objective optimization platform
1.51k stars 457 forks source link

Crash in WOF-SMPSO - Global.Variation does not exist any more #23

Closed hz2014hz closed 5 years ago

hz2014hz commented 5 years ago

Problem: Since the method Global.Variation does not exist any more, the call in the WOF-SMPSO algorithm produces an error as follows:

No appropriate method, property, or field 'Variation' for class 'GLOBAL'. Error in WOFSMPSO>fillPopulation (line 172) Offspring = Global.Variation(input(MatingPool),amountToFill);

Simply changing the call to GA() does not solve the issue entirely, because then only even numbers of offspring are produced, which sometimes does not fill the population with the desired amount of solutions.

Proposed solution: I think this error can be fixed by changing lines 171, 172 and 173 in the file "WOF-SMPSO" as following:

line 171: MatingPool      = TournamentSelection(2,amountToFill+1,FrontNo,-CrowdDis); 
line 172: Offspring       = GA(input(MatingPool));
line 173: Population      = [Population,Offspring(1:amountToFill)]; 
anonymone commented 5 years ago

@hz2014hz hi, This bug has been fixed. Thanks for your feedback 👍
you can download the latest version for get right code.