Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17260


Ignore:
Timestamp:
09/17/19 15:41:46 (5 years ago)
Author:
abeham
Message:

#2521: Worked on PTSP refactoring

Location:
branches/2521_ProblemRefactoring
Files:
12 added
2 deleted
22 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab 3.3.sln

    r17258 r17260  
    11
    22Microsoft Visual Studio Solution File, Format Version 12.00
    3 # Visual Studio 15
    4 VisualStudioVersion = 15.0.28307.168
     3# Visual Studio Version 16
     4VisualStudioVersion = 16.0.29306.81
    55MinimumVisualStudioVersion = 10.0.40219.1
    66Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{96396439-A764-4022-A8D2-BE021449B8D1}"
     
    456456EndProject
    457457Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.DataAnalysis.DecisionTrees-3.4", "HeuristicLab.Algorithms.DataAnalysis.DecisionTrees\3.4\HeuristicLab.Algorithms.DataAnalysis.DecisionTrees-3.4.csproj", "{541A53F3-E6A7-402F-91BB-D76041CDD9FD}"
     458EndProject
     459Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.PTSP.Views-3.3", "HeuristicLab.Problems.PTSP.Views\3.3\HeuristicLab.Problems.PTSP.Views-3.3.csproj", "{90B6CA12-9791-4430-B2D7-CD3ED7F75E2B}"
    458460EndProject
    459461Global
     
    22152217    {541A53F3-E6A7-402F-91BB-D76041CDD9FD}.Release|x86.ActiveCfg = Release|Any CPU
    22162218    {541A53F3-E6A7-402F-91BB-D76041CDD9FD}.Release|x86.Build.0 = Release|Any CPU
     2219    {90B6CA12-9791-4430-B2D7-CD3ED7F75E2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     2220    {90B6CA12-9791-4430-B2D7-CD3ED7F75E2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
     2221    {90B6CA12-9791-4430-B2D7-CD3ED7F75E2B}.Debug|x64.ActiveCfg = Debug|x64
     2222    {90B6CA12-9791-4430-B2D7-CD3ED7F75E2B}.Debug|x64.Build.0 = Debug|x64
     2223    {90B6CA12-9791-4430-B2D7-CD3ED7F75E2B}.Debug|x86.ActiveCfg = Debug|x86
     2224    {90B6CA12-9791-4430-B2D7-CD3ED7F75E2B}.Debug|x86.Build.0 = Debug|x86
     2225    {90B6CA12-9791-4430-B2D7-CD3ED7F75E2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
     2226    {90B6CA12-9791-4430-B2D7-CD3ED7F75E2B}.Release|Any CPU.Build.0 = Release|Any CPU
     2227    {90B6CA12-9791-4430-B2D7-CD3ED7F75E2B}.Release|x64.ActiveCfg = Release|x64
     2228    {90B6CA12-9791-4430-B2D7-CD3ED7F75E2B}.Release|x64.Build.0 = Release|x64
     2229    {90B6CA12-9791-4430-B2D7-CD3ED7F75E2B}.Release|x86.ActiveCfg = Release|x86
     2230    {90B6CA12-9791-4430-B2D7-CD3ED7F75E2B}.Release|x86.Build.0 = Release|x86
    22172231  EndGlobalSection
    22182232  GlobalSection(SolutionProperties) = preSolution
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.PTSP.Views/3.3/HeuristicLab.Problems.PTSP.Views-3.3.csproj

    r16723 r17260  
    8888      <Private>False</Private>
    8989    </ProjectReference>
     90    <ProjectReference Include="..\..\HeuristicLab.Data.Views\3.3\HeuristicLab.Data.Views-3.3.csproj">
     91      <Project>{72104A0B-90E7-42F3-9ABE-9BBBADD4B943}</Project>
     92      <Name>HeuristicLab.Data.Views-3.3</Name>
     93    </ProjectReference>
    9094    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
    9195      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
     
    138142      <Private>False</Private>
    139143    </ProjectReference>
     144    <ProjectReference Include="..\..\HeuristicLab.Problems.TravelingSalesman.Views\3.3\HeuristicLab.Problems.TravelingSalesman.Views-3.3.csproj">
     145      <Project>{cda28124-acd0-4231-8eb0-c510b361f84e}</Project>
     146      <Name>HeuristicLab.Problems.TravelingSalesman.Views-3.3</Name>
     147      <Private>False</Private>
     148    </ProjectReference>
     149    <ProjectReference Include="..\..\HeuristicLab.Problems.TravelingSalesman\3.3\HeuristicLab.Problems.TravelingSalesman-3.3.csproj">
     150      <Project>{d767c38d-8014-46b0-9a32-03a3aecce34a}</Project>
     151      <Name>HeuristicLab.Problems.TravelingSalesman-3.3</Name>
     152      <Private>False</Private>
     153    </ProjectReference>
    140154    <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
    141155      <Project>{F4539FB6-4708-40C9-BE64-0A1390AEA197}</Project>
     
    143157      <Private>False</Private>
    144158    </ProjectReference>
     159    <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
    145160    <Reference Include="System" />
    146161    <Reference Include="System.Core" />
     
    154169  </ItemGroup>
    155170  <ItemGroup>
    156     <Compile Include="PathPTSPTourView.cs">
    157       <SubType>UserControl</SubType>
    158     </Compile>
    159     <Compile Include="PathPTSPTourView.Designer.cs">
    160       <DependentUpon>PathPTSPTourView.cs</DependentUpon>
     171    <Compile Include="CoordinatesPTSPDataView.cs">
     172      <SubType>UserControl</SubType>
     173    </Compile>
     174    <Compile Include="CoordinatesPTSPDataView.Designer.cs">
     175      <DependentUpon>CoordinatesPTSPDataView.cs</DependentUpon>
     176    </Compile>
     177    <Compile Include="EuclideanPTSPDataView.cs">
     178      <SubType>UserControl</SubType>
     179    </Compile>
     180    <Compile Include="EuclideanPTSPDataView.Designer.cs">
     181      <DependentUpon>EuclideanPTSPDataView.cs</DependentUpon>
     182    </Compile>
     183    <Compile Include="MatrixPTSPDataView.cs">
     184      <SubType>UserControl</SubType>
     185    </Compile>
     186    <Compile Include="MatrixPTSPDataView.Designer.cs">
     187      <DependentUpon>MatrixPTSPDataView.cs</DependentUpon>
     188    </Compile>
     189    <Compile Include="ProbabilisticTSPSolutionView.cs">
     190      <SubType>UserControl</SubType>
     191    </Compile>
     192    <Compile Include="ProbabilisticTSPSolutionView.Designer.cs">
     193      <DependentUpon>ProbabilisticTSPSolutionView.cs</DependentUpon>
    161194    </Compile>
    162195    <Compile Include="Plugin.cs" />
    163196    <Compile Include="Properties\AssemblyInfo.cs" />
    164     <Compile Include="ProbabilisticTravelingSalesmanProblemView.cs">
    165       <SubType>UserControl</SubType>
    166     </Compile>
    167     <Compile Include="ProbabilisticTravelingSalesmanProblemView.Designer.cs">
    168       <DependentUpon>ProbabilisticTravelingSalesmanProblemView.cs</DependentUpon>
    169     </Compile>
    170197  </ItemGroup>
    171198  <ItemGroup>
     
    173200    <None Include="Plugin.cs.frame" />
    174201    <None Include="Properties\AssemblyInfo.cs.frame" />
     202  </ItemGroup>
     203  <ItemGroup>
     204    <EmbeddedResource Include="MatrixPTSPDataView.resx">
     205      <DependentUpon>MatrixPTSPDataView.cs</DependentUpon>
     206    </EmbeddedResource>
    175207  </ItemGroup>
    176208  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.PTSP.Views/3.3/Plugin.cs.frame

    r17226 r17260  
    3636  [PluginDependency("HeuristicLab.Parameters", "3.3")]
    3737  [PluginDependency("HeuristicLab.Problems.PTSP", "3.3")]
     38  [PluginDependency("HeuristicLab.Problems.TravelingSalesman", "3.3")]
     39  [PluginDependency("HeuristicLab.Problems.TravelingSalesman.Views", "3.3")]
    3840  [PluginDependency("HeuristicLab.Random", "3.3")]
    3941  public class HeuristicLabProblemsPTSPViewsPlugin : PluginBase {
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.PTSP/3.3/AnalyticalPTSP.cs

    r17253 r17260  
    2727
    2828namespace HeuristicLab.Problems.PTSP {
    29   [Item("Analytical Probabilistic TSP (p-TSP)", "Represents a probabilistic traveling salesman problem where the expected tour length is calculated exactly.")]
     29  [Item("Analytical Probabilistic TSP (pTSP)", "Represents a probabilistic traveling salesman problem where the expected tour length is calculated exactly.")]
    3030  [Creatable(CreatableAttribute.Categories.CombinatorialProblems)]
    3131  [StorableType("509B6AB5-F4DE-4144-A031-43EEBAD02CA6")]
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.PTSP/3.3/EstimatedPTSP.cs

    r17253 r17260  
    3232
    3333namespace HeuristicLab.Problems.PTSP {
    34   [Item("Estimated Probabilistic TSP (p-TSP)", "Represents a probabilistic traveling salesman problem where the expected tour length is estimated by averaging over the length of tours on a number of, so called, realizations.")]
     34  [Item("Estimated Probabilistic TSP (pTSP)", "Represents a probabilistic traveling salesman problem where the expected tour length is estimated by averaging over the length of tours on a number of, so called, realizations.")]
    3535  [Creatable(CreatableAttribute.Categories.CombinatorialProblems)]
    3636  [StorableType("d1b4149b-8ab9-4314-8d96-9ea04a4d5b8b")]
     
    136136    /// </summary>
    137137    /// <param name="tour">The tour between all cities.</param>
    138     /// <param name="data">The main parameters of the p-TSP.</param>
     138    /// <param name="data">The main parameters of the pTSP.</param>
    139139    /// <param name="realizations">How many realizations to achieve.</param>
    140140    /// <param name="seed">The starting seed of generating the realizations.</param>
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.PTSP/3.3/HeuristicLab.Problems.PTSP-3.3.csproj

    r17253 r17260  
    165165  </ItemGroup>
    166166  <ItemGroup>
    167     <Compile Include="PTSPData.cs" />
     167    <Compile Include="ProbabilisticTSPData.cs" />
     168    <Compile Include="ProbabilisticTSPSolution.cs" />
    168169    <None Include="Properties\AssemblyInfo.cs.frame" />
    169170    <None Include="Plugin.cs.frame" />
     
    195196    <Compile Include="Moves\TwoPointFiveOpt\TwoPointFiveMoveMaker.cs" />
    196197    <Compile Include="Moves\TwoPointFiveOpt\TwoPointFiveMove.cs" />
    197     <Compile Include="PTSP.cs" />
     198    <Compile Include="ProbabilisticTSP.cs" />
    198199    <Compile Include="Plugin.cs" />
    199200    <Compile Include="Properties\AssemblyInfo.cs" />
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.PTSP/3.3/Improvers/PTSPAnalyticalInsertionLocalImprovement.cs

    r17253 r17260  
    3838  /// The operator tries to improve the probabilistic traveling salesman solution by inserting a city in the tour between two other cities for a certain number of times.
    3939  /// </remarks>
    40   [Item("PTSP Analytical Insertion Local Improvement", "An operator that improves probabilistic traveling salesman solutions. The operator tries to improve the probabilistic traveling salesman solution by swapping two randomly chosen edges for a certain number of times.")]
     40  [Item("pTSP Analytical Insertion Local Improvement", "An operator that improves probabilistic traveling salesman solutions. The operator tries to improve the probabilistic traveling salesman solution by swapping two randomly chosen edges for a certain number of times.")]
    4141  [StorableType("5adca9d8-02b2-4937-9f79-a24d8ea8ea19")]
    4242  public sealed class PTSPAnalyticalInsertionLocalImprovement : SingleSuccessorOperator, IAnalyticalPTSPOperator, ILocalImprovementOperator {
     
    8686      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality value of the assignment."));
    8787      Parameters.Add(new LookupParameter<BoolValue>("Maximization", "True if the problem should be maximized or minimized."));
    88       Parameters.Add(new LookupParameter<IProbabilisticTSPData>("PTSP Data", "The main parameters of the p-TSP."));
     88      Parameters.Add(new LookupParameter<IProbabilisticTSPData>("PTSP Data", "The main parameters of the pTSP."));
    8989    }
    9090
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.PTSP/3.3/Improvers/PTSPAnalyticalInversionLocalImprovement.cs

    r17253 r17260  
    3838  /// The operator tries to improve the probabilistic traveling salesman solution by swapping two randomly chosen edges for a certain number of times.
    3939  /// </remarks>
    40   [Item("PTSP Analytical Inversion Local Improvement", "An operator that improves probabilistic traveling salesman solutions. The operator tries to improve the probabilistic traveling salesman solution by swapping two randomly chosen edges for a certain number of times.")]
     40  [Item("pTSP Analytical Inversion Local Improvement", "An operator that improves probabilistic traveling salesman solutions. The operator tries to improve the probabilistic traveling salesman solution by swapping two randomly chosen edges for a certain number of times.")]
    4141  [StorableType("88147d6a-e843-4f65-8058-421453b5206a")]
    4242  public sealed class PTSPAnalyticalInversionLocalImprovement : SingleSuccessorOperator, IAnalyticalPTSPOperator, ILocalImprovementOperator {
     
    8686      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality value of the assignment."));
    8787      Parameters.Add(new LookupParameter<BoolValue>("Maximization", "True if the problem should be maximized or minimized."));
    88       Parameters.Add(new LookupParameter<IProbabilisticTSPData>("PTSP Data", "The main parameters of the p-TSP."));
     88      Parameters.Add(new LookupParameter<IProbabilisticTSPData>("PTSP Data", "The main parameters of the pTSP."));
    8989    }
    9090
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.PTSP/3.3/Improvers/PTSPAnalyticalTwoPointFiveLocalImprovement.cs

    r17253 r17260  
    3838  /// The operator tries to improve the probabilistic traveling salesman solution by swapping two randomly chosen edges for a certain number of times.
    3939  /// </remarks>
    40   [Item("PTSP Analytical 2.5 Local Improvement", "An operator that improves probabilistic traveling salesman solutions. The operator tries to improve the probabilistic traveling salesman solution by swapping two randomly chosen edges for a certain number of times.")]
     40  [Item("pTSP Analytical 2.5 Local Improvement", "An operator that improves probabilistic traveling salesman solutions. The operator tries to improve the probabilistic traveling salesman solution by swapping two randomly chosen edges for a certain number of times.")]
    4141  [StorableType("6e07195e-0da7-45ea-9385-0c66594127db")]
    4242  public sealed class PTSPAnalyticalTwoPointFiveLocalImprovement : SingleSuccessorOperator, IAnalyticalPTSPOperator, ILocalImprovementOperator {
     
    8686      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality value of the assignment."));
    8787      Parameters.Add(new LookupParameter<BoolValue>("Maximization", "True if the problem should be maximized or minimized."));
    88       Parameters.Add(new LookupParameter<IProbabilisticTSPData>("PTSP Data", "The main parameters of the p-TSP."));
     88      Parameters.Add(new LookupParameter<IProbabilisticTSPData>("PTSP Data", "The main parameters of the pTSP."));
    8989    }
    9090
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.PTSP/3.3/Improvers/PTSPEstimatedInsertionLocalImprovement.cs

    r17253 r17260  
    4040  /// The operator tries to improve the probabilistic traveling salesman solution by inserting a city in the tour between two other cities for a certain number of times.
    4141  /// </remarks>
    42   [Item("PTSP Estimated Insertion Local Improvement", "An operator that improves probabilistic traveling salesman solutions. The operator tries to improve the probabilistic traveling salesman solution by swapping two randomly chosen edges for a certain number of times.")]
     42  [Item("pTSP Estimated Insertion Local Improvement", "An operator that improves probabilistic traveling salesman solutions. The operator tries to improve the probabilistic traveling salesman solution by swapping two randomly chosen edges for a certain number of times.")]
    4343  [StorableType("B2D60579-A97D-4E44-B11C-61CDA6EBEBA7")]
    4444  public sealed class PTSPEstimatedInsertionLocalImprovement : SingleSuccessorOperator, IEstimatedPTSPOperator, ILocalImprovementOperator {
     
    9292      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality value of the assignment."));
    9393      Parameters.Add(new LookupParameter<BoolValue>("Maximization", "True if the problem should be maximized or minimized."));
    94       Parameters.Add(new LookupParameter<IProbabilisticTSPData>("PTSP Data", "The main parameters of the p-TSP."));
     94      Parameters.Add(new LookupParameter<IProbabilisticTSPData>("PTSP Data", "The main parameters of the pTSP."));
    9595      Parameters.Add(new LookupParameter<ItemList<BoolArray>>("Realizations", "The list of samples drawn from all possible stochastic instances."));
    9696    }
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.PTSP/3.3/Improvers/PTSPEstimatedInversionLocalImprovement.cs

    r17253 r17260  
    9292      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality value of the assignment."));
    9393      Parameters.Add(new LookupParameter<BoolValue>("Maximization", "True if the problem should be maximized or minimized."));
    94       Parameters.Add(new LookupParameter<IProbabilisticTSPData>("PTSP Data", "The main parameters of the p-TSP."));
     94      Parameters.Add(new LookupParameter<IProbabilisticTSPData>("PTSP Data", "The main parameters of the pTSP."));
    9595      Parameters.Add(new LookupParameter<ItemList<BoolArray>>("Realizations", "The list of samples drawn from all possible stochastic instances."));
    9696    }
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.PTSP/3.3/Improvers/PTSPEstimatedTwoPointFiveLocalImprovement.cs

    r17253 r17260  
    9191      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality value of the assignment."));
    9292      Parameters.Add(new LookupParameter<BoolValue>("Maximization", "True if the problem should be maximized or minimized."));
    93       Parameters.Add(new LookupParameter<IProbabilisticTSPData>("PTSP Data", "The main parameters of the p-TSP."));
     93      Parameters.Add(new LookupParameter<IProbabilisticTSPData>("PTSP Data", "The main parameters of the pTSP."));
    9494      Parameters.Add(new LookupParameter<ReadOnlyItemList<BoolArray>>("Realizations", "The list of samples drawn from all possible stochastic instances."));
    9595    }
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.PTSP/3.3/Moves/AnalyticalPTSPMoveEvaluator.cs

    r17253 r17260  
    5858      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of a TSP solution."));
    5959      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The evaluated quality of a move on a TSP solution."));
    60       Parameters.Add(new LookupParameter<IProbabilisticTSPData>("PTSP Data", "The main parameters of the p-TSP."));
     60      Parameters.Add(new LookupParameter<IProbabilisticTSPData>("PTSP Data", "The main parameters of the pTSP."));
    6161    }
    6262
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.PTSP/3.3/Moves/EstimatedPTSPMoveEvaluator.cs

    r17253 r17260  
    5959      : base() {
    6060      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The solution as permutation."));
    61       Parameters.Add(new LookupParameter<IProbabilisticTSPData>("PTSP Data", "The main parameters of the p-TSP."));
     61      Parameters.Add(new LookupParameter<IProbabilisticTSPData>("PTSP Data", "The main parameters of the pTSP."));
    6262      Parameters.Add(new LookupParameter<ReadOnlyItemList<BoolArray>>("Realizations", "The list of samples drawn from all possible stochastic instances."));
    6363      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of a TSP solution."));
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.TravelingSalesman.Views/3.3/CoordinatesTSPDataView.cs

    r17251 r17260  
    2828
    2929namespace HeuristicLab.Problems.TravelingSalesman.Views {
    30   [View("Matrix TSP Data View")]
     30  [View("Coordinates TSP Data View")]
    3131  [Content(typeof(CoordinatesTSPData), IsDefaultView = true)]
    3232  public partial class CoordinatesTSPDataView : NamedItemView {
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.TravelingSalesman.Views/3.3/EuclideanTSPDataView.Designer.cs

    r17251 r17260  
    8787    #endregion
    8888
    89     private System.Windows.Forms.ComboBox roundingModeComboBox;
    90     private System.Windows.Forms.Label roundingModeLabel;
     89    protected System.Windows.Forms.ComboBox roundingModeComboBox;
     90    protected System.Windows.Forms.Label roundingModeLabel;
    9191  }
    9292}
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.TravelingSalesman.Views/3.3/MatrixTSPDataView.Designer.cs

    r17251 r17260  
    166166    #endregion
    167167
    168     private Data.Views.StringConvertibleMatrixView distanceMatrixView;
    169     private System.Windows.Forms.TabControl tabControl;
    170     private System.Windows.Forms.TabPage coordinatesTabPage;
    171     private System.Windows.Forms.SplitContainer coordinatesSplitContainer;
    172     private Data.Views.StringConvertibleMatrixView coordinatesMatrixView;
    173     private System.Windows.Forms.TabPage distancesTabPage;
    174     private System.Windows.Forms.PictureBox coordinatesPictureBox;
     168    protected Data.Views.StringConvertibleMatrixView distanceMatrixView;
     169    protected System.Windows.Forms.TabControl tabControl;
     170    protected System.Windows.Forms.TabPage coordinatesTabPage;
     171    protected System.Windows.Forms.SplitContainer coordinatesSplitContainer;
     172    protected Data.Views.StringConvertibleMatrixView coordinatesMatrixView;
     173    protected System.Windows.Forms.TabPage distancesTabPage;
     174    protected System.Windows.Forms.PictureBox coordinatesPictureBox;
    175175  }
    176176}
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.TravelingSalesman.Views/3.3/MatrixTSPDataView.cs

    r17251 r17260  
    6060    }
    6161
    62     private void GenerateImage() {
     62    protected virtual void GenerateImage() {
    6363      if (coordinatesPictureBox.Width > 0 && coordinatesPictureBox.Height > 0) {
    6464        DoubleMatrix coordinates = Content?.DisplayCoordinates;
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TSPSolutionView.Designer.cs

    r17248 r17260  
    215215    #endregion
    216216
    217     private System.Windows.Forms.PictureBox pictureBox;
    218     private HeuristicLab.MainForm.WindowsForms.DragOverTabControl tabControl;
    219     private System.Windows.Forms.TabPage visualizationTabPage;
    220     private System.Windows.Forms.TabPage valueTabPage;
    221     private System.Windows.Forms.GroupBox tourGroupBox;
    222     private HeuristicLab.MainForm.WindowsForms.ViewHost tourViewHost;
    223     private System.Windows.Forms.SplitContainer splitContainer;
    224     private System.Windows.Forms.GroupBox qualityGroupBox;
    225     private HeuristicLab.MainForm.WindowsForms.ViewHost qualityViewHost;
     217    protected System.Windows.Forms.PictureBox pictureBox;
     218    protected HeuristicLab.MainForm.WindowsForms.DragOverTabControl tabControl;
     219    protected System.Windows.Forms.TabPage visualizationTabPage;
     220    protected System.Windows.Forms.TabPage valueTabPage;
     221    protected System.Windows.Forms.GroupBox tourGroupBox;
     222    protected HeuristicLab.MainForm.WindowsForms.ViewHost tourViewHost;
     223    protected System.Windows.Forms.SplitContainer splitContainer;
     224    protected System.Windows.Forms.GroupBox qualityGroupBox;
     225    protected HeuristicLab.MainForm.WindowsForms.ViewHost qualityViewHost;
    226226
    227227
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.TravelingSalesman.Views/3.3/TSPSolutionView.cs

    r17248 r17260  
    3434  /// </summary>
    3535  [View("TSP Solution View")]
    36   [Content(typeof(TSPSolution), true)]
    37   public sealed partial class TSPSolutionView : ItemView {
    38     public new TSPSolution Content {
    39       get { return (TSPSolution)base.Content; }
     36  [Content(typeof(ITSPSolution), true)]
     37  public partial class TSPSolutionView : ItemView {
     38    public new ITSPSolution Content {
     39      get { return (ITSPSolution)base.Content; }
    4040      set { base.Content = value; }
    4141    }
     
    7777    }
    7878
    79     private void GenerateImage() {
     79    protected virtual void GenerateImage() {
    8080      if ((pictureBox.Width > 0) && (pictureBox.Height > 0)) {
    8181        if (Content == null) {
     
    130130    }
    131131
    132     private void ContentOnPropertyChanged(object sender, PropertyChangedEventArgs e) {
     132    protected virtual void ContentOnPropertyChanged(object sender, PropertyChangedEventArgs e) {
    133133      if (InvokeRequired)
    134134        Invoke((Action<object, PropertyChangedEventArgs>)ContentOnPropertyChanged, sender, e);
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.TravelingSalesman/3.3/TSPSolution.cs

    r17248 r17260  
    3030namespace HeuristicLab.Problems.TravelingSalesman {
    3131  [StorableType("f08a63d9-0b83-4944-9251-42925baeb872")]
    32   public interface ITSPSolution : IItem {
     32  public interface ITSPSolution : IItem, INotifyPropertyChanged {
    3333    DoubleMatrix Coordinates { get; }
    3434    Permutation Tour { get; }
     
    4141  [Item("TSP Solution", "Represents a tour of a Traveling Salesman Problem given in path representation which can be visualized in the GUI.")]
    4242  [StorableType("38d1aac3-3047-40d9-bcf9-4b3ca0b9f95c")]
    43   public sealed class TSPSolution : Item, ITSPSolution, INotifyPropertyChanged {
     43  public class TSPSolution : Item, ITSPSolution {
    4444    public static new Image StaticItemImage {
    4545      get { return HeuristicLab.Common.Resources.VSImageLibrary.Image; }
     
    7979
    8080    [StorableConstructor]
    81     private TSPSolution(StorableConstructorFlag _) : base(_) { }
    82     private TSPSolution(TSPSolution original, Cloner cloner)
     81    protected TSPSolution(StorableConstructorFlag _) : base(_) { }
     82    protected TSPSolution(TSPSolution original, Cloner cloner)
    8383      : base(original, cloner) {
    8484      this.coordinates = cloner.Clone(original.coordinates);
     
    108108
    109109    public event PropertyChangedEventHandler PropertyChanged;
    110     private void OnPropertyChanged(string property) {
     110    protected void OnPropertyChanged(string property) {
    111111      PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(property));
    112112    }
  • branches/2521_ProblemRefactoring/HeuristicLab.Tests/HeuristicLab-3.3/StorableTest.cs

    r17226 r17260  
    2727using HEAL.Attic;
    2828using HeuristicLab.Common;
     29using HeuristicLab.MainForm;
    2930using HeuristicLab.PluginInfrastructure;
    3031using Microsoft.VisualStudio.TestTools.UnitTesting;
     
    9495      Assert.IsTrue(errorMessage.Length == 0, errorMessage.ToString());
    9596    }
     97
     98    [TestMethod]
     99    [TestCategory("General")]
     100    [TestCategory("Essential")]
     101    [TestProperty("Time", "short")]
     102    public void TestStorableTypeAttributePresence() {
     103      var errorMessage = new StringBuilder();
     104      foreach (Assembly ass in AppDomain.CurrentDomain.GetAssemblies().Where(x => x.GetName().Name.StartsWith("HeuristicLab"))) {
     105        if (ass == Assembly.GetExecutingAssembly()) continue;
     106        foreach (Type t in ass.GetExportedTypes()) {
     107          if (t.IsAbstract && t.IsSealed) continue; // static classes are abstract and sealed at IL level
     108          if (t.Namespace != null && (t.Namespace.EndsWith(".Views")
     109            || t.Namespace.StartsWith("ICSharpCode")
     110            || t.Namespace.StartsWith("HeuristicLab.Problems.Instances")
     111            || t.Namespace.StartsWith("HeuristicLab.PluginInfrastructure")
     112            || t.Namespace.StartsWith("HeuristicLab.Persistence")
     113            || t.Namespace.StartsWith("HeuristicLab.MainForm")
     114            || t.Namespace.StartsWith("HeuristicLab.Clients")
     115            || t.Namespace.StartsWith("HeuristicLab.CodeEditor")))
     116            continue;
     117          if (typeof(IPlugin).IsAssignableFrom(t) || typeof(Attribute).IsAssignableFrom(t) || typeof(Exception).IsAssignableFrom(t)
     118            || typeof(EventArgs).IsAssignableFrom(t)
     119            || typeof(IView).IsAssignableFrom(t) || typeof(System.Windows.Forms.Control).IsAssignableFrom(t)) continue;
     120          var attr = StorableTypeAttribute.GetStorableTypeAttribute(t);
     121          if (attr == null) {
     122            errorMessage.AppendLine(t.FullName + ": Does not contain a storable type attribute.");
     123          }
     124        }
     125      }
     126      Assert.IsTrue(errorMessage.Length == 0, errorMessage.ToString());
     127    }
    96128  }
    97129}
Note: See TracChangeset for help on using the changeset viewer.