Changeset 3679
- Timestamp:
- 05/06/10 17:23:31 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearchMainLoop.cs
r3636 r3679 115 115 Placeholder analyzer1 = new Placeholder(); 116 116 ResultsCollector resultsCollector1 = new ResultsCollector(); 117 ResultsCollector resultsCollector2 = new ResultsCollector(); 117 118 SubScopesProcessor mainProcessor = new SubScopesProcessor(); 118 119 Placeholder moveGenerator = new Placeholder(); … … 133 134 SubScopesProcessor subScopesProcessor1 = new SubScopesProcessor(); 134 135 Placeholder analyzer2 = new Placeholder(); 135 ResultsCollector resultsCollector 2= new ResultsCollector();136 ResultsCollector resultsCollector3 = new ResultsCollector(); 136 137 ConditionalBranch iterationsTermination = new ConditionalBranch(); 137 138 … … 147 148 analyzer1.OperatorParameter.ActualName = AnalyzerParameter.Name; 148 149 150 resultsCollector1.CopyValue = new BoolValue(false); 149 151 resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Iterations")); 150 152 resultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality")); 151 resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Moves", null, "EvaluatedMoves"));152 153 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; 153 158 154 159 moveGenerator.Name = "MoveGenerator (placeholder)"; … … 198 203 analyzer2.OperatorParameter.ActualName = AnalyzerParameter.Name; 199 204 200 resultsCollector2.CollectedValues.Add(new LookupParameter<IntValue>("Iterations")); 201 resultsCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality")); 202 resultsCollector2.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Moves", null, "EvaluatedMoves")); 203 resultsCollector2.ResultsParameter.ActualName = ResultsParameter.Name; 205 resultsCollector3.CopyValue = new BoolValue(true); 206 resultsCollector3.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Moves", null, "EvaluatedMoves")); 207 resultsCollector3.ResultsParameter.ActualName = ResultsParameter.Name; 204 208 205 209 iterationsTermination.Name = "Iterations Termination Condition"; … … 214 218 bestQualityInitializer.Successor = analyzer1; 215 219 analyzer1.Successor = null; 216 resultsCollector1.Successor = mainProcessor; 220 resultsCollector1.Successor = resultsCollector2; 221 resultsCollector2.Successor = mainProcessor; 217 222 mainProcessor.Operators.Add(moveGenerator); 218 223 mainProcessor.Successor = iterationsCounter; … … 237 242 iterationsComparator.Successor = subScopesProcessor1; 238 243 subScopesProcessor1.Operators.Add(analyzer2); 239 subScopesProcessor1.Successor = resultsCollector 2;244 subScopesProcessor1.Successor = resultsCollector3; 240 245 analyzer2.Successor = null; 241 resultsCollector 2.Successor = iterationsTermination;246 resultsCollector3.Successor = iterationsTermination; 242 247 iterationsTermination.TrueBranch = null; 243 248 iterationsTermination.FalseBranch = mainProcessor; -
trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearchMainLoop.cs
r3636 r3679 123 123 Placeholder analyzer1 = new Placeholder(); 124 124 ResultsCollector resultsCollector1 = new ResultsCollector(); 125 ResultsCollector resultsCollector2 = new ResultsCollector(); 125 126 SubScopesProcessor solutionProcessor = new SubScopesProcessor(); 126 127 Placeholder moveGenerator = new Placeholder(); … … 144 145 SubScopesProcessor subScopesProcessor1 = new SubScopesProcessor(); 145 146 Placeholder analyzer2 = new Placeholder(); 146 ResultsCollector resultsCollector 2= new ResultsCollector();147 ResultsCollector resultsCollector3 = new ResultsCollector(); 147 148 ConditionalBranch iterationsTermination = new ConditionalBranch(); 148 149 … … 159 160 analyzer1.Name = "Analyzer (placeholder)"; 160 161 analyzer1.OperatorParameter.ActualName = AnalyzerParameter.Name; 161 162 163 resultsCollector1.CopyValue = new BoolValue(false); 162 164 resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Iterations")); 163 165 resultsCollector1.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality")); 164 resultsCollector1.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Moves", null, "EvaluatedMoves"));165 166 resultsCollector1.ResultsParameter.ActualName = ResultsParameter.Name; 167 168 resultsCollector2.CopyValue = new BoolValue(true); 169 resultsCollector2.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Moves", null, "EvaluatedMoves")); 170 resultsCollector2.ResultsParameter.ActualName = ResultsParameter.Name; 166 171 167 172 moveGenerator.Name = "MoveGenerator (placeholder)"; … … 222 227 analyzer2.Name = "Analyzer (placeholder)"; 223 228 analyzer2.OperatorParameter.ActualName = AnalyzerParameter.Name; 224 225 resultsCollector2.CollectedValues.Add(new LookupParameter<IntValue>("Iterations")); 226 resultsCollector2.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality")); 227 resultsCollector2.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Moves", null, "EvaluatedMoves")); 228 resultsCollector2.ResultsParameter.ActualName = ResultsParameter.Name; 229 230 resultsCollector3.CopyValue = new BoolValue(true); 231 resultsCollector3.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Moves", null, "EvaluatedMoves")); 232 resultsCollector3.ResultsParameter.ActualName = ResultsParameter.Name; 229 233 230 234 emptyNeighborhoodBranch2.Name = "Neighborhood empty?"; … … 240 244 subScopesProcessor0.Operators.Add(bestQualityInitializer); 241 245 subScopesProcessor0.Successor = resultsCollector1; 242 resultsCollector1.Successor = solutionProcessor; 246 resultsCollector1.Successor = resultsCollector2; 247 resultsCollector2.Successor = solutionProcessor; 243 248 solutionProcessor.Operators.Add(moveGenerator); 244 249 solutionProcessor.Successor = iterationsCounter; … … 264 269 iterationsComparator.Successor = subScopesProcessor1; 265 270 subScopesProcessor1.Operators.Add(analyzer2); 266 subScopesProcessor1.Successor = resultsCollector 2;267 resultsCollector 2.Successor = emptyNeighborhoodBranch2;271 subScopesProcessor1.Successor = resultsCollector3; 272 resultsCollector3.Successor = emptyNeighborhoodBranch2; 268 273 emptyNeighborhoodBranch2.TrueBranch = null; 269 274 emptyNeighborhoodBranch2.FalseBranch = iterationsTermination;
Note: See TracChangeset
for help on using the changeset viewer.