Changeset 1709 for trunk/sources
- Timestamp:
- 04/29/09 23:08:05 (16 years ago)
- Location:
- trunk/sources/HeuristicLab.SimOpt/3.2
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.SimOpt/3.2/HeuristicLab.SimOpt-3.2.csproj
r1534 r1709 89 89 </Compile> 90 90 <Compile Include="IntParameterBoundConstraint.cs" /> 91 <Compile Include="NumericDataAverageMultiCrossover.cs" /> 91 92 <Compile Include="NumericDataRoundedAverageMultiCrossover.cs"> 92 93 <SubType>Code</SubType> -
trunk/sources/HeuristicLab.SimOpt/3.2/NumericDataRoundedAverageMultiCrossover.cs
r1530 r1709 45 45 double sum = 0.0; 46 46 IVariable var = null; 47 string name = scope.TranslateName("VariableName"); 47 48 for (int i = 0; i < parents.Length; i++) { 48 var = parents[i].GetVariable( scope.TranslateName("VariableName"));49 var = parents[i].GetVariable(name); 49 50 if (var.Value is DoubleData) { 50 51 sum += ((DoubleData)var.Value).Data; … … 68 69 (varChild.Value as ConstrainedDoubleData).TrySetData(roundedAverage); 69 70 } 70 scope.AddVariable(varChild); 71 IVariable varScope = scope.GetVariable(name); 72 if (varScope == null) 73 scope.AddVariable(varChild); 74 else varScope.Value = varChild.Value; 71 75 } 72 76 }
Note: See TracChangeset
for help on using the changeset viewer.