Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/01/10 22:09:11 (14 years ago)
Author:
swinkler
Message:

Corrected storing of detail data for population diversity analysis, updated details view. (#1188)

Location:
branches/HeuristicLab.DiversityAnalysis
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman.Views/3.3/HeuristicLab.Problems.TravelingSalesman.Views-3.3.csproj

    r4505 r4547  
    221221      <DependentUpon>TravelingSalesmanProblemView.cs</DependentUpon>
    222222    </EmbeddedResource>
     223    <EmbeddedResource Include="TSPPopulationDiversityAnalysisDetailsView.resx">
     224      <DependentUpon>TSPPopulationDiversityAnalysisDetailsView.cs</DependentUpon>
     225    </EmbeddedResource>
    223226  </ItemGroup>
    224227  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TSPPopulationDiversityAnalysisDetailsView.Designer.cs

    r4505 r4547  
    2424    /// </summary>
    2525    private void InitializeComponent() {
    26       components = new System.ComponentModel.Container();
     26      this.parameterCollectionView = new HeuristicLab.Core.Views.ParameterCollectionView();
     27      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
     28      this.SuspendLayout();
     29      //
     30      // nameTextBox
     31      //
     32      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
     33      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
     34      this.nameTextBox.Size = new System.Drawing.Size(610, 20);
     35      //
     36      // descriptionTextBox
     37      //
     38      this.descriptionTextBox.Size = new System.Drawing.Size(610, 20);
     39      //
     40      // parameterCollectionView
     41      //
     42      this.parameterCollectionView.Caption = "ParameterCollection View";
     43      this.parameterCollectionView.Content = null;
     44      this.parameterCollectionView.Dock = System.Windows.Forms.DockStyle.Fill;
     45      this.parameterCollectionView.Location = new System.Drawing.Point(0, 0);
     46      this.parameterCollectionView.Name = "parameterCollectionView";
     47      this.parameterCollectionView.ReadOnly = true;
     48      this.parameterCollectionView.Size = new System.Drawing.Size(682, 350);
     49      this.parameterCollectionView.TabIndex = 5;
     50      //
     51      // TSPPopulationDiversityAnalysisDetailsView
     52      //
     53      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    2754      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     55      this.Controls.Add(this.parameterCollectionView);
     56      this.Name = "TSPPopulationDiversityAnalysisDetailsView";
     57      this.Size = new System.Drawing.Size(682, 350);
     58      this.Controls.SetChildIndex(this.nameLabel, 0);
     59      this.Controls.SetChildIndex(this.descriptionLabel, 0);
     60      this.Controls.SetChildIndex(this.nameTextBox, 0);
     61      this.Controls.SetChildIndex(this.descriptionTextBox, 0);
     62      this.Controls.SetChildIndex(this.parameterCollectionView, 0);
     63      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
     64      this.ResumeLayout(false);
     65      this.PerformLayout();
     66
    2867    }
    2968
    3069    #endregion
     70
     71    private Core.Views.ParameterCollectionView parameterCollectionView;
    3172  }
    3273}
  • branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TSPPopulationDiversityAnalysisDetailsView.cs

    r4505 r4547  
    4242    }
    4343
     44    protected override void DeregisterContentEvents() {
     45      base.DeregisterContentEvents();
     46    }
     47    protected override void RegisterContentEvents() {
     48      base.RegisterContentEvents();
     49    }
     50
     51    protected override void OnContentChanged() {
     52      base.OnContentChanged();
     53      if (Content == null) {
     54        parameterCollectionView.Content = null;
     55      } else {
     56        parameterCollectionView.Content = ((IParameterizedNamedItem)Content).Parameters;
     57      }
     58    }
     59
    4460  }
    4561
  • branches/HeuristicLab.DiversityAnalysis/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/TSPPopulationDiversityAnalysisDetails.cs

    r4544 r4547  
    2424using HeuristicLab.Data;
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HeuristicLab.Parameters;
    2627
    2728namespace HeuristicLab.Problems.TravelingSalesman {
     
    3233  [Item("TSPPopulationDiversityAnalysisDetails", "A class for storing details of population diversity analysis results.")]
    3334  [StorableClass]
    34   public class TSPPopulationDiversityAnalysisDetails : NamedItem {
     35  public class TSPPopulationDiversityAnalysisDetails : ParameterizedNamedItem {
    3536
    36     [Storable]
    37     private ItemList<DoubleValue> averageSimilarities;
     37    public static string AverageSimilaritiesKey = "AverageSimilarities";
     38    public ValueParameter<ItemList<DoubleValue>> AverageSimilaritiesParameter {
     39      get { return (ValueParameter<ItemList<DoubleValue>>)Parameters[AverageSimilaritiesKey]; }
     40    }
    3841    public ItemList<DoubleValue> AverageSimilarities {
    39       get { return averageSimilarities; }
    40     }
    41     [Storable]
    42     private ItemList<DoubleValue> averageMaximumSimilarities;
    43     public ItemList<DoubleValue> AverageMaximumSimilarities {
    44       get { return averageMaximumSimilarities; }
     42      get { return AverageSimilaritiesParameter.Value; }
    4543    }
    4644
    47     [Storable]
    48     private ItemList<DoubleMatrix> similarities;
     45    public static string AverageMaximumSimilaritiesKey = "AverageMaximumSimilarities";
     46    public ValueParameter<ItemList<DoubleValue>> AverageMaximumSimilaritiesParameter {
     47      get { return (ValueParameter<ItemList<DoubleValue>>)Parameters[AverageMaximumSimilaritiesKey]; }
     48    }
     49    public ItemList<DoubleValue> AverageMaximumSimilarities {
     50      get { return AverageMaximumSimilaritiesParameter.Value; }
     51    }
     52
     53    public static string SimilaritiesKey = "Similarities";
     54    public ValueParameter<ItemList<DoubleMatrix>> SimilaritiesParameter {
     55      get { return (ValueParameter<ItemList<DoubleMatrix>>)Parameters[SimilaritiesKey]; }
     56    }
    4957    public ItemList<DoubleMatrix> Similarities {
    50       get { return similarities; }
     58      get { return SimilaritiesParameter.Value; }
    5159    }
    52     [Storable]
    53     private ItemList<DoubleArray> maximumSimilarities;
     60
     61    public static string MaximumSimilaritiesKey = "MaximumSimilarities";
     62    public ValueParameter<ItemList<DoubleArray>> MaximumSimilaritiesParameter {
     63      get { return (ValueParameter<ItemList<DoubleArray>>)Parameters[MaximumSimilaritiesKey]; }
     64    }
    5465    public ItemList<DoubleArray> MaximumSimilarities {
    55       get { return maximumSimilarities; }
     66      get { return MaximumSimilaritiesParameter.Value; }
    5667    }
    5768
    5869    public TSPPopulationDiversityAnalysisDetails()
    5970        : base() {
    60       averageSimilarities = new ItemList<DoubleValue>();
    61       averageMaximumSimilarities = new ItemList<DoubleValue>();
    62       similarities = new ItemList<DoubleMatrix>();
    63       maximumSimilarities = new ItemList<DoubleArray>();
     71      Parameters.Add(new ValueParameter<ItemList<DoubleValue>>(AverageSimilaritiesKey, "Average similarities of the solutions of the population.", new ItemList<DoubleValue>()));
     72      Parameters.Add(new ValueParameter<ItemList<DoubleValue>>(AverageMaximumSimilaritiesKey, "Average maximum similarities of the solutions of the population.", new ItemList<DoubleValue>()));
     73      Parameters.Add(new ValueParameter<ItemList<DoubleMatrix>>(SimilaritiesKey, "Similarities of the solutions of the population.", new ItemList<DoubleMatrix>()));
     74      Parameters.Add(new ValueParameter<ItemList<DoubleArray>>(MaximumSimilaritiesKey, "Maximum similarities of the solutions of the population.", new ItemList<DoubleArray>()));
    6475    }
    6576
Note: See TracChangeset for help on using the changeset viewer.