- Timestamp:
- 01/21/11 23:31:09 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearchMainLoop.cs
r4807 r5353 116 116 Placeholder analyzer1 = new Placeholder(); 117 117 ResultsCollector resultsCollector1 = new ResultsCollector(); 118 ResultsCollector resultsCollector2 = new ResultsCollector();119 118 SubScopesProcessor mainProcessor = new SubScopesProcessor(); 120 119 Placeholder moveGenerator = new Placeholder(); 121 120 UniformSubScopesProcessor moveEvaluationProcessor = new UniformSubScopesProcessor(); 122 121 Placeholder moveEvaluator = new Placeholder(); 123 IntCounter evaluatedMovesCounter = new IntCounter();122 SubScopesCounter subScopesCounter = new SubScopesCounter(); 124 123 BestSelector bestSelector = new BestSelector(); 125 124 SubScopesProcessor moveMakingProcessor = new SubScopesProcessor(); … … 134 133 IntCounter iterationsCounter = new IntCounter(); 135 134 Comparator iterationsComparator = new Comparator(); 136 ResultsCollector resultsCollector3 = new ResultsCollector();137 135 ConditionalBranch iterationsTermination = new ConditionalBranch(); 138 136 … … 151 149 resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Iterations")); 152 150 resultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality")); 151 resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Moves", null, "EvaluatedMoves")); 153 152 resultsCollector1.ResultsParameter.ActualName = ResultsParameter.Name; 154 155 resultsCollector2.CopyValue = new BoolValue(true);156 resultsCollector2.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Moves", null, "EvaluatedMoves"));157 resultsCollector2.ResultsParameter.ActualName = ResultsParameter.Name;158 153 159 154 moveGenerator.Name = "MoveGenerator (placeholder)"; 160 155 moveGenerator.OperatorParameter.ActualName = MoveGeneratorParameter.Name; 161 156 157 moveEvaluationProcessor.Parallel = new BoolValue(true); 158 162 159 moveEvaluator.Name = "MoveEvaluator (placeholder)"; 163 160 moveEvaluator.OperatorParameter.ActualName = MoveEvaluatorParameter.Name; 164 161 165 evaluatedMovesCounter.Name = "EvaluatedMoves + 1"; 166 evaluatedMovesCounter.ValueParameter.ActualName = "EvaluatedMoves"; 167 evaluatedMovesCounter.Increment = new IntValue(1); 162 subScopesCounter.Name = "Increment EvaluatedMoves"; 163 subScopesCounter.ValueParameter.ActualName = "EvaluatedMoves"; 168 164 169 165 bestSelector.CopySelected = new BoolValue(false); … … 199 195 iterationsComparator.RightSideParameter.ActualName = MaximumIterationsParameter.Name; 200 196 iterationsComparator.ResultParameter.ActualName = "Terminate"; 201 202 resultsCollector3.CopyValue = new BoolValue(true);203 resultsCollector3.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Moves", null, "EvaluatedMoves"));204 resultsCollector3.ResultsParameter.ActualName = ResultsParameter.Name;205 197 206 198 iterationsTermination.Name = "Iterations Termination Condition"; … … 215 207 bestQualityInitializer.Successor = analyzer1; 216 208 analyzer1.Successor = null; 217 resultsCollector1.Successor = resultsCollector2; 218 resultsCollector2.Successor = mainProcessor; 209 resultsCollector1.Successor = mainProcessor; 219 210 mainProcessor.Operators.Add(moveGenerator); 220 211 mainProcessor.Successor = iterationsCounter; 221 212 moveGenerator.Successor = moveEvaluationProcessor; 222 213 moveEvaluationProcessor.Operator = moveEvaluator; 223 moveEvaluationProcessor.Successor = bestSelector;224 moveEvaluator.Successor = evaluatedMovesCounter;225 evaluatedMovesCounter.Successor = null;214 moveEvaluationProcessor.Successor = subScopesCounter; 215 moveEvaluator.Successor = null; 216 subScopesCounter.Successor = bestSelector; 226 217 bestSelector.Successor = moveMakingProcessor; 227 218 moveMakingProcessor.Operators.Add(new EmptyOperator()); … … 239 230 subScopesRemover.Successor = null; 240 231 iterationsCounter.Successor = iterationsComparator; 241 iterationsComparator.Successor = resultsCollector3; 242 resultsCollector3.Successor = iterationsTermination; 232 iterationsComparator.Successor = iterationsTermination; 243 233 iterationsTermination.TrueBranch = null; 244 234 iterationsTermination.FalseBranch = mainProcessor;
Note: See TracChangeset
for help on using the changeset viewer.