Changeset 3662
- Timestamp:
- 05/06/10 02:46:37 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 added
- 6 deleted
- 20 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithm.cs
r3658 r3662 140 140 get { return selectors; } 141 141 } 142 private PopulationBestAverageWorstQualityAnalyzer qualityAnalyzer;142 private BestAverageWorstQualityAnalyzer qualityAnalyzer; 143 143 #endregion 144 144 … … 291 291 } 292 292 private void InitializeAnalyzers() { 293 qualityAnalyzer = new PopulationBestAverageWorstQualityAnalyzer();293 qualityAnalyzer = new BestAverageWorstQualityAnalyzer(); 294 294 ParameterizeAnalyzers(); 295 295 } … … 312 312 qualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name; 313 313 qualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName; 314 qualityAnalyzer.QualityParameter.Depth = 1; 314 315 qualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name; 315 316 } … … 353 354 Analyzer.Operators.Add(qualityAnalyzer); 354 355 if (Problem != null) { 355 foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>().OrderBy(x => x.Name)) 356 foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>().OrderBy(x => x.Name)) { 356 357 Analyzer.Operators.Add(analyzer); 358 } 357 359 } 358 360 } -
trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/IslandGeneticAlgorithm.cs
r3658 r3662 204 204 get { return (IslandGeneticAlgorithmMainLoop)IslandProcessor.Successor; } 205 205 } 206 private PopulationBestAverageWorstQualityAnalyzer islandQualityAnalyzer;206 private BestAverageWorstQualityAnalyzer islandQualityAnalyzer; 207 207 //private MultipopulationBestAverageWorstQualityAnalyzer qualityAnalyzer; 208 208 #endregion … … 398 398 } 399 399 private void InitializeAnalyzers() { 400 islandQualityAnalyzer = new PopulationBestAverageWorstQualityAnalyzer();400 islandQualityAnalyzer = new BestAverageWorstQualityAnalyzer(); 401 401 //qualityAnalyzer = new MultipopulationBestAverageWorstQualityAnalyzer(); 402 402 ParameterizeAnalyzers(); -
trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearch.cs
r3658 r3662 126 126 get { return (LocalSearchMainLoop)SolutionsCreator.Successor; } 127 127 } 128 private PopulationBestAverageWorstQualityAnalyzer moveQualityAnalyzer;128 private BestAverageWorstQualityAnalyzer moveQualityAnalyzer; 129 129 #endregion 130 130 … … 269 269 } 270 270 private void InitializeAnalyzers() { 271 moveQualityAnalyzer = new PopulationBestAverageWorstQualityAnalyzer();271 moveQualityAnalyzer = new BestAverageWorstQualityAnalyzer(); 272 272 ParameterizeAnalyzers(); 273 273 } -
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/IslandOffspringSelectionGeneticAlgorithm.cs
r3658 r3662 246 246 get { return (IslandOffspringSelectionGeneticAlgorithmMainLoop)IslandProcessor.Successor; } 247 247 } 248 private PopulationBestAverageWorstQualityAnalyzer islandQualityAnalyzer;248 private BestAverageWorstQualityAnalyzer islandQualityAnalyzer; 249 249 //private MultipopulationBestAverageWorstQualityAnalyzer qualityAnalyzer; 250 250 #endregion … … 471 471 } 472 472 private void InitializeAnalyzers() { 473 islandQualityAnalyzer = new PopulationBestAverageWorstQualityAnalyzer();473 islandQualityAnalyzer = new BestAverageWorstQualityAnalyzer(); 474 474 //qualityAnalyzer = new MultipopulationBestAverageWorstQualityAnalyzer(); 475 475 ParameterizeAnalyzers(); -
trunk/sources/HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm/3.3/SASEGASA.cs
r3658 r3662 223 223 get { return (SASEGASAMainLoop)VillageProcessor.Successor; } 224 224 } 225 private PopulationBestAverageWorstQualityAnalyzer villageQualityAnalyzer;225 private BestAverageWorstQualityAnalyzer villageQualityAnalyzer; 226 226 //private MultipopulationBestAverageWorstQualityAnalyzer qualityAnalyzer; 227 227 #endregion … … 429 429 } 430 430 private void InitializeAnalyzers() { 431 villageQualityAnalyzer = new PopulationBestAverageWorstQualityAnalyzer();431 villageQualityAnalyzer = new BestAverageWorstQualityAnalyzer(); 432 432 //qualityAnalyzer = new MultipopulationBestAverageWorstQualityAnalyzer(); 433 433 ParameterizeAnalyzers(); -
trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealing.cs
r3658 r3662 141 141 get { return annealingOperators; } 142 142 } 143 private SolutionQualityAnalyzer qualityAnalyzer;143 private QualityAnalyzer qualityAnalyzer; 144 144 #endregion 145 145 … … 297 297 } 298 298 private void InitializeAnalyzers() { 299 qualityAnalyzer = new SolutionQualityAnalyzer();299 qualityAnalyzer = new QualityAnalyzer(); 300 300 ParameterizeAnalyzers(); 301 301 } … … 320 320 qualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name; 321 321 qualityAnalyzer.QualityParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName; 322 qualityAnalyzer.QualityParameter.Depth = 0; 322 323 qualityAnalyzer.BestKnownQualityParameter.ActualName = Problem.BestKnownQualityParameter.Name; 323 324 } -
trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearch.cs
r3658 r3662 143 143 get { return (TabuSearchMainLoop)SolutionsCreator.Successor; } 144 144 } 145 private PopulationBestAverageWorstQualityAnalyzer moveQualityAnalyzer;145 private BestAverageWorstQualityAnalyzer moveQualityAnalyzer; 146 146 private TabuNeighborhoodAnalyzer tabuNeighborhoodAnalyzer; 147 147 #endregion … … 327 327 } 328 328 private void InitializeAnalyzers() { 329 moveQualityAnalyzer = new PopulationBestAverageWorstQualityAnalyzer();329 moveQualityAnalyzer = new BestAverageWorstQualityAnalyzer(); 330 330 tabuNeighborhoodAnalyzer = new TabuNeighborhoodAnalyzer(); 331 331 ParameterizeAnalyzers(); -
trunk/sources/HeuristicLab.Analysis/3.3/BestAverageWorstQualityAnalyzer.cs
r3659 r3662 20 20 #endregion 21 21 22 using System; 23 using HeuristicLab.Common; 22 24 using HeuristicLab.Core; 23 25 using HeuristicLab.Data; … … 30 32 namespace HeuristicLab.Analysis { 31 33 /// <summary> 32 /// An operator which analyzes the best, average and worst solution quality in the current population.34 /// An operator which analyzes the best, average and worst quality of solutions in the scope tree. 33 35 /// </summary> 34 [Item(" PopulationBestAverageWorstQualityAnalyzer", "An operator which analyzes the best, average and worst solution quality in the current population.")]36 [Item("BestAverageWorstQualityAnalyzer", "An operator which analyzes the best, average and worst quality of solutions in the scope tree.")] 35 37 [StorableClass] 36 public sealed class PopulationBestAverageWorstQualityAnalyzer : AlgorithmOperator, IAnalyzer {38 public sealed class BestAverageWorstQualityAnalyzer : AlgorithmOperator, IAnalyzer { 37 39 #region Parameter properties 38 40 public ValueLookupParameter<BoolValue> MaximizationParameter { … … 71 73 #endregion 72 74 73 [StorableConstructor] 74 private PopulationBestAverageWorstQualityAnalyzer(bool deserializing) : base() { } 75 public PopulationBestAverageWorstQualityAnalyzer() 75 #region Properties 76 private BestQualityMemorizer BestQualityMemorizer { 77 get { return (BestQualityMemorizer)OperatorGraph.InitialOperator; } 78 } 79 private BestQualityMemorizer BestKnownQualityMemorizer { 80 get { return (BestQualityMemorizer)BestQualityMemorizer.Successor; } 81 } 82 private BestAverageWorstQualityCalculator BestAverageWorstQualityCalculator { 83 get { return (BestAverageWorstQualityCalculator)BestKnownQualityMemorizer.Successor; } 84 } 85 #endregion 86 87 public BestAverageWorstQualityAnalyzer() 76 88 : base() { 77 Initialize();78 }79 80 private void Initialize() {81 89 #region Create parameters 82 90 Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false.")); … … 94 102 95 103 #region Create operators 96 BestQualityMemorizer bestQualityMemorizer 1= new BestQualityMemorizer();97 BestQualityMemorizer best QualityMemorizer2= new BestQualityMemorizer();104 BestQualityMemorizer bestQualityMemorizer = new BestQualityMemorizer(); 105 BestQualityMemorizer bestKnownQualityMemorizer = new BestQualityMemorizer(); 98 106 BestAverageWorstQualityCalculator bestAverageWorstQualityCalculator = new BestAverageWorstQualityCalculator(); 99 107 DataTableValuesCollector dataTableValuesCollector = new DataTableValuesCollector(); … … 101 109 ResultsCollector resultsCollector = new ResultsCollector(); 102 110 103 bestQualityMemorizer1.BestQualityParameter.ActualName = "BestQuality"; 104 bestQualityMemorizer1.MaximizationParameter.ActualName = "Maximization"; 105 bestQualityMemorizer1.QualityParameter.ActualName = "Quality"; 111 bestQualityMemorizer.BestQualityParameter.ActualName = BestQualityParameter.Name; 112 bestQualityMemorizer.MaximizationParameter.ActualName = MaximizationParameter.Name; 113 bestQualityMemorizer.QualityParameter.ActualName = QualityParameter.Name; 114 bestQualityMemorizer.QualityParameter.Depth = QualityParameter.Depth; 106 115 107 bestQualityMemorizer2.BestQualityParameter.ActualName = "BestKnownQuality"; 108 bestQualityMemorizer2.MaximizationParameter.ActualName = "Maximization"; 109 bestQualityMemorizer2.QualityParameter.ActualName = "Quality"; 116 bestKnownQualityMemorizer.BestQualityParameter.ActualName = BestKnownQualityParameter.Name; 117 bestKnownQualityMemorizer.MaximizationParameter.ActualName = MaximizationParameter.Name; 118 bestKnownQualityMemorizer.QualityParameter.ActualName = QualityParameter.Name; 119 bestKnownQualityMemorizer.QualityParameter.Depth = QualityParameter.Depth; 110 120 111 bestAverageWorstQualityCalculator.AverageQualityParameter.ActualName = "CurrentAverageQuality"; 112 bestAverageWorstQualityCalculator.BestQualityParameter.ActualName = "CurrentBestQuality"; 113 bestAverageWorstQualityCalculator.MaximizationParameter.ActualName = "Maximization"; 114 bestAverageWorstQualityCalculator.QualityParameter.ActualName = "Quality"; 115 bestAverageWorstQualityCalculator.WorstQualityParameter.ActualName = "CurrentWorstQuality"; 121 bestAverageWorstQualityCalculator.AverageQualityParameter.ActualName = CurrentAverageQualityParameter.Name; 122 bestAverageWorstQualityCalculator.BestQualityParameter.ActualName = CurrentBestQualityParameter.Name; 123 bestAverageWorstQualityCalculator.MaximizationParameter.ActualName = MaximizationParameter.Name; 124 bestAverageWorstQualityCalculator.QualityParameter.ActualName = QualityParameter.Name; 125 bestAverageWorstQualityCalculator.QualityParameter.Depth = QualityParameter.Depth; 126 bestAverageWorstQualityCalculator.WorstQualityParameter.ActualName = CurrentWorstQualityParameter.Name; 116 127 117 dataTableValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Best Quality", null, "CurrentBestQuality"));118 dataTableValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Average Quality", null, "CurrentAverageQuality"));119 dataTableValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Worst Quality", null, "CurrentWorstQuality"));120 dataTableValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality"));121 dataTableValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Known Quality", null, "BestKnownQuality"));122 dataTableValuesCollector.DataTableParameter.ActualName = "Qualities";128 dataTableValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("CurrentBestQuality", null, CurrentBestQualityParameter.Name)); 129 dataTableValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("CurrentAverageQuality", null, CurrentAverageQualityParameter.Name)); 130 dataTableValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("CurrentWorstQuality", null, CurrentWorstQualityParameter.Name)); 131 dataTableValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("BestQuality", null, BestQualityParameter.Name)); 132 dataTableValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("BestKnownQuality", null, BestKnownQualityParameter.Name)); 133 dataTableValuesCollector.DataTableParameter.ActualName = QualitiesParameter.Name; 123 134 124 qualityDifferenceCalculator.AbsoluteDifferenceParameter.ActualName = "AbsoluteDifferenceBestKnownToBest";125 qualityDifferenceCalculator.FirstQualityParameter.ActualName = "BestKnownQuality";126 qualityDifferenceCalculator.RelativeDifferenceParameter.ActualName = "RelativeDifferenceBestKnownToBest";127 qualityDifferenceCalculator.SecondQualityParameter.ActualName = "BestQuality";135 qualityDifferenceCalculator.AbsoluteDifferenceParameter.ActualName = AbsoluteDifferenceBestKnownToBestParameter.Name; 136 qualityDifferenceCalculator.FirstQualityParameter.ActualName = BestKnownQualityParameter.Name; 137 qualityDifferenceCalculator.RelativeDifferenceParameter.ActualName = RelativeDifferenceBestKnownToBestParameter.Name; 138 qualityDifferenceCalculator.SecondQualityParameter.ActualName = BestQualityParameter.Name; 128 139 129 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Best Quality", null, "CurrentBestQuality"));130 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Average Quality", null, "CurrentAverageQuality"));131 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Current Worst Quality", null, "CurrentWorstQuality"));132 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Quality", null, "BestQuality"));133 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Best Known Quality", null, "BestKnownQuality"));134 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Absolute Difference of Best Known Quality to Best Quality", null, "AbsoluteDifferenceBestKnownToBest"));135 resultsCollector.CollectedValues.Add(new LookupParameter<PercentValue>("Relative Difference of Best Known Quality to Best Quality", null, "RelativeDifferenceBestKnownToBest"));136 resultsCollector.CollectedValues.Add(new LookupParameter<DataTable>( "Qualities"));137 resultsCollector.ResultsParameter.ActualName = "Results";140 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("CurrentBestQuality", null, CurrentBestQualityParameter.Name)); 141 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("CurrentAverageQuality", null, CurrentAverageQualityParameter.Name)); 142 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("CurrentWorstQuality", null, CurrentWorstQualityParameter.Name)); 143 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("BestQuality", null, BestQualityParameter.Name)); 144 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("BestKnownQuality", null, BestKnownQualityParameter.Name)); 145 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("AbsoluteDifferenceBestKnownToBest", null, AbsoluteDifferenceBestKnownToBestParameter.Name)); 146 resultsCollector.CollectedValues.Add(new LookupParameter<PercentValue>("RelativeDifferenceBestKnownToBest", null, RelativeDifferenceBestKnownToBestParameter.Name)); 147 resultsCollector.CollectedValues.Add(new LookupParameter<DataTable>(QualitiesParameter.Name)); 148 resultsCollector.ResultsParameter.ActualName = ResultsParameter.Name; 138 149 #endregion 139 150 140 151 #region Create operator graph 141 OperatorGraph.InitialOperator = bestQualityMemorizer 1;142 bestQualityMemorizer 1.Successor = bestQualityMemorizer2;143 best QualityMemorizer2.Successor = bestAverageWorstQualityCalculator;152 OperatorGraph.InitialOperator = bestQualityMemorizer; 153 bestQualityMemorizer.Successor = bestKnownQualityMemorizer; 154 bestKnownQualityMemorizer.Successor = bestAverageWorstQualityCalculator; 144 155 bestAverageWorstQualityCalculator.Successor = dataTableValuesCollector; 145 156 dataTableValuesCollector.Successor = qualityDifferenceCalculator; … … 147 158 resultsCollector.Successor = null; 148 159 #endregion 160 161 Initialize(); 162 } 163 [StorableConstructor] 164 private BestAverageWorstQualityAnalyzer(bool deserializing) : base() { } 165 166 [StorableHook(HookType.AfterDeserialization)] 167 private void Initialize() { 168 QualityParameter.DepthChanged += new EventHandler(QualityParameter_DepthChanged); 169 } 170 171 public override IDeepCloneable Clone(Cloner cloner) { 172 BestAverageWorstQualityAnalyzer clone = (BestAverageWorstQualityAnalyzer)base.Clone(cloner); 173 clone.Initialize(); 174 return clone; 175 } 176 177 private void QualityParameter_DepthChanged(object sender, System.EventArgs e) { 178 BestQualityMemorizer.QualityParameter.Depth = QualityParameter.Depth; 179 BestKnownQualityMemorizer.QualityParameter.Depth = QualityParameter.Depth; 180 BestAverageWorstQualityCalculator.QualityParameter.Depth = QualityParameter.Depth; 149 181 } 150 182 } -
trunk/sources/HeuristicLab.Analysis/3.3/BestAverageWorstQualityCalculator.cs
r3659 r3662 29 29 namespace HeuristicLab.Analysis { 30 30 /// <summary> 31 /// An operator which calculates the best, average and worst solution quality of the current population.31 /// An operator which calculates the best, average and worst quality of solutions in the scope tree. 32 32 /// </summary> 33 [Item("BestAverageWorstQualityCalculator", "An operator which calculates the best, average and worst solution quality of the current population.")]33 [Item("BestAverageWorstQualityCalculator", "An operator which calculates the best, average and worst quality of solutions in the scope tree.")] 34 34 [StorableClass] 35 35 public sealed class BestAverageWorstQualityCalculator : SingleSuccessorOperator { 36 public IValueLookupParameter<BoolValue> MaximizationParameter {37 get { return ( IValueLookupParameter<BoolValue>)Parameters["Maximization"]; }36 public ValueLookupParameter<BoolValue> MaximizationParameter { 37 get { return (ValueLookupParameter<BoolValue>)Parameters["Maximization"]; } 38 38 } 39 public ILookupParameter<ItemArray<DoubleValue>> QualityParameter {40 get { return ( ILookupParameter<ItemArray<DoubleValue>>)Parameters["Quality"]; }39 public ScopeTreeLookupParameter<DoubleValue> QualityParameter { 40 get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; } 41 41 } 42 public IValueLookupParameter<DoubleValue> BestQualityParameter {43 get { return ( IValueLookupParameter<DoubleValue>)Parameters["BestQuality"]; }42 public ValueLookupParameter<DoubleValue> BestQualityParameter { 43 get { return (ValueLookupParameter<DoubleValue>)Parameters["BestQuality"]; } 44 44 } 45 public IValueLookupParameter<DoubleValue> AverageQualityParameter {46 get { return ( IValueLookupParameter<DoubleValue>)Parameters["AverageQuality"]; }45 public ValueLookupParameter<DoubleValue> AverageQualityParameter { 46 get { return (ValueLookupParameter<DoubleValue>)Parameters["AverageQuality"]; } 47 47 } 48 public IValueLookupParameter<DoubleValue> WorstQualityParameter {49 get { return ( IValueLookupParameter<DoubleValue>)Parameters["WorstQuality"]; }48 public ValueLookupParameter<DoubleValue> WorstQualityParameter { 49 get { return (ValueLookupParameter<DoubleValue>)Parameters["WorstQuality"]; } 50 50 } 51 51 … … 53 53 : base() { 54 54 Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the current problem is a maximization problem, otherwise false.")); 55 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The value contained in each sub-scope which represents the solution quality."));55 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The value contained in the scope tree which represents the solution quality.")); 56 56 Parameters.Add(new ValueLookupParameter<DoubleValue>("BestQuality", "The quality value of the best solution.")); 57 57 Parameters.Add(new ValueLookupParameter<DoubleValue>("AverageQuality", "The average quality of all solutions.")); -
trunk/sources/HeuristicLab.Analysis/3.3/BestQualityMemorizer.cs
r3659 r3662 29 29 namespace HeuristicLab.Analysis { 30 30 /// <summary> 31 /// An operator that updates the best quality found so far with those qualities in the subscopes.31 /// An operator that updates the best quality found so far with those qualities contained in the scope tree. 32 32 /// </summary> 33 [Item("BestQualityMemorizer", "An operator that updates the best quality found so far with those qualities in the subscopes.")]33 [Item("BestQualityMemorizer", "An operator that updates the best quality found so far with those qualities contained in the scope tree.")] 34 34 [StorableClass] 35 35 public class BestQualityMemorizer : SingleSuccessorOperator { 36 public IValueLookupParameter<BoolValue> MaximizationParameter {37 get { return ( IValueLookupParameter<BoolValue>)Parameters["Maximization"]; }36 public ValueLookupParameter<BoolValue> MaximizationParameter { 37 get { return (ValueLookupParameter<BoolValue>)Parameters["Maximization"]; } 38 38 } 39 public ILookupParameter<ItemArray<DoubleValue>> QualityParameter {40 get { return ( ILookupParameter<ItemArray<DoubleValue>>)Parameters["Quality"]; }39 public ScopeTreeLookupParameter<DoubleValue> QualityParameter { 40 get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; } 41 41 } 42 public IValueLookupParameter<DoubleValue> BestQualityParameter {43 get { return ( IValueLookupParameter<DoubleValue>)Parameters["BestQuality"]; }42 public ValueLookupParameter<DoubleValue> BestQualityParameter { 43 get { return (ValueLookupParameter<DoubleValue>)Parameters["BestQuality"]; } 44 44 } 45 45 … … 47 47 : base() { 48 48 Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the current problem is a maximization problem, otherwise false.")); 49 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The value contained in each sub-scope which represents the solution quality."));49 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The value contained in the scope tree which represents the solution quality.")); 50 50 Parameters.Add(new ValueLookupParameter<DoubleValue>("BestQuality", "The quality value of the best solution.")); 51 51 } -
trunk/sources/HeuristicLab.Analysis/3.3/HeuristicLab.Analysis-3.3.csproj
r3623 r3662 85 85 <ItemGroup> 86 86 <None Include="HeuristicLabAnalysisPlugin.cs.frame" /> 87 <Compile Include="BestAverageWorstQualityAnalyzer.cs" /> 87 88 <Compile Include="BestAverageWorstQualityCalculator.cs" /> 88 89 <Compile Include="BestQualityMemorizer.cs" /> 89 <Compile Include=" PopulationQualityAnalyzer.cs" />90 <Compile Include=" PopulationValueAnalyzer.cs" />90 <Compile Include="QualityAnalyzer.cs" /> 91 <Compile Include="MinAverageMaxValueAnalyzer.cs" /> 91 92 <Compile Include="MinAverageMaxValueCalculator.cs" /> 92 <Compile Include="PopulationMinAverageMaxValueAnalyzer.cs" />93 <Compile Include="SolutionValueAnalyzer.cs" />94 <Compile Include="SolutionQualityAnalyzer.cs" />95 93 <Compile Include="MultiAnalyzer.cs" /> 96 <Compile Include="PopulationBestAverageWorstQualityAnalyzer.cs" />97 94 <Compile Include="QualityDifferenceCalculator.cs" /> 98 95 <Compile Include="DataRow.cs" /> … … 101 98 <Compile Include="DataTable.cs" /> 102 99 <Compile Include="DataTableValuesCollector.cs" /> 100 <Compile Include="ValueAnalyzer.cs" /> 103 101 </ItemGroup> 104 102 <ItemGroup> -
trunk/sources/HeuristicLab.Analysis/3.3/MinAverageMaxValueAnalyzer.cs
r3659 r3662 20 20 #endregion 21 21 22 using System; 23 using HeuristicLab.Common; 22 24 using HeuristicLab.Core; 23 25 using HeuristicLab.Data; … … 30 32 namespace HeuristicLab.Analysis { 31 33 /// <summary> 32 /// An operator which analyzes the minimum, average and maximum of a value in the current population.34 /// An operator which analyzes the minimum, average and maximum of a value in the scope tree. 33 35 /// </summary> 34 [Item(" PopulationMinAverageMaxValueAnalyzer", "An operator which analyzes the minimum, average and maximum of a value in the current population.")]36 [Item("MinAverageMaxValueAnalyzer", "An operator which analyzes the minimum, average and maximum of a value in the scope tree.")] 35 37 [StorableClass] 36 public sealed class PopulationMinAverageMaxValueAnalyzer : AlgorithmOperator, IAnalyzer {38 public sealed class MinAverageMaxValueAnalyzer : AlgorithmOperator, IAnalyzer { 37 39 #region Parameter properties 38 40 public ScopeTreeLookupParameter<DoubleValue> ValueParameter { … … 56 58 #endregion 57 59 58 [StorableConstructor] 59 private PopulationMinAverageMaxValueAnalyzer(bool deserializing) : base() { } 60 public PopulationMinAverageMaxValueAnalyzer() 60 #region Properties 61 private MinAverageMaxValueCalculator MinAverageMaxValueCalculator { 62 get { return (MinAverageMaxValueCalculator)OperatorGraph.InitialOperator; } 63 } 64 #endregion 65 66 public MinAverageMaxValueAnalyzer() 61 67 : base() { 62 Initialize();63 }64 65 private void Initialize() {66 68 #region Create parameters 67 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Value", "The value contained in each solutionwhich should be analyzed."));69 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Value", "The value contained in the scope tree which should be analyzed.")); 68 70 Parameters.Add(new ValueLookupParameter<DoubleValue>("MinValue", "The minimum of the value.")); 69 71 Parameters.Add(new ValueLookupParameter<DoubleValue>("AverageValue", "The average of the value.")); … … 78 80 ResultsCollector resultsCollector = new ResultsCollector(); 79 81 80 minAverageMaxValueCalculator.AverageValueParameter.ActualName = "AverageValue"; 81 minAverageMaxValueCalculator.MaxValueParameter.ActualName = "MaxValue"; 82 minAverageMaxValueCalculator.MinValueParameter.ActualName = "MinValue"; 83 minAverageMaxValueCalculator.ValueParameter.ActualName = "Value"; 82 minAverageMaxValueCalculator.AverageValueParameter.ActualName = AverageValueParameter.Name; 83 minAverageMaxValueCalculator.MaxValueParameter.ActualName = MaxValueParameter.Name; 84 minAverageMaxValueCalculator.MinValueParameter.ActualName = MinValueParameter.Name; 85 minAverageMaxValueCalculator.ValueParameter.ActualName = ValueParameter.Name; 86 minAverageMaxValueCalculator.ValueParameter.Depth = ValueParameter.Depth; 84 87 85 dataTableValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Min imum Value", null, "MinValue"));86 dataTableValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Average Value", null, "AverageValue"));87 dataTableValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Max imum Value", null, "MaxValue"));88 dataTableValuesCollector.DataTableParameter.ActualName = "Values";88 dataTableValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("MinValue", null, MinValueParameter.Name)); 89 dataTableValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("AverageValue", null, AverageValueParameter.Name)); 90 dataTableValuesCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("MaxValue", null, MaxValueParameter.Name)); 91 dataTableValuesCollector.DataTableParameter.ActualName = ValuesParameter.Name; 89 92 90 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Min imum Value", null, "MinValue"));91 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Average Value", null, "AverageValue"));92 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("Max imum Value", null, "MaxValue"));93 resultsCollector.CollectedValues.Add(new LookupParameter<DataTable>( "Values"));94 resultsCollector.ResultsParameter.ActualName = "Results";93 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("MinValue", null, MinValueParameter.Name)); 94 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("AverageValue", null, AverageValueParameter.Name)); 95 resultsCollector.CollectedValues.Add(new LookupParameter<DoubleValue>("MaxValue", null, MaxValueParameter.Name)); 96 resultsCollector.CollectedValues.Add(new LookupParameter<DataTable>(ValuesParameter.Name)); 97 resultsCollector.ResultsParameter.ActualName = ResultsParameter.Name; 95 98 #endregion 96 99 … … 101 104 resultsCollector.Successor = null; 102 105 #endregion 106 107 Initialize(); 108 } 109 [StorableConstructor] 110 private MinAverageMaxValueAnalyzer(bool deserializing) : base() { } 111 112 [StorableHook(HookType.AfterDeserialization)] 113 private void Initialize() { 114 ValueParameter.DepthChanged += new EventHandler(ValueParameter_DepthChanged); 115 } 116 117 public override IDeepCloneable Clone(Cloner cloner) { 118 MinAverageMaxValueAnalyzer clone = (MinAverageMaxValueAnalyzer)base.Clone(cloner); 119 clone.Initialize(); 120 return clone; 121 } 122 123 private void ValueParameter_DepthChanged(object sender, System.EventArgs e) { 124 MinAverageMaxValueCalculator.ValueParameter.Depth = ValueParameter.Depth; 103 125 } 104 126 } -
trunk/sources/HeuristicLab.Analysis/3.3/MinAverageMaxValueCalculator.cs
r3659 r3662 29 29 namespace HeuristicLab.Analysis { 30 30 /// <summary> 31 /// An operator which calculates the minimum, average and maximum of a value in the current population.31 /// An operator which calculates the minimum, average and maximum of a value in the scope tree. 32 32 /// </summary> 33 [Item("MinAverageMaxValueCalculator", "An operator which calculates the minimum, average and maximum of a value in the current population.")]33 [Item("MinAverageMaxValueCalculator", "An operator which calculates the minimum, average and maximum of a value in the scope tree.")] 34 34 [StorableClass] 35 35 public sealed class MinAverageMaxValueCalculator : SingleSuccessorOperator { 36 public ILookupParameter<ItemArray<DoubleValue>> ValueParameter {37 get { return ( ILookupParameter<ItemArray<DoubleValue>>)Parameters["Value"]; }36 public ScopeTreeLookupParameter<DoubleValue> ValueParameter { 37 get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Value"]; } 38 38 } 39 public IValueLookupParameter<DoubleValue> MinValueParameter {40 get { return ( IValueLookupParameter<DoubleValue>)Parameters["MinValue"]; }39 public ValueLookupParameter<DoubleValue> MinValueParameter { 40 get { return (ValueLookupParameter<DoubleValue>)Parameters["MinValue"]; } 41 41 } 42 public IValueLookupParameter<DoubleValue> AverageValueParameter {43 get { return ( IValueLookupParameter<DoubleValue>)Parameters["AverageValue"]; }42 public ValueLookupParameter<DoubleValue> AverageValueParameter { 43 get { return (ValueLookupParameter<DoubleValue>)Parameters["AverageValue"]; } 44 44 } 45 public IValueLookupParameter<DoubleValue> MaxValueParameter {46 get { return ( IValueLookupParameter<DoubleValue>)Parameters["MaxValue"]; }45 public ValueLookupParameter<DoubleValue> MaxValueParameter { 46 get { return (ValueLookupParameter<DoubleValue>)Parameters["MaxValue"]; } 47 47 } 48 48 49 49 public MinAverageMaxValueCalculator() 50 50 : base() { 51 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Value", "The value contained in each sub-scope for which the minimum, average and maximum should be calculated."));51 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Value", "The value contained in the scope tree for which the minimum, average and maximum should be calculated.")); 52 52 Parameters.Add(new ValueLookupParameter<DoubleValue>("MinValue", "The minimum of the value.")); 53 53 Parameters.Add(new ValueLookupParameter<DoubleValue>("AverageValue", "The average of the value.")); 54 54 Parameters.Add(new ValueLookupParameter<DoubleValue>("MaxValue", "The maximum of the value.")); 55 55 } 56 57 56 58 57 public override IOperation Apply() { -
trunk/sources/HeuristicLab.Analysis/3.3/ValueAnalyzer.cs
r3659 r3662 20 20 #endregion 21 21 22 using System; 23 using HeuristicLab.Common; 22 24 using HeuristicLab.Core; 23 25 using HeuristicLab.Data; … … 30 32 namespace HeuristicLab.Analysis { 31 33 /// <summary> 32 /// An operator which analyzes a value in the current population.34 /// An operator which analyzes a value in the scope tree. 33 35 /// </summary> 34 [Item(" PopulationValueAnalyzer", "An operator which analyzes a value in the current population.")]36 [Item("ValueAnalyzer", "An operator which analyzes a value in the scope tree.")] 35 37 [StorableClass] 36 public sealed class PopulationValueAnalyzer : AlgorithmOperator, IAnalyzer {38 public sealed class ValueAnalyzer : AlgorithmOperator, IAnalyzer { 37 39 #region Parameter properties 38 40 public ScopeTreeLookupParameter<DoubleValue> ValueParameter { … … 47 49 #endregion 48 50 49 [StorableConstructor] 50 private PopulationValueAnalyzer(bool deserializing) : base() { } 51 public PopulationValueAnalyzer() 51 #region Properties 52 private DataTableValuesCollector DataTableValuesCollector { 53 get { return (DataTableValuesCollector)OperatorGraph.InitialOperator; } 54 } 55 private ResultsCollector ResultsCollector { 56 get { return (ResultsCollector)DataTableValuesCollector.Successor; } 57 } 58 #endregion 59 60 public ValueAnalyzer() 52 61 : base() { 53 Initialize();54 }55 56 private void Initialize() {57 62 #region Create parameters 58 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Value", "The value contained in each solutionwhich should be analyzed."));63 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Value", "The value contained in the scope tree which should be analyzed.")); 59 64 Parameters.Add(new ValueLookupParameter<DataTable>("Values", "The data table to store the values.")); 60 65 Parameters.Add(new ValueLookupParameter<VariableCollection>("Results", "The results collection where the analysis values should be stored.")); … … 65 70 ResultsCollector resultsCollector = new ResultsCollector(); 66 71 67 dataTableValuesCollector.CollectedValues.Add(new ScopeTreeLookupParameter<DoubleValue>("Value", null, "Value")); 68 dataTableValuesCollector.DataTableParameter.ActualName = "Values"; 72 dataTableValuesCollector.CollectedValues.Add(new ScopeTreeLookupParameter<DoubleValue>("Value", null, ValueParameter.Name)); 73 ((ScopeTreeLookupParameter<DoubleValue>)dataTableValuesCollector.CollectedValues["Value"]).Depth = ValueParameter.Depth; 74 dataTableValuesCollector.DataTableParameter.ActualName = ValuesParameter.Name; 69 75 70 resultsCollector.CollectedValues.Add(new ScopeTreeLookupParameter<DoubleValue>("Value", null, "Value")); 71 resultsCollector.CollectedValues.Add(new LookupParameter<DataTable>("Values")); 72 resultsCollector.ResultsParameter.ActualName = "Results"; 76 resultsCollector.CollectedValues.Add(new ScopeTreeLookupParameter<DoubleValue>("Value", null, ValueParameter.Name)); 77 ((ScopeTreeLookupParameter<DoubleValue>)resultsCollector.CollectedValues["Value"]).Depth = ValueParameter.Depth; 78 resultsCollector.CollectedValues.Add(new LookupParameter<DataTable>(ValuesParameter.Name)); 79 resultsCollector.ResultsParameter.ActualName = ResultsParameter.Name; 73 80 #endregion 74 81 … … 78 85 resultsCollector.Successor = null; 79 86 #endregion 87 88 Initialize(); 89 } 90 [StorableConstructor] 91 private ValueAnalyzer(bool deserializing) : base() { } 92 93 [StorableHook(HookType.AfterDeserialization)] 94 private void Initialize() { 95 ValueParameter.DepthChanged += new EventHandler(ValueParameter_DepthChanged); 96 } 97 98 public override IDeepCloneable Clone(Cloner cloner) { 99 ValueAnalyzer clone = (ValueAnalyzer)base.Clone(cloner); 100 clone.Initialize(); 101 return clone; 102 } 103 104 private void ValueParameter_DepthChanged(object sender, System.EventArgs e) { 105 ((ScopeTreeLookupParameter<DoubleValue>)DataTableValuesCollector.CollectedValues["Value"]).Depth = ValueParameter.Depth; 106 ((ScopeTreeLookupParameter<DoubleValue>)ResultsCollector.CollectedValues["Value"]).Depth = ValueParameter.Depth; 80 107 } 81 108 } -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/PopulationMinAvgMaxTreeSizeAnalyzer.cs
r3659 r3662 69 69 UniformSubScopesProcessor subScopesProcessor = new UniformSubScopesProcessor(); 70 70 SymbolicExpressionTreeSizeCalculator sizeCalculator = new SymbolicExpressionTreeSizeCalculator(); 71 PopulationMinAverageMaxValueAnalyzer valuesAnalyzer = new PopulationMinAverageMaxValueAnalyzer();71 MinAverageMaxValueAnalyzer valuesAnalyzer = new MinAverageMaxValueAnalyzer(); 72 72 sizeCalculator.SymbolicExpressionTreeParameter.ActualName = SymbolicExpressionTreeParameter.Name; 73 73 sizeCalculator.SymbolicExpressionTreeSizeParameter.ActualName = SymbolicExpressionTreeSizeParameter.Name; -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Analyzers/SymbolicExpressionTreeSizeAnalyzer.cs
r3651 r3662 71 71 72 72 SymbolicExpressionTreeSizeCalculator sizeCalculator = new SymbolicExpressionTreeSizeCalculator(); 73 SolutionValueAnalyzer valueAnalyzer = new SolutionValueAnalyzer();73 ValueAnalyzer valueAnalyzer = new ValueAnalyzer(); 74 74 sizeCalculator.SymbolicExpressionTreeParameter.ActualName = SymbolicExpressionTreeParameter.Name; 75 75 sizeCalculator.SymbolicExpressionTreeSizeParameter.ActualName = SymbolicExpressionTreeSizeParameter.Name; 76 76 valueAnalyzer.ValueParameter.ActualName = sizeCalculator.SymbolicExpressionTreeSizeParameter.Name; 77 valueAnalyzer.ValueParameter.Depth = 0; 77 78 valueAnalyzer.ValuesParameter.ActualName = SymbolicExpressionTreeSizesParameter.Name; 78 79 valueAnalyzer.ResultsParameter.ActualName = ResultsParameter.Name; -
trunk/sources/HeuristicLab.Optimizer/3.3/HeuristicLab.Optimizer-3.3.csproj
r3658 r3662 179 179 </ItemGroup> 180 180 <ItemGroup> 181 <EmbeddedResource Include="Documents\GA_TSP.hl" /> 181 182 <EmbeddedResource Include="Properties\Resources.resx"> 182 183 <Generator>ResXFileCodeGenerator</Generator> -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Symbolic/Analyzers/PopulationSymbolicRegressionModelQualityAnalyzer.cs
r3659 r3662 102 102 SimpleSymbolicRegressionEvaluator simpleEvaluator = new SimpleSymbolicRegressionEvaluator(); 103 103 SimpleRSquaredEvaluator simpleR2Evalator = new SimpleRSquaredEvaluator(); 104 PopulationMinAverageMaxValueAnalyzer minAvgMaxAnalyzer = new PopulationMinAverageMaxValueAnalyzer();104 MinAverageMaxValueAnalyzer minAvgMaxAnalyzer = new MinAverageMaxValueAnalyzer(); 105 105 #endregion 106 106 -
trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/PopulationBestTSPSolutionAnalyzer.cs
r3659 r3662 36 36 [Item("PopulationBestTSPSolutionAnalyzer", "An operator for analyzing the best solution of Traveling Salesman Problems given in path representation using city coordinates.")] 37 37 [StorableClass] 38 public sealed class PopulationBestTSPSolutionAnalyzer : SingleSuccessorOperator, I BestTSPSolutionAnalyzer, IAnalyzer {39 public ILookupParameter<DoubleMatrix> CoordinatesParameter {40 get { return ( ILookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }38 public sealed class PopulationBestTSPSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer { 39 public LookupParameter<DoubleMatrix> CoordinatesParameter { 40 get { return (LookupParameter<DoubleMatrix>)Parameters["Coordinates"]; } 41 41 } 42 public ILookupParameter<ItemArray<Permutation>> PermutationParameter {43 get { return ( ILookupParameter<ItemArray<Permutation>>)Parameters["Permutation"]; }42 public ScopeTreeLookupParameter<Permutation> PermutationParameter { 43 get { return (ScopeTreeLookupParameter<Permutation>)Parameters["Permutation"]; } 44 44 } 45 ILookupParameter IBestTSPSolutionAnalyzer.PermutationParameter {46 get { return PermutationParameter; }45 public ScopeTreeLookupParameter<DoubleValue> QualityParameter { 46 get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; } 47 47 } 48 public ILookupParameter<ItemArray<DoubleValue>> QualityParameter {49 get { return ( ILookupParameter<ItemArray<DoubleValue>>)Parameters["Quality"]; }48 public LookupParameter<PathTSPTour> BestSolutionParameter { 49 get { return (LookupParameter<PathTSPTour>)Parameters["BestSolution"]; } 50 50 } 51 ILookupParameter IBestTSPSolutionAnalyzer.QualityParameter { 52 get { return QualityParameter; } 53 } 54 public ILookupParameter<PathTSPTour> BestSolutionParameter { 55 get { return (ILookupParameter<PathTSPTour>)Parameters["BestSolution"]; } 56 } 57 public IValueLookupParameter<ResultCollection> ResultsParameter { 58 get { return (IValueLookupParameter<ResultCollection>)Parameters["Results"]; } 51 public ValueLookupParameter<ResultCollection> ResultsParameter { 52 get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; } 59 53 } 60 54 -
trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/HeuristicLab.Problems.TravelingSalesman-3.3.csproj
r3635 r3662 84 84 </ItemGroup> 85 85 <ItemGroup> 86 <Compile Include="Analyzers\MultiPopulationBestTSPSolutionAnalyzer.cs" />87 86 <Compile Include="Analyzers\PopulationBestTSPSolutionAnalyzer.cs" /> 88 <Compile Include="Analyzers\BestTSPSolutionAnalyzer.cs" />89 87 <Compile Include="Evaluators\TSPEuclideanPathEvaluator.cs" /> 90 88 <Compile Include="Evaluators\TSPGeoPathEvaluator.cs" /> 91 89 <Compile Include="HeuristicLabProblemsTravelingSalesmanPlugin.cs" /> 92 <Compile Include="Interfaces\IBestTSPSolutionAnalyzer.cs" />93 90 <Compile Include="MoveEvaluators\ThreeOpt\TSPTranslocationMoveEuclideanPathEvaluator.cs" /> 94 91 <Compile Include="MoveEvaluators\ThreeOpt\TSPTranslocationMoveGeoPathEvaluator.cs" /> -
trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs
r3635 r3662 124 124 get { return operators; } 125 125 } 126 private IEnumerable<IBestTSPSolutionAnalyzer> BestTSPSolutionAnalyzers{127 get { return operators.OfType< IBestTSPSolutionAnalyzer>(); }126 private PopulationBestTSPSolutionAnalyzer BestTSPSolutionAnalyzer { 127 get { return operators.OfType<PopulationBestTSPSolutionAnalyzer>().FirstOrDefault(); } 128 128 } 129 129 #endregion … … 231 231 ParameterizeSolutionCreator(); 232 232 ParameterizeEvaluator(); 233 ParameterizeAnalyzer s();233 ParameterizeAnalyzer(); 234 234 ParameterizeOperators(); 235 235 OnSolutionCreatorChanged(); … … 237 237 private void SolutionCreator_PermutationParameter_ActualNameChanged(object sender, EventArgs e) { 238 238 ParameterizeEvaluator(); 239 ParameterizeAnalyzer s();239 ParameterizeAnalyzer(); 240 240 ParameterizeOperators(); 241 241 } … … 244 244 ParameterizeEvaluator(); 245 245 UpdateMoveEvaluators(); 246 ParameterizeAnalyzer s();246 ParameterizeAnalyzer(); 247 247 ClearDistanceMatrix(); 248 248 OnEvaluatorChanged(); 249 249 } 250 250 private void Evaluator_QualityParameter_ActualNameChanged(object sender, EventArgs e) { 251 ParameterizeAnalyzer s();251 ParameterizeAnalyzer(); 252 252 } 253 253 private void MoveGenerator_InversionMoveParameter_ActualNameChanged(object sender, EventArgs e) { … … 280 280 private void InitializeOperators() { 281 281 operators = new List<IOperator>(); 282 operators.Add(new BestTSPSolutionAnalyzer());283 282 operators.Add(new PopulationBestTSPSolutionAnalyzer()); 284 operators.Add(new MultiPopulationBestTSPSolutionAnalyzer()); 285 ParameterizeAnalyzers(); 283 ParameterizeAnalyzer(); 286 284 operators.AddRange(ApplicationManager.Manager.GetInstances<IPermutationOperator>().Cast<IOperator>()); 287 285 ParameterizeOperators(); … … 325 323 } 326 324 } 327 private void ParameterizeAnalyzers() { 328 foreach (IBestTSPSolutionAnalyzer analyzer in BestTSPSolutionAnalyzers) { 329 analyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName; 330 analyzer.CoordinatesParameter.ActualName = CoordinatesParameter.Name; 331 analyzer.PermutationParameter.ActualName = SolutionCreator.PermutationParameter.ActualName; 332 analyzer.ResultsParameter.ActualName = "Results"; 333 } 325 private void ParameterizeAnalyzer() { 326 BestTSPSolutionAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName; 327 BestTSPSolutionAnalyzer.CoordinatesParameter.ActualName = CoordinatesParameter.Name; 328 BestTSPSolutionAnalyzer.PermutationParameter.ActualName = SolutionCreator.PermutationParameter.ActualName; 329 BestTSPSolutionAnalyzer.ResultsParameter.ActualName = "Results"; 334 330 } 335 331 private void ParameterizeOperators() {
Note: See TracChangeset
for help on using the changeset viewer.