Changeset 77 for trunk/sources/HeuristicLab.Selection
- Timestamp:
- 03/18/08 16:00:00 (17 years ago)
- Location:
- trunk/sources/HeuristicLab.Selection
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Selection/ProportionalSelector.cs
r2 r77 81 81 if (subScopes < 1) throw new InvalidOperationException("No source scopes to select available."); 82 82 83 double best = source.SubScopes[0].GetVariableValue<DoubleData>(qualityInfo. ActualName, false).Data;84 double worst = source.SubScopes[subScopes - 1].GetVariableValue<DoubleData>(qualityInfo. ActualName, false).Data;83 double best = source.SubScopes[0].GetVariableValue<DoubleData>(qualityInfo.FormalName, false).Data; 84 double worst = source.SubScopes[subScopes - 1].GetVariableValue<DoubleData>(qualityInfo.FormalName, false).Data; 85 85 double limit = Math.Min(worst * 2, double.MaxValue); 86 86 double min = Math.Min(best, worst); … … 90 90 // preprocess fitness values, apply windowing if desired 91 91 for (int i = 0; i < qualities.Length; i++) { 92 solutionQuality = source.SubScopes[i].GetVariableValue<DoubleData>(qualityInfo. ActualName, false).Data;92 solutionQuality = source.SubScopes[i].GetVariableValue<DoubleData>(qualityInfo.FormalName, false).Data; 93 93 if (solutionQuality < min || solutionQuality > max) { 94 94 // something has obviously gone wrong here -
trunk/sources/HeuristicLab.Selection/TournamentSelector.cs
r2 r77 52 52 for (int j = 0; j < groupSize; j++) { 53 53 IScope scope = source.SubScopes[random.Next(source.SubScopes.Count)]; 54 double quality = scope.GetVariableValue<DoubleData>(qualityInfo. ActualName, false).Data;54 double quality = scope.GetVariableValue<DoubleData>(qualityInfo.FormalName, false).Data; 55 55 if (((maximization) && (quality > best)) || 56 56 ((!maximization) && (quality < best))) {
Note: See TracChangeset
for help on using the changeset viewer.