Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/10/10 16:19:43 (14 years ago)
Author:
abeham
Message:

#893

  • Changed initialization of comparison factor
  • fixed some bugs in OffspringSelector
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Selection/3.3/OffspringSelector.cs

    r3740 r3744  
    114114      // implement the ActualValue fetch here - otherwise the parent scope would also be included, given that there may be 1000 or more parents, this is quite unnecessary
    115115      string tname = SuccessfulOffspringParameter.TranslatedName;
    116       double tmpSelPress = selectionPressure.Value, tmpSelPressInc = 1.0 / populationSize;
     116      double tmpSelPress = selectionPressure.Value, tmpSelPressInc = 1.0 / offspringSize;
    117117      for (int i = 0; i < offspringSize; i++) {
    118118        // fetch value
     
    136136
    137137      // calculate actual selection pressure and success ratio
    138       selectionPressure.Value += offspringSize / (double)populationSize;
     138      selectionPressure.Value = tmpSelPress;
    139139      currentSuccessRatio.Value = successfulOffspring.Value / ((double)populationSize);
    140140
     
    156156        offspring.SubScopes.AddRange(population);
    157157
    158         scope.Variables.Remove(OffspringPopulationParameter.ActualName);
    159         scope.Variables.Remove(OffspringPopulationWinnersParameter.ActualName);
     158        scope.Variables.Remove(OffspringPopulationParameter.TranslatedName);
     159        scope.Variables.Remove(OffspringPopulationWinnersParameter.TranslatedName);
    160160        return base.Apply();
    161161      }
Note: See TracChangeset for help on using the changeset viewer.