Changeset 4641
- Timestamp:
- 10/23/10 04:07:18 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 added
- 9 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Analysis.Views/3.3/AlleleFrequencyCollectionView.Designer.cs
r4639 r4641 61 61 chartArea1.AxisX.IntervalAutoMode = System.Windows.Forms.DataVisualization.Charting.IntervalAutoMode.VariableCount; 62 62 chartArea1.AxisX.LabelAutoFitStyle = ((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles)((System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.IncreaseFont | System.Windows.Forms.DataVisualization.Charting.LabelAutoFitStyles.DecreaseFont))); 63 chartArea1.AxisX.Title = "Allele s";63 chartArea1.AxisX.Title = "Allele Index"; 64 64 chartArea1.AxisY.Maximum = 1D; 65 65 chartArea1.AxisY.Minimum = 0D; 66 66 chartArea1.AxisY.Title = "Relative Frequency"; 67 chartArea1.AxisY2.Title = "Average Solution Quality / Average Impact";67 chartArea1.AxisY2.Title = "Average Solution Quality"; 68 68 chartArea1.CursorX.IsUserEnabled = true; 69 69 chartArea1.CursorX.IsUserSelectionEnabled = true; -
trunk/sources/HeuristicLab.Analysis.Views/3.3/AlleleFrequencyCollectionView.cs
r4639 r4641 83 83 qualities.YValueType = ChartValueType.Double; 84 84 qualities.YAxisType = AxisType.Secondary; 85 qualities.ToolTip = "#VAL";86 85 chart.Series.Add(qualities); 87 86 … … 91 90 impacts.YValueType = ChartValueType.Double; 92 91 impacts.YAxisType = AxisType.Secondary; 93 impacts.ToolTip = "#VAL";94 92 chart.Series.Add(impacts); 93 invisibleSeries.Add(impacts); 95 94 } 96 95 … … 106 105 impacts.Points.Clear(); 107 106 107 if (!invisibleSeries.Contains(qualities) && !invisibleSeries.Contains(impacts)) 108 chart.ChartAreas["Default"].AxisY2.Title = "Average Solution Quality / Average Impact"; 109 else if (!invisibleSeries.Contains(qualities)) 110 chart.ChartAreas["Default"].AxisY2.Title = "Average Solution Quality"; 111 else if (!invisibleSeries.Contains(impacts)) 112 chart.ChartAreas["Default"].AxisY2.Title = "Average Impact"; 113 108 114 if (!invisibleSeries.Contains(bestKnown)) { 109 115 foreach (AlleleFrequency af in Content.Where(x => x.ContainedInBestKnownSolution).OrderBy(x => x.AverageImpact)) { 110 bestKnown.Points.Add(Create FrequencyDataPoint(index, af));111 if (!invisibleSeries.Contains(qualities)) qualities.Points.Add XY(index, af.AverageSolutionQuality);112 if (!invisibleSeries.Contains(impacts)) impacts.Points.Add XY(index, af.AverageImpact);116 bestKnown.Points.Add(CreateDataPoint(index, af.Frequency, af)); 117 if (!invisibleSeries.Contains(qualities)) qualities.Points.Add(CreateDataPoint(index, af.AverageSolutionQuality, af)); 118 if (!invisibleSeries.Contains(impacts)) impacts.Points.Add(CreateDataPoint(index, af.AverageImpact, af)); 113 119 index++; 114 120 } … … 116 122 if (!invisibleSeries.Contains(others)) { 117 123 foreach (AlleleFrequency af in Content.Where(x => !x.ContainedInBestKnownSolution).OrderBy(x => x.AverageImpact)) { 118 others.Points.Add(Create FrequencyDataPoint(index, af));119 if (!invisibleSeries.Contains(qualities)) qualities.Points.Add XY(index, af.AverageSolutionQuality);120 if (!invisibleSeries.Contains(impacts)) impacts.Points.Add XY(index, af.AverageImpact);124 others.Points.Add(CreateDataPoint(index, af.Frequency, af)); 125 if (!invisibleSeries.Contains(qualities)) qualities.Points.Add(CreateDataPoint(index, af.AverageSolutionQuality, af)); 126 if (!invisibleSeries.Contains(impacts)) impacts.Points.Add(CreateDataPoint(index, af.AverageImpact, af)); 121 127 index++; 122 128 } … … 124 130 } 125 131 126 protected virtual DataPoint Create FrequencyDataPoint(int index, AlleleFrequency af) {132 protected virtual DataPoint CreateDataPoint(int index, double value, AlleleFrequency af) { 127 133 string nl = Environment.NewLine; 128 129 DataPoint p = new DataPoint(index, af.Frequency); 130 p.AxisLabel = af.Id; 134 DataPoint p = new DataPoint(index, value); 131 135 p.ToolTip = string.Format("Id: {0}" + nl + 132 136 "Relative Frequency: {1}" + nl + … … 136 140 "Contained in Best Solution: {5}", 137 141 af.Id, af.Frequency, af.AverageSolutionQuality, af.AverageImpact, af.ContainedInBestKnownSolution, af.ContainedInBestSolution); 142 p.IsEmpty = value == 0; 138 143 return p; 139 144 } -
trunk/sources/HeuristicLab.Analysis.Views/3.3/HeuristicLab.Analysis.Views-3.3.csproj
r4639 r4641 117 117 <ItemGroup> 118 118 <None Include="HeuristicLabAnalysisViewsPlugin.cs.frame" /> 119 <Compile Include="AlleleFrequencyCollectionView.cs" /> 119 <Compile Include="AlleleFrequencyCollectionView.cs"> 120 <SubType>UserControl</SubType> 121 </Compile> 120 122 <Compile Include="AlleleFrequencyCollectionView.Designer.cs"> 121 123 <DependentUpon>AlleleFrequencyCollectionView.cs</DependentUpon> … … 127 129 <Compile Include="AlleleFrequencyView.Designer.cs"> 128 130 <DependentUpon>AlleleFrequencyView.cs</DependentUpon> 131 </Compile> 132 <Compile Include="AlleleFrequencyCollectionHistoryView.cs"> 133 <SubType>UserControl</SubType> 134 </Compile> 135 <Compile Include="AlleleFrequencyCollectionHistoryView.Designer.cs"> 136 <DependentUpon>AlleleFrequencyCollectionHistoryView.cs</DependentUpon> 129 137 </Compile> 130 138 <Compile Include="Properties\AssemblyInfo.cs" /> -
trunk/sources/HeuristicLab.Analysis/3.3/AlleleFrequencyAnalyzer.cs
r4639 r4641 70 70 Parameters.Add(new ValueParameter<BoolValue>("StoreAlleleFrequenciesHistory", "True if the history of all allele frequencies should be stored.", new BoolValue(false))); 71 71 Parameters.Add(new ValueParameter<IntValue>("UpdateInterval", "The interval in which the allele frequency analysis should be applied.", new IntValue(1))); 72 Parameters.Add(new LookupParameter<IntValue>("UpdateCounter", "The value which counts how many times the operator was called since the last update." ));72 Parameters.Add(new LookupParameter<IntValue>("UpdateCounter", "The value which counts how many times the operator was called since the last update.", "AlleleFrequencyAnalyzerUpdateCounter")); 73 73 } 74 74 75 private class AlleleFrequencyEqualityComparer : IEqualityComparer<AlleleFrequency> { 75 #region AlleleFrequencyIdEqualityComparer 76 private class AlleleFrequencyIdEqualityComparer : IEqualityComparer<AlleleFrequency> { 76 77 public bool Equals(AlleleFrequency x, AlleleFrequency y) { 77 78 return x.Id == y.Id; 78 79 } 79 80 public int GetHashCode(AlleleFrequency obj) { 80 return obj. GetHashCode();81 return obj.Id.GetHashCode(); 81 82 } 82 83 } 84 #endregion 83 85 84 86 public override IOperation Apply() { … … 121 123 122 124 // calculate dummy allele frequencies of alleles of best known solution which did not occur 123 var bestKnownFrequencies = bestKnownAlleles.Select(x => new AlleleFrequency(x.Id, 0, x.Impact, 0, true, false)).Except(frequencies, new AlleleFrequency EqualityComparer());125 var bestKnownFrequencies = bestKnownAlleles.Select(x => new AlleleFrequency(x.Id, 0, x.Impact, 0, true, false)).Except(frequencies, new AlleleFrequencyIdEqualityComparer()); 124 126 125 127 // fetch results collection … … 142 144 if (storeHistory) { 143 145 if (!results.ContainsKey("Allele Frequencies History")) { 144 AlleleFrequencyCollection Collection history = new AlleleFrequencyCollectionCollection();146 AlleleFrequencyCollectionHistory history = new AlleleFrequencyCollectionHistory(); 145 147 history.Add(frequenciesCollection); 146 148 results.Add(new Result("Allele Frequencies History", history)); 147 149 } else { 148 ((AlleleFrequencyCollection Collection)results["Allele Frequencies History"].Value).Add(frequenciesCollection);150 ((AlleleFrequencyCollectionHistory)results["Allele Frequencies History"].Value).Add(frequenciesCollection); 149 151 } 150 152 } -
trunk/sources/HeuristicLab.Analysis/3.3/AlleleFrequencyCollectionHistory.cs
r4639 r4641 26 26 namespace HeuristicLab.Analysis { 27 27 /// <summary> 28 /// Represents a collectionof allele frequencies collections.28 /// Represents history values of allele frequencies collections. 29 29 /// </summary> 30 [Item("AlleleFrequencyCollection Collection", "Represents a collectionof allele frequencies collections.")]30 [Item("AlleleFrequencyCollectionHistory", "Represents history values of allele frequencies collections.")] 31 31 [StorableClass] 32 public class AlleleFrequencyCollection Collection: ItemCollection<AlleleFrequencyCollection> {33 public AlleleFrequencyCollection Collection() : base() { }34 public AlleleFrequencyCollection Collection(IEnumerable<AlleleFrequencyCollection> collections) : base(new ItemCollection<AlleleFrequencyCollection>(collections)) { }32 public class AlleleFrequencyCollectionHistory : ItemCollection<AlleleFrequencyCollection> { 33 public AlleleFrequencyCollectionHistory() : base() { } 34 public AlleleFrequencyCollectionHistory(IEnumerable<AlleleFrequencyCollection> collections) : base(new ItemCollection<AlleleFrequencyCollection>(collections)) { } 35 35 [StorableConstructor] 36 protected AlleleFrequencyCollection Collection(bool deserializing) : base(deserializing) { }36 protected AlleleFrequencyCollectionHistory(bool deserializing) : base(deserializing) { } 37 37 } 38 38 } -
trunk/sources/HeuristicLab.Analysis/3.3/HeuristicLab.Analysis-3.3.csproj
r4639 r4641 111 111 <None Include="HeuristicLabAnalysisPlugin.cs.frame" /> 112 112 <Compile Include="AlleleFrequencyCollection.cs" /> 113 <Compile Include="AlleleFrequencyCollectionHistory.cs" /> 113 114 <Compile Include="BestAverageWorstQualityAnalyzer.cs" /> 114 115 <Compile Include="BestAverageWorstQualityCalculator.cs" /> … … 117 118 <Compile Include="Allele.cs" /> 118 119 <Compile Include="AlleleFrequency.cs" /> 119 <Compile Include="AlleleFrequencyCollectionCollection.cs" />120 120 <Compile Include="QualityAnalyzer.cs" /> 121 121 <Compile Include="MinAverageMaxValueAnalyzer.cs" /> -
trunk/sources/HeuristicLab.Analysis/3.3/MultiAnalyzer.cs
r3664 r4641 54 54 : base() { 55 55 Parameters.Add(new ValueLookupParameter<IntValue>("UpdateInterval", "The interval in which the contained analyzers should be applied.", new IntValue(1))); 56 Parameters.Add(new LookupParameter<IntValue>("UpdateCounter", "The value which counts how many times the MultiAnalyzer was called since the last update." ));56 Parameters.Add(new LookupParameter<IntValue>("UpdateCounter", "The value which counts how many times the MultiAnalyzer was called since the last update.", "MultiAnalyzerUpdateCounter")); 57 57 } 58 58 [StorableConstructor] -
trunk/sources/HeuristicLab.Core.Views/3.3/HeuristicLab.Core.Views-3.3.csproj
r4065 r4641 130 130 <DependentUpon>CheckedItemListView.cs</DependentUpon> 131 131 </Compile> 132 <Compile Include="MovieView.cs"> 133 <SubType>UserControl</SubType> 134 </Compile> 135 <Compile Include="MovieView.Designer.cs"> 136 <DependentUpon>MovieView.cs</DependentUpon> 137 </Compile> 132 138 <Compile Include="LogView.cs"> 133 139 <SubType>UserControl</SubType> -
trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs
r4623 r4641 315 315 } 316 316 private void ParameterizeAnalyzers() { 317 BestTSPSolutionAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName; 318 BestTSPSolutionAnalyzer.CoordinatesParameter.ActualName = CoordinatesParameter.Name; 319 BestTSPSolutionAnalyzer.PermutationParameter.ActualName = SolutionCreator.PermutationParameter.ActualName; 320 BestTSPSolutionAnalyzer.ResultsParameter.ActualName = "Results"; 321 BestTSPSolutionAnalyzer.BestKnownQualityParameter.ActualName = BestKnownQualityParameter.Name; 322 BestTSPSolutionAnalyzer.BestKnownSolutionParameter.ActualName = BestKnownSolutionParameter.Name; 323 BestTSPSolutionAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name; 324 325 TSPAlleleFrequencyAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name; 326 TSPAlleleFrequencyAnalyzer.CoordinatesParameter.ActualName = CoordinatesParameter.Name; 327 TSPAlleleFrequencyAnalyzer.SolutionParameter.ActualName = SolutionCreator.PermutationParameter.ActualName; 328 TSPAlleleFrequencyAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName; 329 TSPAlleleFrequencyAnalyzer.BestKnownSolutionParameter.ActualName = BestKnownSolutionParameter.Name; 330 TSPAlleleFrequencyAnalyzer.ResultsParameter.ActualName = "Results"; 317 if (BestTSPSolutionAnalyzer != null) { 318 BestTSPSolutionAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName; 319 BestTSPSolutionAnalyzer.CoordinatesParameter.ActualName = CoordinatesParameter.Name; 320 BestTSPSolutionAnalyzer.PermutationParameter.ActualName = SolutionCreator.PermutationParameter.ActualName; 321 BestTSPSolutionAnalyzer.ResultsParameter.ActualName = "Results"; 322 BestTSPSolutionAnalyzer.BestKnownQualityParameter.ActualName = BestKnownQualityParameter.Name; 323 BestTSPSolutionAnalyzer.BestKnownSolutionParameter.ActualName = BestKnownSolutionParameter.Name; 324 BestTSPSolutionAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name; 325 } 326 327 if (TSPAlleleFrequencyAnalyzer != null) { 328 TSPAlleleFrequencyAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name; 329 TSPAlleleFrequencyAnalyzer.CoordinatesParameter.ActualName = CoordinatesParameter.Name; 330 TSPAlleleFrequencyAnalyzer.SolutionParameter.ActualName = SolutionCreator.PermutationParameter.ActualName; 331 TSPAlleleFrequencyAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName; 332 TSPAlleleFrequencyAnalyzer.BestKnownSolutionParameter.ActualName = BestKnownSolutionParameter.Name; 333 TSPAlleleFrequencyAnalyzer.ResultsParameter.ActualName = "Results"; 334 } 331 335 } 332 336 private void ParameterizeOperators() {
Note: See TracChangeset
for help on using the changeset viewer.