Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/06/12 01:43:06 (12 years ago)
Author:
abeham
Message:

#1782: trunk integration of problem instance development

  • Adapted TSP and QAP to use the new feature
  • Moved the TSPLIB importer dialog from the TSP plugin to the TSPLIB instances plugin (created a view for that provider)
  • Created it as a default view for IHeuristicOptimizationProblem in order not to interfere with other problems do not yet work with this
Location:
trunk/sources/HeuristicLab.Optimization.Views/3.3
Files:
2 added
2 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj

    r7469 r7558  
    9999  </PropertyGroup>
    100100  <ItemGroup>
     101    <Reference Include="Microsoft.CSharp" />
    101102    <Reference Include="System" />
    102103    <Reference Include="System.Core">
     
    137138    </Compile>
    138139    <Compile Include="Plugin.cs" />
     140    <Compile Include="ProblemInstanceProviderView.cs">
     141      <SubType>UserControl</SubType>
     142    </Compile>
     143    <Compile Include="ProblemInstanceProviderView.Designer.cs">
     144      <DependentUpon>ProblemInstanceProviderView.cs</DependentUpon>
     145    </Compile>
     146    <Compile Include="ProblemView.cs">
     147      <SubType>UserControl</SubType>
     148    </Compile>
     149    <Compile Include="ProblemView.designer.cs">
     150      <DependentUpon>ProblemView.cs</DependentUpon>
     151    </Compile>
    139152    <Compile Include="RunCollectionModifierListView.cs">
    140153      <SubType>UserControl</SubType>
     
    251264      <DependentUpon>EngineAlgorithmView.cs</DependentUpon>
    252265    </Compile>
    253     <Compile Include="ProblemView.cs">
    254       <SubType>UserControl</SubType>
    255     </Compile>
    256     <Compile Include="ProblemView.Designer.cs">
    257       <DependentUpon>ProblemView.cs</DependentUpon>
     266    <Compile Include="HeuristicOptimizationProblemView.cs">
     267      <SubType>UserControl</SubType>
     268    </Compile>
     269    <Compile Include="HeuristicOptimizationProblemView.Designer.cs">
     270      <DependentUpon>HeuristicOptimizationProblemView.cs</DependentUpon>
    258271    </Compile>
    259272    <Compile Include="Properties\AssemblyInfo.cs" />
     
    335348      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
    336349      <Private>False</Private>
     350    </ProjectReference>
     351    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">
     352      <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project>
     353      <Name>HeuristicLab.Problems.Instances-3.3</Name>
    337354    </ProjectReference>
    338355    <ProjectReference Include="..\..\HeuristicLab.Visualization.ChartControlsExtensions\3.3\HeuristicLab.Visualization.ChartControlsExtensions-3.3.csproj">
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/Plugin.cs.frame

    r7259 r7558  
    3838  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
    3939  [PluginDependency("HeuristicLab.Optimization", "3.3")]
     40  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
    4041  [PluginDependency("HeuristicLab.Visualization.ChartControlsExtensions","3.3")]
    4142  public class HeuristicLabOptimizationViewsPlugin : PluginBase {
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/ProblemInstanceProviderView.Designer.cs

    r7551 r7558  
    2020#endregion
    2121
    22 namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views {
     22namespace HeuristicLab.Optimization.Views {
    2323  partial class ProblemInstanceProviderView<T> {
    2424    /// <summary>
     
    4747      this.components = new System.ComponentModel.Container();
    4848      this.loadButton = new System.Windows.Forms.Button();
    49       this.label2 = new System.Windows.Forms.Label();
     49      this.instanceLabel = new System.Windows.Forms.Label();
    5050      this.instancesComboBox = new System.Windows.Forms.ComboBox();
    5151      this.importButton = new System.Windows.Forms.Button();
     
    6565      this.loadButton.Click += new System.EventHandler(this.loadButton_Click);
    6666      //
    67       // label2
     67      // instanceLabel
    6868      //
    69       this.label2.AutoSize = true;
    70       this.label2.Location = new System.Drawing.Point(-3, 3);
    71       this.label2.Name = "label2";
    72       this.label2.Size = new System.Drawing.Size(51, 13);
    73       this.label2.TabIndex = 4;
    74       this.label2.Text = "Instance:";
     69      this.instanceLabel.AutoSize = true;
     70      this.instanceLabel.Location = new System.Drawing.Point(-3, 3);
     71      this.instanceLabel.Name = "instanceLabel";
     72      this.instanceLabel.Size = new System.Drawing.Size(51, 13);
     73      this.instanceLabel.TabIndex = 4;
     74      this.instanceLabel.Text = "Instance:";
    7575      //
    7676      // instancesComboBox
     
    109109      this.Controls.Add(this.importButton);
    110110      this.Controls.Add(this.loadButton);
    111       this.Controls.Add(this.label2);
     111      this.Controls.Add(this.instanceLabel);
    112112      this.Name = "ProblemInstanceProviderView";
    113113      this.Size = new System.Drawing.Size(610, 21);
     
    119119    #endregion
    120120
    121     private System.Windows.Forms.Button loadButton;
    122     private System.Windows.Forms.Label label2;
    123     private System.Windows.Forms.ComboBox instancesComboBox;
    124     private System.Windows.Forms.Button importButton;
    125121    private System.Windows.Forms.OpenFileDialog openFileDialog;
    126122    private System.Windows.Forms.ToolTip toolTip;
     123    protected System.Windows.Forms.Button loadButton;
     124    protected System.Windows.Forms.Label instanceLabel;
     125    protected System.Windows.Forms.ComboBox instancesComboBox;
     126    protected System.Windows.Forms.Button importButton;
    127127
    128128  }
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/ProblemInstanceProviderView.cs

    r7551 r7558  
    2929using HeuristicLab.Problems.Instances;
    3030
    31 namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment.Views {
     31namespace HeuristicLab.Optimization.Views {
    3232  [View("ProblemInstanceProviderView")]
    3333  [Content(typeof(IProblemInstanceProvider<>), IsDefaultView = true)]
     
    6565    }
    6666
    67     private void loadButton_Click(object sender, EventArgs e) {
     67    protected virtual void loadButton_Click(object sender, EventArgs e) {
    6868      var descriptor = (IDataDescriptor)instancesComboBox.SelectedItem;
    6969      var instance = Content.LoadData(descriptor);
     
    7575    }
    7676
    77     private void importButton_Click(object sender, EventArgs e) {
     77    protected virtual void importButton_Click(object sender, EventArgs e) {
    7878      openFileDialog.FileName = GetProblemType() + " instance";
    7979      if (openFileDialog.ShowDialog() == DialogResult.OK) {
     
    9999    }
    100100
    101     private string GetProblemType() {
     101    protected virtual string GetProblemType() {
    102102      string dataTypeName = typeof(T).Name.Split(new char[] { '.' }, StringSplitOptions.RemoveEmptyEntries).Last();
    103103      if (dataTypeName.EndsWith("Data"))
Note: See TracChangeset for help on using the changeset viewer.