Changeset 5356 for trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealing.cs
- Timestamp:
- 01/22/11 15:18:20 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealing.cs
r4722 r5356 27 27 using HeuristicLab.Core; 28 28 using HeuristicLab.Data; 29 using HeuristicLab.Operators; 29 30 using HeuristicLab.Optimization; 30 31 using HeuristicLab.Optimization.Operators; … … 135 136 } 136 137 private SimulatedAnnealingMainLoop MainLoop { 137 get { return (SimulatedAnnealingMainLoop)SolutionsCreator.Successor; } 138 get { 139 return (SimulatedAnnealingMainLoop)( 140 (ResultsCollector)( 141 (VariableCreator)SolutionsCreator.Successor 142 ).Successor 143 ).Successor; 144 } 138 145 } 139 146 [Storable] … … 171 178 RandomCreator randomCreator = new RandomCreator(); 172 179 SolutionsCreator solutionsCreator = new SolutionsCreator(); 180 VariableCreator variableCreator = new VariableCreator(); 181 ResultsCollector resultsCollector = new ResultsCollector(); 173 182 SimulatedAnnealingMainLoop mainLoop = new SimulatedAnnealingMainLoop(); 174 183 OperatorGraph.InitialOperator = randomCreator; … … 182 191 183 192 solutionsCreator.NumberOfSolutions = new IntValue(1); 184 solutionsCreator.Successor = mainLoop; 193 solutionsCreator.Successor = variableCreator; 194 195 variableCreator.Name = "Initialize EvaluatedMoves"; 196 variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("EvaluatedMoves", new IntValue())); 197 variableCreator.Successor = resultsCollector; 198 199 resultsCollector.CollectedValues.Add(new LookupParameter<IntValue>("Evaluated Moves", null, "EvaluatedMoves")); 200 resultsCollector.ResultsParameter.ActualName = "Results"; 201 resultsCollector.Successor = mainLoop; 185 202 186 203 mainLoop.MoveGeneratorParameter.ActualName = MoveGeneratorParameter.Name; … … 194 211 mainLoop.ResultsParameter.ActualName = "Results"; 195 212 mainLoop.AnalyzerParameter.ActualName = AnalyzerParameter.Name; 213 mainLoop.EvaluatedMovesParameter.ActualName = "EvaluatedMoves"; 196 214 197 215 foreach (IDiscreteDoubleValueModifier op in ApplicationManager.Manager.GetInstances<IDiscreteDoubleValueModifier>().OrderBy(x => x.Name))
Note: See TracChangeset
for help on using the changeset viewer.