Changeset 77 for trunk/sources/HeuristicLab.Selection.OffspringSelection
- Timestamp:
- 03/18/08 16:00:00 (17 years ago)
- Location:
- trunk/sources/HeuristicLab.Selection.OffspringSelection
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Selection.OffspringSelection/OffspringAnalyzer.cs
r2 r77 60 60 double[] qualitiesArray = new double[scope.SubScopes.Count]; 61 61 for (int i = 0; i < qualitiesArray.Length; i++) 62 qualitiesArray[i] = scope.SubScopes[i].GetVariableValue<DoubleData>(qualityInfo. ActualName, false).Data;62 qualitiesArray[i] = scope.SubScopes[i].GetVariableValue<DoubleData>(qualityInfo.FormalName, false).Data; 63 63 qualities = new DoubleArrayData(qualitiesArray); 64 64 IVariableInfo parentQualitiesInfo = GetVariableInfo("ParentQualities"); … … 66 66 AddVariable(new Variable(parentQualitiesInfo.ActualName, qualities)); 67 67 else 68 scope.AddVariable(new Variable( parentQualitiesInfo.ActualName, qualities));68 scope.AddVariable(new Variable(scope.TranslateName(parentQualitiesInfo.FormalName), qualities)); 69 69 70 70 CompositeOperation next = new CompositeOperation(); … … 82 82 } 83 83 IVariableInfo qualityInfo = GetVariableInfo("Quality"); 84 double child = scope.SubScopes[i].GetVariableValue<DoubleData>(qualityInfo. ActualName, false).Data;84 double child = scope.SubScopes[i].GetVariableValue<DoubleData>(qualityInfo.FormalName, false).Data; 85 85 double threshold; 86 86 … … 97 97 else 98 98 successful = new BoolData(false); 99 scope.SubScopes[i].AddVariable(new Variable(s uccessfulInfo.ActualName, successful));99 scope.SubScopes[i].AddVariable(new Variable(scope.TranslateName(successfulInfo.FormalName), successful)); 100 100 } 101 101 … … 105 105 RemoveVariable(parentQualitiesInfo.ActualName); 106 106 else 107 scope.RemoveVariable( parentQualitiesInfo.ActualName);107 scope.RemoveVariable(scope.TranslateName(parentQualitiesInfo.FormalName)); 108 108 109 109 return null; -
trunk/sources/HeuristicLab.Selection.OffspringSelection/OffspringSelector.cs
r40 r77 57 57 AddVariable(new Variable(goodChildrenInfo.ActualName, goodChildren)); 58 58 else 59 scope.AddVariable(new Variable( goodChildrenInfo.ActualName, goodChildren));59 scope.AddVariable(new Variable(scope.TranslateName(goodChildrenInfo.FormalName), goodChildren)); 60 60 } 61 61 ItemList<IScope> badChildren = GetVariableValue<ItemList<IScope>>("BadChildren", scope, false, false); … … 66 66 AddVariable(new Variable(badChildrenInfo.ActualName, badChildren)); 67 67 else 68 scope.AddVariable(new Variable( badChildrenInfo.ActualName, badChildren));68 scope.AddVariable(new Variable(scope.TranslateName(badChildrenInfo.FormalName), badChildren)); 69 69 } 70 70 … … 73 73 while (children.SubScopes.Count > 0) { 74 74 IScope child = children.SubScopes[0]; 75 bool successful = child.GetVariableValue<BoolData>(successfulInfo. ActualName, false).Data;75 bool successful = child.GetVariableValue<BoolData>(successfulInfo.FormalName, false).Data; 76 76 if (successful) goodChildren.Add(child); 77 77 else badChildren.Add(child); … … 87 87 AddVariable(new Variable(selectionPressureInfo.ActualName, selectionPressure)); 88 88 else 89 scope.AddVariable(new Variable(s electionPressureInfo.ActualName, selectionPressure));89 scope.AddVariable(new Variable(scope.TranslateName(selectionPressureInfo.FormalName), selectionPressure)); 90 90 } 91 91 DoubleData successRatio = GetVariableValue<DoubleData>("SuccessRatio", scope, false, false); … … 96 96 AddVariable(new Variable(successRatioInfo.ActualName, successRatio)); 97 97 else 98 scope.AddVariable(new Variable(s uccessRatioInfo.ActualName, successRatio));98 scope.AddVariable(new Variable(scope.TranslateName(successRatioInfo.FormalName), successRatio)); 99 99 } 100 100 int goodCount = goodChildren.Count; … … 130 130 RemoveVariable(goodChildrenInfo.ActualName); 131 131 else 132 scope.RemoveVariable( goodChildrenInfo.ActualName);132 scope.RemoveVariable(scope.TranslateName(goodChildrenInfo.FormalName)); 133 133 IVariableInfo badChildrenInfo = GetVariableInfo("BadChildren"); 134 134 if (badChildrenInfo.Local) 135 135 RemoveVariable(badChildrenInfo.ActualName); 136 136 else 137 scope.RemoveVariable( badChildrenInfo.ActualName);137 scope.RemoveVariable(scope.TranslateName(badChildrenInfo.FormalName)); 138 138 139 139 return null;
Note: See TracChangeset
for help on using the changeset viewer.