- Timestamp:
- 02/24/11 19:22:39 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs
r5560 r5561 114 114 private ParticleSwarmOptimizationMainLoop mainLoop; 115 115 116 [Storable] 117 private CombinedOperator swarmUpdater; 118 116 119 public ITopologyInitializer TopologyInitializer { 117 120 get { return TopologyInitializerParameter.Value; } … … 141 144 qualityAnalyzer = cloner.Clone(original.qualityAnalyzer); 142 145 solutionsCreator = cloner.Clone(original.solutionsCreator); 143 mainLoop = cloner.Clone(original.mainLoop); 146 mainLoop = cloner.Clone(original.mainLoop); 147 swarmUpdater = cloner.Clone(original.swarmUpdater); 144 148 Initialize(); 145 149 } … … 166 170 ResultsCollector resultsCollector = new ResultsCollector(); 167 171 Placeholder analyzerPlaceholder = new Placeholder(); 168 RealVectorSwarmUpdater swarmUpdater = new RealVectorSwarmUpdater();172 swarmUpdater = new CombinedOperator(); 169 173 mainLoop = new ParticleSwarmOptimizationMainLoop(); 170 174 … … 206 210 mainLoop.RandomParameter.ActualName = randomCreator.RandomParameter.ActualName; 207 211 mainLoop.ResultsParameter.ActualName = "Results"; 208 mainLoop.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;209 212 // mainLoop.EvaluatedMovesParameter.ActualName = "EvaluatedMoves"; 210 213 … … 212 215 ////InitVelocityBoundsUpdater(); 213 216 InitializeParticleCreator(); 217 InitializeSwarmUpdater(); 214 218 ParameterizeSolutionsCreator(); 215 219 UpdateAnalyzers(); … … 252 256 UpdateTopologyParameters(); 253 257 InitializeParticleCreator(); 258 InitializeSwarmUpdater(); 254 259 ParameterizeSolutionsCreator(); 255 260 base.OnProblemChanged(); … … 395 400 396 401 private void ParameterizeMainLoop() { 397 mainLoop.MaxIterationsParameter.ActualName = MaxIterationsParameter.Name; 402 if (Problem != null) { 403 mainLoop.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name; 404 } 405 } 406 407 private void InitializeSwarmUpdater() { 408 if (Problem != null) { 409 ISwarmUpdater updater = Problem.Operators.OfType<ISwarmUpdater>().FirstOrDefault(); 410 swarmUpdater.OperatorGraph.InitialOperator = updater; 411 } 398 412 } 399 413 #endregion
Note: See TracChangeset
for help on using the changeset viewer.