- Timestamp:
- 04/20/12 17:00:09 (13 years ago)
- Location:
- branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3
- Files:
-
- 8 added
- 2 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/HeuristicLab.Algorithms.ScatterSearch-3.3.csproj
r7740 r7744 86 86 </ItemGroup> 87 87 <ItemGroup> 88 <Compile Include="Knapsack\DiversityCalculator.cs" /> 88 <Compile Include="DiversityCalculator.cs" /> 89 <Compile Include="Knapsack\BinaryVectorDiversityCalculator.cs" /> 89 90 <Compile Include="Knapsack\INBinaryVectorCrossover.cs" /> 91 <Compile Include="IScatterSearchTargetProcessor.cs" /> 90 92 <Compile Include="Knapsack\NBinaryVectorCrossover.cs" /> 91 93 <Compile Include="Knapsack\NChildCrossover.cs" /> 92 94 <Compile Include="OffspringProcessor.cs" /> 93 <Compile Include="TSPPopulationRebuildMethod.cs" /> 94 <Compile Include="TSPSolutionPoolUpdateMethod.cs" /> 95 <Compile Include="TSPReferenceSetUpdateMethod.cs" /> 96 <Compile Include="TSPScatterSearchImprovementOperator.cs" /> 95 <Compile Include="TravelingSalesman\PermutationDiversityCalculator.cs" /> 96 <Compile Include="TravelingSalesman\TravelingSalesmanImprovementOperator.cs" /> 97 97 <None Include="HeuristicLab.snk" /> 98 98 <None Include="Plugin.cs.frame" /> … … 103 103 <Compile Include="PopulationRebuildMethod.cs" /> 104 104 <Compile Include="ScatterSearch.cs" /> 105 <Compile Include=" ScatterSearchImprovementOperator.cs" />105 <Compile Include="Knapsack\KnapsackImprovementOperator.cs" /> 106 106 <Compile Include="ScatterSearchMainLoop.cs" /> 107 107 <Compile Include="SolutionPoolUpdateMethod.cs" /> -
branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/Knapsack/NBinaryVectorCrossover.cs
r7740 r7744 71 71 72 72 public sealed override IOperation Apply() { 73 //ChildrenParameter.ActualValue = Cross(RandomParameter.ActualValue, ParentsParameter.ActualValue);74 73 var offspringSolutions = Cross(RandomParameter.ActualValue, ParentsParameter.ActualValue); 75 74 for (int i = 0; i < offspringSolutions.Length; i++) { -
branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/Knapsack/NChildCrossover.cs
r7740 r7744 35 35 [StorableClass] 36 36 public sealed class NChildCrossover : NBinaryVectorCrossover { 37 #region Parameter properties 37 38 public IValueLookupParameter<IntValue> NParameter { 38 39 get { return (IValueLookupParameter<IntValue>)Parameters["N"]; } 39 40 } 41 #endregion 40 42 41 43 [StorableConstructor] … … 44 46 public NChildCrossover() 45 47 : base() { 48 #region Create parameters 46 49 Parameters.Add(new ValueLookupParameter<IntValue>("N", "Number of children.", new IntValue(2))); 50 #endregion 47 51 } 48 52 … … 53 57 public static ItemArray<BinaryVector> Apply(IRandom random, BinaryVector parent1, BinaryVector parent2, IntValue n) { 54 58 if (parent1.Length != parent2.Length) 55 throw new ArgumentException("N PointCrossover: The parents are of different length.");59 throw new ArgumentException("NChildCrossover: The parents are of different length."); 56 60 57 61 if (n.Value > Math.Pow(2, parent1.Length) - 2) 58 throw new ArgumentException("N PointCrossover: There cannot be more breakpoints than the size of the parents.");62 throw new ArgumentException("NChildCrossover: There cannot be more children than 2^size of parents - 2."); 59 63 60 64 if (n.Value < 1) 61 throw new ArgumentException("N PointCrossover: N cannot be < 1.");65 throw new ArgumentException("NChildCrossover: N cannot be < 1."); 62 66 63 67 var solutions = new BinaryVector[n.Value]; -
branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/PopulationRebuildMethod.cs
r7740 r7744 39 39 get { return (ScopeParameter)Parameters["CurrentScope"]; } 40 40 } 41 public IValueLookupParameter<BoolValue> MaximizationParameter { 42 get { return (IValueLookupParameter<BoolValue>)Parameters["Maximization"]; } 43 } 41 44 public IValueLookupParameter<IntValue> NumberOfHighQualitySolutionsParameter { 42 45 get { return (IValueLookupParameter<IntValue>)Parameters["NumberOfHighQualitySolutions"]; } … … 53 56 private IScope CurrentScope { 54 57 get { return CurrentScopeParameter.ActualValue; } 58 } 59 private BoolValue Maximization { 60 get { return MaximizationParameter.ActualValue; } 61 set { MaximizationParameter.ActualValue = value; } 55 62 } 56 63 private IntValue NumberOfHighQualitySolutions { … … 79 86 #region Create parameters 80 87 Parameters.Add(new ScopeParameter("CurrentScope")); 88 Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization")); 81 89 Parameters.Add(new ValueLookupParameter<IntValue>("NumberOfHighQualitySolutions")); 82 90 Parameters.Add(new ValueLookupParameter<IntValue>("ReferenceSetSize")); … … 86 94 87 95 public override IOperation Apply() { 88 var population = CurrentScope.SubScopes[0]; 89 var refSet = CurrentScope.SubScopes[1]; 90 refSet.SubScopes.Replace(refSet.SubScopes.OrderByDescending(r => r.Variables[QualityParameter.ActualName].Value) 91 .Take(NumberOfHighQualitySolutions.Value).ToList()); 92 population.SubScopes.Clear(); 96 var populationScope = CurrentScope.SubScopes[0]; 97 var referenceSetScope = CurrentScope.SubScopes[1]; 98 var orderedReferenceSet = Maximization.Value ? referenceSetScope.SubScopes.OrderByDescending(r => r.Variables[QualityParameter.ActualName].Value) : 99 referenceSetScope.SubScopes.OrderBy(r => r.Variables[QualityParameter.ActualName].Value); 100 referenceSetScope.SubScopes.Replace(orderedReferenceSet.Take(NumberOfHighQualitySolutions.Value).ToList()); 101 populationScope.SubScopes.Clear(); 93 102 return base.Apply(); 94 103 } -
branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/ReferenceSetUpdateMethod.cs
r7740 r7744 46 46 get { return (IValueLookupParameter<IntValue>)Parameters["ReferenceSetSize"]; } 47 47 } 48 public IValueLookupParameter<IItem> QualityParameter { 49 get { return (IValueLookupParameter<IItem>)Parameters["Quality"]; } 48 public IValueLookupParameter<IItem> TargetParameter { 49 get { return (IValueLookupParameter<IItem>)Parameters["Target"]; } 50 } 51 public IValueLookupParameter<DiversityCalculator> DiversityCalculatorParameter { 52 get { return (IValueLookupParameter<DiversityCalculator>)Parameters["DiversityCalculator"]; } 50 53 } 51 54 #endregion … … 61 64 get { return ReferenceSetSizeParameter.ActualValue; } 62 65 } 63 private IItem Quality { 64 get { return QualityParameter.ActualValue; } 66 private IItem Target { 67 get { return TargetParameter.ActualValue; } 68 } 69 private DiversityCalculator DiversityCalculator { 70 get { return DiversityCalculatorParameter.ActualValue; } 65 71 } 66 72 #endregion … … 80 86 Parameters.Add(new ValueLookupParameter<IntValue>("NumberOfHighQualitySolutions")); 81 87 Parameters.Add(new ValueLookupParameter<IntValue>("ReferenceSetSize")); 82 Parameters.Add(new ValueLookupParameter<IItem>("Quality")); 88 Parameters.Add(new ValueLookupParameter<IItem>("Target")); 89 Parameters.Add(new ValueLookupParameter<DiversityCalculator>("DiversityCalculator")); 83 90 #endregion 91 TargetParameter.ActualName = "KnapsackSolution"; // temporary solution for the knapsack problem 84 92 } 85 93 … … 88 96 foreach (var pScope in CurrentScope.SubScopes[0].SubScopes) { 89 97 int diversity = 0; 90 var pSol = pScope.Variables[ QualityParameter.ActualName].Value;98 var pSol = pScope.Variables[TargetParameter.ActualName].Value; 91 99 foreach (var rScope in CurrentScope.SubScopes[1].SubScopes) { 92 var rSol = rScope.Variables[ QualityParameter.ActualName].Value;93 if (pSol != null && rSol != null) diversity += Knapsack.DiversityCalculator.CalculateDiversity(pSol, rSol);100 var rSol = rScope.Variables[TargetParameter.ActualName].Value; 101 diversity += DiversityCalculator.ExecuteCalculation(pSol, rSol); 94 102 } 95 103 population[pScope] = diversity; -
branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/ScatterSearch.cs
r7740 r7744 61 61 get { return (ConstrainedValueParameter<ICrossover>)Parameters["Crossover"]; } 62 62 } 63 public IValueParameter<ILocalImprovementOperator> ImproverParameter { 64 get { return (IValueParameter<ILocalImprovementOperator>)Parameters["Improver"]; } 63 public ConstrainedValueParameter<ILocalImprovementOperator> ImproverParameter { 64 get { return (ConstrainedValueParameter<ILocalImprovementOperator>)Parameters["Improver"]; } 65 } 66 public ConstrainedValueParameter<DiversityCalculator> DiversityCalculatorParameter { 67 get { return (ConstrainedValueParameter<DiversityCalculator>)Parameters["DiversityCalculator"]; } 65 68 } 66 69 public IValueParameter<IntValue> MaximumIterationsParameter { … … 96 99 get { return ImproverParameter.Value; } 97 100 set { ImproverParameter.Value = value; } 101 } 102 private DiversityCalculator DiversityCalculator { 103 get { return DiversityCalculatorParameter.Value; } 104 set { DiversityCalculatorParameter.Value = value; } 98 105 } 99 106 private IntValue MaximumIterations { … … 154 161 Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze the solution and moves.", new MultiAnalyzer())); 155 162 Parameters.Add(new ConstrainedValueParameter<ICrossover>("Crossover", "The operator used to combine solutions.")); 156 Parameters.Add(new ValueParameter<ILocalImprovementOperator>("Improver", "The operator used to improve solutions.", new ScatterSearchImprovementOperator())); 157 Parameters.Add(new ValueParameter<IntValue>("MaximumIterations", "The maximum number of generations which should be processed.", new IntValue(1000))); 158 Parameters.Add(new ValueParameter<IntValue>("NumberOfHighQualitySolutions", "The number of high quality solutions that should be added to the reference set.", new IntValue(5))); 159 Parameters.Add(new ValueParameter<IntValue>("PopulationSize", "The size of the population.", new IntValue(30))); 160 Parameters.Add(new ValueParameter<IntValue>("ReferenceSetSize", "The size of the reference set.", new IntValue(10))); 163 Parameters.Add(new ConstrainedValueParameter<ILocalImprovementOperator>("Improver", "The operator used to improve solutions.")); 164 Parameters.Add(new ConstrainedValueParameter<DiversityCalculator>("DiversityCalculator", "The operator used to calculate the diversity of two solutions.")); 165 Parameters.Add(new ValueParameter<IntValue>("MaximumIterations", "The maximum number of generations which should be processed.", new IntValue(100))); 166 Parameters.Add(new ValueParameter<IntValue>("NumberOfHighQualitySolutions", "The number of high quality solutions that should be added to the reference set.", new IntValue(10))); 167 Parameters.Add(new ValueParameter<IntValue>("PopulationSize", "The size of the population.", new IntValue(300))); 168 Parameters.Add(new ValueParameter<IntValue>("ReferenceSetSize", "The size of the reference set.", new IntValue(100))); 161 169 Parameters.Add(new ValueParameter<IntValue>("Seed", "The random seed used to initialize the new pseudo random number generator.", new IntValue(0))); 162 170 Parameters.Add(new ValueParameter<BoolValue>("SetSeedRandomly", "True if the random seed should be set to a random value, otherwise false.", new BoolValue(true))); … … 241 249 UpdateAnalyzers(); 242 250 UpdateCrossovers(); 251 UpdateDiversityCalculators(); 252 UpdateImprovers(); 253 UpdateDiversityCalculators(); 243 254 Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged); 244 255 base.OnProblemChanged(); … … 261 272 UpdateAnalyzers(); 262 273 UpdateCrossovers(); 274 UpdateDiversityCalculators(); 275 UpdateImprovers(); 263 276 ParameterizeMainLoop(); 264 277 ParameterizeAnalyzers(); … … 307 320 CrossoverParameter.Value = defaultCrossover; 308 321 } 322 private void UpdateDiversityCalculators() { 323 DiversityCalculator oldDiversityCalculator = DiversityCalculatorParameter.Value; 324 DiversityCalculatorParameter.ValidValues.Clear(); 325 DiversityCalculator defaultDiversityCalculator = Problem.Operators.OfType<DiversityCalculator>().FirstOrDefault(); 326 327 DiversityCalculatorParameter.ValidValues.Add(new Knapsack.BinaryVectorDiversityCalculator()); 328 DiversityCalculatorParameter.ValidValues.Add(new TravelingSalesman.PermutationDiversityCalculator()); 329 330 foreach (DiversityCalculator diversityCalculator in Problem.Operators.OfType<DiversityCalculator>().OrderBy(x => x.Name)) 331 DiversityCalculatorParameter.ValidValues.Add(diversityCalculator); 332 333 if (oldDiversityCalculator != null) { 334 DiversityCalculator diversityCalculator = DiversityCalculatorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldDiversityCalculator.GetType()); 335 if (diversityCalculator != null) DiversityCalculatorParameter.Value = diversityCalculator; 336 else oldDiversityCalculator = null; 337 } 338 if (oldDiversityCalculator == null && defaultDiversityCalculator != null) 339 DiversityCalculatorParameter.Value = defaultDiversityCalculator; 340 } 341 private void UpdateImprovers() { 342 ILocalImprovementOperator oldImprover = ImproverParameter.Value; 343 ImproverParameter.ValidValues.Clear(); 344 ILocalImprovementOperator defaultImprover = Problem.Operators.OfType<ILocalImprovementOperator>().FirstOrDefault(); 345 346 ImproverParameter.ValidValues.Add(new Knapsack.KnapsackImprovementOperator()); 347 ImproverParameter.ValidValues.Add(new TravelingSalesman.TravelingSalesmanImprovementOperator()); 348 349 foreach (ILocalImprovementOperator improver in Problem.Operators.OfType<ILocalImprovementOperator>().OrderBy(x => x.Name)) 350 ImproverParameter.ValidValues.Add(improver); 351 352 foreach (var improver in ImproverParameter.ValidValues.OfType<IScatterSearchTargetProcessor>()) 353 improver.TargetParameter.ActualName = "KnapsackSolution"; // temporary solution for the knapsack problem 354 355 if (oldImprover != null) { 356 ILocalImprovementOperator improver = ImproverParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldImprover.GetType()); 357 if (improver != null) ImproverParameter.Value = improver; 358 else oldImprover = null; 359 } 360 if (oldImprover == null && defaultImprover != null) 361 ImproverParameter.Value = defaultImprover; 362 } 309 363 private void ParameterizeSolutionsCreator() { 310 364 SolutionsCreator.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name; … … 325 379 } 326 380 } 381 //private void ParameterizeScatterSearchTargetProcessor(IOperator op) { 382 // if (op is IScatterSearchTargetProcessor) { 383 // IScatterSearchTargetProcessor ssOp = (IScatterSearchTargetProcessor)op; 384 // ssOp.TargetParameter.ActualName = "KnapsackSolution"; // temporary solution for the knapsack problem 385 // ssOp.TargetParameter.Hidden = true; 386 // } 387 //} 327 388 private void ParameterizeAnalyzers() { 328 389 qualityAnalyzer.ResultsParameter.ActualName = "Results"; -
branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/ScatterSearchMainLoop.cs
r7740 r7744 46 46 get { return (IValueLookupParameter<IOperator>)Parameters["Improver"]; } 47 47 } 48 public IValueLookupParameter<DiversityCalculator> DiversityCalculatorParameter { 49 get { return (IValueLookupParameter<DiversityCalculator>)Parameters["DiversityCalculator"]; } 50 } 48 51 public IValueLookupParameter<IntValue> NumberOfHighQualitySolutionsParameter { 49 52 get { return (IValueLookupParameter<IntValue>)Parameters["NumberOfHighQualitySolutions"]; } … … 99 102 get { return ImproverParameter.ActualValue; } 100 103 set { ImproverParameter.ActualValue = value; } 104 } 105 private DiversityCalculator DiversityCalculator { 106 get { return DiversityCalculatorParameter.ActualValue; } 107 set { DiversityCalculatorParameter.ActualValue = value; } 101 108 } 102 109 private IntValue NumberOfHighQualitySolutions { … … 168 175 Parameters.Add(new ValueLookupParameter<ICrossover>("Crossover", "The operator used to combine solutions.")); 169 176 Parameters.Add(new ValueLookupParameter<IOperator>("Improver", "The operator used to improve solutions.")); 177 Parameters.Add(new ValueLookupParameter<DiversityCalculator>("DiversityCalculator", "The operator used to calculate the diversity of two solutions.")); 170 178 Parameters.Add(new ValueLookupParameter<IntValue>("NumberOfHighQualitySolutions", "The number of high quality solutions that should be added to the reference set.")); 171 179 Parameters.Add(new ValueLookupParameter<IntValue>("PopulationSize", "The size of the population.")); -
branches/ScatterSearch/HeuristicLab.Algorithms.ScatterSearch/3.3/SolutionPoolUpdateMethod.cs
r7740 r7744 36 36 [Item("SolutionPoolUpdateMethod", "An operator that updates the solution pool.")] 37 37 [StorableClass] 38 public sealed class SolutionPoolUpdateMethod : SingleSuccessorOperator {38 public sealed class SolutionPoolUpdateMethod : SingleSuccessorOperator, IScatterSearchTargetProcessor { 39 39 #region Parameter properties 40 40 public ScopeParameter CurrentScopeParameter { 41 41 get { return (ScopeParameter)Parameters["CurrentScope"]; } 42 } 43 public IValueLookupParameter<BoolValue> MaximizationParameter { 44 get { return (IValueLookupParameter<BoolValue>)Parameters["Maximization"]; } 42 45 } 43 46 public IValueLookupParameter<BoolValue> NewSolutionsParameter { … … 50 53 get { return (IValueLookupParameter<IItem>)Parameters["Quality"]; } 51 54 } 52 public IValueLookupParameter<IItem> SolutionParameter {53 get { return (IValueLookupParameter<IItem>)Parameters[" Solution"]; }55 public IValueLookupParameter<IItem> TargetParameter { 56 get { return (IValueLookupParameter<IItem>)Parameters["Target"]; } 54 57 } 55 58 #endregion … … 58 61 private IScope CurrentScope { 59 62 get { return CurrentScopeParameter.ActualValue; } 63 } 64 private BoolValue Maximization { 65 get { return MaximizationParameter.ActualValue; } 66 set { MaximizationParameter.ActualValue = value; } 60 67 } 61 68 private BoolValue NewSolutions { … … 68 75 private IItem Quality { 69 76 get { return QualityParameter.ActualValue; } 77 } 78 private IItem Target { 79 get { return TargetParameter.ActualValue; } 70 80 } 71 81 #endregion … … 83 93 #region Create parameters 84 94 Parameters.Add(new ScopeParameter("CurrentScope")); 95 Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization")); 85 96 Parameters.Add(new ValueLookupParameter<BoolValue>("NewSolutions")); 86 97 Parameters.Add(new ValueLookupParameter<IntValue>("ReferenceSetSize")); 87 98 Parameters.Add(new ValueLookupParameter<IItem>("Quality")); 88 Parameters.Add(new ValueLookupParameter<IItem>(" Solution"));99 Parameters.Add(new ValueLookupParameter<IItem>("Target")); 89 100 #endregion 90 SolutionParameter.ActualName = "KnapsackSolution"; // temporary solution for the knapsack problem101 TargetParameter.ActualName = "KnapsackSolution"; // temporary solution for the knapsack problem 91 102 } 92 103 93 104 public override IOperation Apply() { 94 IScope parents = new Scope("Parents"); 95 IScope offspring = new Scope("Offspring"); 105 var parentsScope = new Scope("Parents"); 106 var offspringScope = new Scope("Offspring"); 107 108 // split parents and offspring 96 109 foreach (var scope in CurrentScope.SubScopes) { 97 parents .SubScopes.AddRange(scope.SubScopes.Take(scope.SubScopes.Count - 1));98 offspring .SubScopes.AddRange(scope.SubScopes.Last().SubScopes);110 parentsScope.SubScopes.AddRange(scope.SubScopes.Take(scope.SubScopes.Count - 1)); 111 offspringScope.SubScopes.AddRange(scope.SubScopes.Last().SubScopes); 99 112 } 113 100 114 CurrentScope.SubScopes.Clear(); 101 CurrentScope.SubScopes.AddRange(parents.SubScopes.OrderByDescending(o => o.Variables[QualityParameter.ActualName].Value)); 102 if ((offspring.SubScopes.OrderByDescending(o => o.Variables[QualityParameter.ActualName].Value).First().Variables[QualityParameter.ActualName].Value as DoubleValue).Value 103 > (parents.SubScopes.OrderByDescending(o => o.Variables[QualityParameter.ActualName].Value).Last().Variables[QualityParameter.ActualName].Value as DoubleValue).Value) { 104 CurrentScope.SubScopes.Replace(parents.SubScopes.Concat(offspring.SubScopes.Distinct(new KeyEqualityComparer<IScope>(x => x.Variables[SolutionParameter.ActualName].Value.ToString()))).OrderByDescending(o => o.Variables[QualityParameter.ActualName].Value).Take(ReferenceSetSize.Value)); 105 NewSolutions.Value = true; 115 116 var orderedParents = Maximization.Value ? parentsScope.SubScopes.OrderByDescending(x => x.Variables[QualityParameter.ActualName].Value) : 117 parentsScope.SubScopes.OrderBy(x => x.Variables[QualityParameter.ActualName].Value); 118 var orderedOffspring = Maximization.Value ? offspringScope.SubScopes.OrderByDescending(x => x.Variables[QualityParameter.ActualName].Value) : 119 offspringScope.SubScopes.OrderBy(x => x.Variables[QualityParameter.ActualName].Value); 120 121 CurrentScope.SubScopes.AddRange(orderedParents); 122 123 var worstParentQuality = (orderedParents.Last().Variables[QualityParameter.ActualName].Value as DoubleValue).Value; 124 125 var Constraint = Maximization.Value ? (Func<IScope, bool>)(x => { return (x.Variables[QualityParameter.ActualName].Value as DoubleValue).Value > worstParentQuality; }) : 126 (Func<IScope, bool>)(x => { return (x.Variables[QualityParameter.ActualName].Value as DoubleValue).Value < worstParentQuality; }); 127 128 // is there any offspring better than the worst parent? 129 if (orderedOffspring.Any(Constraint)) { 130 // produce the set union 131 // attention: distinction might cause a too small reference set! (e.g. reference set = {1, 2, 2, 2, ..., 2} -> union = {1, 2} 132 var union = orderedParents.Union(orderedOffspring.Where(Constraint), new KeyEqualityComparer<IScope>(x => x.Variables[TargetParameter.ActualName].Value.ToString())); 133 if (union.Count() > orderedParents./*Distinct(new KeyEqualityComparer<IScope>(x => x.Variables[TargetParameter.ActualName].Value.ToString())).*/Count()) { 134 var orderedUnion = Maximization.Value ? union.OrderByDescending(x => x.Variables[QualityParameter.ActualName].Value) : 135 union.OrderBy(x => x.Variables[QualityParameter.ActualName].Value); 136 CurrentScope.SubScopes.Replace(orderedUnion.Take(ReferenceSetSize.Value).ToList()); 137 NewSolutions.Value = true; 138 } 106 139 } 107 140
Note: See TracChangeset
for help on using the changeset viewer.