- Timestamp:
- 06/04/12 16:48:59 (12 years ago)
- Location:
- branches/ScatterSearch (trunk integration)/HeuristicLab.Algorithms.ScatterSearch/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ScatterSearch (trunk integration)/HeuristicLab.Algorithms.ScatterSearch/3.3/ScatterSearch.cs
r7789 r7954 194 194 Placeholder solutionEvaluator = new Placeholder(); 195 195 Placeholder solutionImprover = new Placeholder(); 196 SubScopesCounter subScopesCounter = new SubScopesCounter(); 197 ResultsCollector resultsCollector = new ResultsCollector(); 196 198 BestSelector bestSelector = new BestSelector(); 197 199 ScatterSearchMainLoop mainLoop = new ScatterSearchMainLoop(); … … 210 212 211 213 uniformSubScopesProcessor.Operator = solutionImprover; 212 uniformSubScopesProcessor.Successor = bestSelector;214 uniformSubScopesProcessor.Successor = subScopesCounter; 213 215 214 216 solutionImprover.Name = "SolutionImprover"; … … 219 221 solutionEvaluator.OperatorParameter.ActualName = "Evaluator"; 220 222 solutionEvaluator.Successor = null; 223 224 subScopesCounter.Name = "Initialize EvaluatedSolutions"; 225 subScopesCounter.ValueParameter.ActualName = "EvaluatedSolutions"; 226 subScopesCounter.Successor = resultsCollector; 227 228 resultsCollector.Name = "ResultsCollector"; 229 resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("EvaluatedSolutions", null, "EvaluatedSolutions")); 230 resultsCollector.Successor = bestSelector; 221 231 222 232 bestSelector.NumberOfSelectedSubScopesParameter.ActualName = NumberOfHighQualitySolutionsParameter.Name; -
branches/ScatterSearch (trunk integration)/HeuristicLab.Algorithms.ScatterSearch/3.3/ScatterSearchMainLoop.cs
r7789 r7954 47 47 get { return (IValueLookupParameter<ICrossover>)Parameters["Crossover"]; } 48 48 } 49 public IValueLookupParameter<IntValue> EvaluatedSolutionsParameter { 50 get { return (IValueLookupParameter<IntValue>)Parameters["EvaluatedSolutions"]; } 51 } 49 52 public IValueLookupParameter<IEvaluator> EvaluatorParameter { 50 53 get { return (IValueLookupParameter<IEvaluator>)Parameters["Evaluator"]; } … … 109 112 get { return CrossoverParameter.ActualValue; } 110 113 set { CrossoverParameter.ActualValue = value; } 114 } 115 private IntValue EvaluatedSolutions { 116 get { return EvaluatedSolutionsParameter.ActualValue; } 117 set { EvaluatedSolutionsParameter.ActualValue = value; } 111 118 } 112 119 private IEvaluator Evaluator { … … 190 197 Parameters.Add(new ValueLookupParameter<DoubleValue>("BestKnownQuality")); 191 198 Parameters.Add(new ValueLookupParameter<ICrossover>("Crossover")); 199 Parameters.Add(new ValueLookupParameter<IntValue>("EvaluatedSolutions")); 192 200 Parameters.Add(new ValueLookupParameter<IEvaluator>("Evaluator")); 193 201 Parameters.Add(new ValueLookupParameter<BoolValue>("ExecutePathRelinking")); … … 231 239 SolutionPoolUpdateMethod solutionPoolUpdateMethod = new SolutionPoolUpdateMethod(); 232 240 SolutionsCreator solutionsCreator = new SolutionsCreator(); 241 SubScopesCounter subScopesCounter1 = new SubScopesCounter(); 242 SubScopesCounter subScopesCounter2 = new SubScopesCounter(); 233 243 SubScopesProcessor subScopesProcessor1 = new SubScopesProcessor(); 234 244 SubScopesProcessor subScopesProcessor2 = new SubScopesProcessor(); … … 316 326 uniformSubScopesProcessor2.DepthParameter.Value = new IntValue(2); 317 327 uniformSubScopesProcessor2.Operator = solutionImprover1; 328 uniformSubScopesProcessor2.Successor = subScopesCounter1; 318 329 319 330 solutionImprover1.Name = "SolutionImprover"; … … 323 334 solutionEvaluator1.Name = "SolutionEvaluator"; 324 335 solutionEvaluator1.OperatorParameter.ActualName = "Evaluator"; 336 337 subScopesCounter1.Name = "Increment EvaluatedSolutions"; 338 subScopesCounter1.ValueParameter.ActualName = EvaluatedSolutionsParameter.Name; 325 339 326 340 solutionPoolUpdateMethod.QualityParameter.ActualName = QualityParameter.ActualName; … … 350 364 uniformSubScopesProcessor3.DepthParameter.Value = new IntValue(1); 351 365 uniformSubScopesProcessor3.Operator = solutionImprover2; 366 uniformSubScopesProcessor3.Successor = subScopesCounter2; 352 367 353 368 solutionImprover2.Name = "SolutionImprover"; … … 357 372 solutionEvaluator2.Name = "SolutionEvaluator"; 358 373 solutionEvaluator2.OperatorParameter.ActualName = "Evaluator"; 374 375 subScopesCounter2.Name = "Increment EvaluatedSolutions"; 376 subScopesCounter2.ValueParameter.ActualName = EvaluatedSolutionsParameter.Name; 359 377 360 378 iterationsCounter.Name = "IterationCounter";
Note: See TracChangeset
for help on using the changeset viewer.