Changeset 3744 for trunk/sources/HeuristicLab.Selection
- Timestamp:
- 05/10/10 16:19:43 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Selection/3.3/OffspringSelector.cs
r3740 r3744 114 114 // 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 115 115 string tname = SuccessfulOffspringParameter.TranslatedName; 116 double tmpSelPress = selectionPressure.Value, tmpSelPressInc = 1.0 / populationSize;116 double tmpSelPress = selectionPressure.Value, tmpSelPressInc = 1.0 / offspringSize; 117 117 for (int i = 0; i < offspringSize; i++) { 118 118 // fetch value … … 136 136 137 137 // calculate actual selection pressure and success ratio 138 selectionPressure.Value += offspringSize / (double)populationSize;138 selectionPressure.Value = tmpSelPress; 139 139 currentSuccessRatio.Value = successfulOffspring.Value / ((double)populationSize); 140 140 … … 156 156 offspring.SubScopes.AddRange(population); 157 157 158 scope.Variables.Remove(OffspringPopulationParameter. ActualName);159 scope.Variables.Remove(OffspringPopulationWinnersParameter. ActualName);158 scope.Variables.Remove(OffspringPopulationParameter.TranslatedName); 159 scope.Variables.Remove(OffspringPopulationWinnersParameter.TranslatedName); 160 160 return base.Apply(); 161 161 }
Note: See TracChangeset
for help on using the changeset viewer.