- Timestamp:
- 01/22/11 00:12:47 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearchMainLoop.cs
r5162 r5354 139 139 Placeholder analyzer1 = new Placeholder(); 140 140 ResultsCollector resultsCollector1 = new ResultsCollector(); 141 ResultsCollector resultsCollector2 = new ResultsCollector();142 141 SubScopesProcessor solutionProcessor = new SubScopesProcessor(); 143 142 Placeholder moveGenerator = new Placeholder(); 144 143 UniformSubScopesProcessor moveEvaluationProcessor = new UniformSubScopesProcessor(); 145 144 Placeholder moveEvaluator = new Placeholder(); 146 IntCounter evaluatedMovesCounter = new IntCounter();147 145 Placeholder tabuChecker = new Placeholder(); 146 SubScopesCounter subScopesCounter = new SubScopesCounter(); 148 147 SubScopesSorter moveQualitySorter = new SubScopesSorter(); 149 148 TabuSelector tabuSelector = new TabuSelector(); … … 160 159 IntCounter iterationsCounter = new IntCounter(); 161 160 Comparator iterationsComparator = new Comparator(); 162 ResultsCollector resultsCollector3 = new ResultsCollector();163 161 ConditionalBranch iterationsTermination = new ConditionalBranch(); 164 162 … … 180 178 resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Iterations")); 181 179 resultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality")); 180 resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Moves", null, "EvaluatedMoves")); 182 181 resultsCollector1.ResultsParameter.ActualName = ResultsParameter.Name; 183 184 resultsCollector2.CopyValue = new BoolValue(true);185 resultsCollector2.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Moves", null, "EvaluatedMoves"));186 resultsCollector2.ResultsParameter.ActualName = ResultsParameter.Name;187 182 188 183 moveGenerator.Name = "MoveGenerator (placeholder)"; 189 184 moveGenerator.OperatorParameter.ActualName = MoveGeneratorParameter.Name; 190 185 186 moveEvaluationProcessor.Parallel = new BoolValue(true); 187 191 188 moveEvaluator.Name = "MoveEvaluator (placeholder)"; 192 189 moveEvaluator.OperatorParameter.ActualName = MoveEvaluatorParameter.Name; 193 190 194 evaluatedMovesCounter.Name = "EvaluatedMoves + 1";195 evaluatedMovesCounter.ValueParameter.ActualName = "EvaluatedMoves";196 evaluatedMovesCounter.Increment = new IntValue(1);197 198 191 tabuChecker.Name = "TabuChecker (placeholder)"; 199 192 tabuChecker.OperatorParameter.ActualName = TabuCheckerParameter.Name; 193 194 subScopesCounter.Name = "Increment EvaluatedMoves"; 195 subScopesCounter.ValueParameter.ActualName = "EvaluatedMoves"; 200 196 201 197 moveQualitySorter.DescendingParameter.ActualName = MaximizationParameter.Name; … … 241 237 iterationsComparator.ResultParameter.ActualName = "Terminate"; 242 238 243 resultsCollector3.CopyValue = new BoolValue(true);244 resultsCollector3.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Moves", null, "EvaluatedMoves"));245 resultsCollector3.ResultsParameter.ActualName = ResultsParameter.Name;246 247 239 emptyNeighborhoodBranch2.Name = "Neighborhood empty?"; 248 240 emptyNeighborhoodBranch2.ConditionParameter.ActualName = "EmptyNeighborhood"; … … 259 251 bestQualityInitializer.Successor = analyzer1; 260 252 analyzer1.Successor = null; 261 resultsCollector1.Successor = resultsCollector2; 262 resultsCollector2.Successor = solutionProcessor; 253 resultsCollector1.Successor = solutionProcessor; 263 254 solutionProcessor.Operators.Add(moveGenerator); 264 255 solutionProcessor.Successor = iterationsCounter; 265 256 moveGenerator.Successor = moveEvaluationProcessor; 266 257 moveEvaluationProcessor.Operator = moveEvaluator; 267 moveEvaluationProcessor.Successor = moveQualitySorter; 268 moveEvaluator.Successor = evaluatedMovesCounter; 269 evaluatedMovesCounter.Successor = tabuChecker; 258 moveEvaluationProcessor.Successor = subScopesCounter; 259 moveEvaluator.Successor = tabuChecker; 270 260 tabuChecker.Successor = null; 261 subScopesCounter.Successor = moveQualitySorter; 271 262 moveQualitySorter.Successor = tabuSelector; 272 263 tabuSelector.Successor = emptyNeighborhoodBranch1; … … 285 276 subScopesRemover.Successor = null; 286 277 iterationsCounter.Successor = iterationsComparator; 287 iterationsComparator.Successor = resultsCollector3; 288 resultsCollector3.Successor = emptyNeighborhoodBranch2; 278 iterationsComparator.Successor = emptyNeighborhoodBranch2; 289 279 emptyNeighborhoodBranch2.TrueBranch = null; 290 280 emptyNeighborhoodBranch2.FalseBranch = iterationsTermination;
Note: See TracChangeset
for help on using the changeset viewer.