Changeset 9730


Ignore:
Timestamp:
07/22/13 12:05:19 (6 years ago)
Author:
ascheibe
Message:

#1886 added a library that calculates convex hulls

Location:
branches/HeuristicLab.Analysis.AlgorithmBehavior
Files:
22 added
5 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views-3.3.csproj

    r9728 r9730  
    8383      <Private>False</Private>
    8484    </Reference>
     85    <Reference Include="HeuristicLab.Encodings.PermutationEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     86      <SpecificVersion>False</SpecificVersion>
     87      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.PermutationEncoding-3.3.dll</HintPath>
     88    </Reference>
    8589    <Reference Include="HeuristicLab.MainForm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    8690      <Private>False</Private>
     
    129133  </ItemGroup>
    130134  <ItemGroup>
     135    <Compile Include="ConvexHullView.cs">
     136      <SubType>UserControl</SubType>
     137    </Compile>
     138    <Compile Include="ConvexHullView.Designer.cs">
     139      <DependentUpon>ConvexHullView.cs</DependentUpon>
     140    </Compile>
    131141    <Compile Include="CreateExperimentDialog.cs">
    132142      <SubType>Form</SubType>
     
    151161    <Compile Include="Plugin.cs" />
    152162    <Compile Include="Properties\AssemblyInfo.cs" />
     163    <Compile Include="Properties\Resources.Designer.cs">
     164      <AutoGen>True</AutoGen>
     165      <DesignTime>True</DesignTime>
     166      <DependentUpon>Resources.resx</DependentUpon>
     167    </Compile>
    153168    <Compile Include="SuccessorConfigurator.cs">
    154169      <SubType>Form</SubType>
     
    170185      <Private>False</Private>
    171186    </ProjectReference>
     187    <ProjectReference Include="..\..\MIConvexHull\MIConvexHull.csproj">
     188      <Project>{2337776d-7d0c-40aa-a439-c26c3ce24fab}</Project>
     189      <Name>MIConvexHull</Name>
     190    </ProjectReference>
    172191  </ItemGroup>
    173192  <ItemGroup>
    174193    <EmbeddedResource Include="CreateExperimentDialog.resx">
    175194      <DependentUpon>CreateExperimentDialog.cs</DependentUpon>
     195    </EmbeddedResource>
     196    <EmbeddedResource Include="Properties\Resources.resx">
     197      <Generator>ResXFileCodeGenerator</Generator>
     198      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
    176199    </EmbeddedResource>
    177200  </ItemGroup>
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/PermutationSolutionDictionaryView.Designer.cs

    r9728 r9730  
    3030      this.partialSizeTextBox = new System.Windows.Forms.TextBox();
    3131      this.completeSizeTextBox = new System.Windows.Forms.TextBox();
     32      this.toolStrip = new System.Windows.Forms.ToolStrip();
     33      this.analyzeToolStripButton = new System.Windows.Forms.ToolStripDropDownButton();
     34      this.toolStrip.SuspendLayout();
    3235      this.SuspendLayout();
    3336      //
     
    3538      //
    3639      this.label1.AutoSize = true;
    37       this.label1.Location = new System.Drawing.Point(3, 10);
     40      this.label1.Location = new System.Drawing.Point(3, 60);
    3841      this.label1.Name = "label1";
    3942      this.label1.Size = new System.Drawing.Size(64, 13);
     
    4447      //
    4548      this.label2.AutoSize = true;
    46       this.label2.Location = new System.Drawing.Point(3, 42);
     49      this.label2.Location = new System.Drawing.Point(3, 92);
    4750      this.label2.Name = "label2";
    4851      this.label2.Size = new System.Drawing.Size(108, 13);
     
    5356      //
    5457      this.label3.AutoSize = true;
    55       this.label3.Location = new System.Drawing.Point(3, 74);
     58      this.label3.Location = new System.Drawing.Point(3, 124);
    5659      this.label3.Name = "label3";
    5760      this.label3.Size = new System.Drawing.Size(123, 13);
     
    6366      this.cacheSizeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    6467            | System.Windows.Forms.AnchorStyles.Right)));
    65       this.cacheSizeTextBox.Location = new System.Drawing.Point(132, 7);
     68      this.cacheSizeTextBox.Location = new System.Drawing.Point(132, 57);
    6669      this.cacheSizeTextBox.Name = "cacheSizeTextBox";
    6770      this.cacheSizeTextBox.ReadOnly = true;
     
    7376      this.partialSizeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    7477            | System.Windows.Forms.AnchorStyles.Right)));
    75       this.partialSizeTextBox.Location = new System.Drawing.Point(132, 39);
     78      this.partialSizeTextBox.Location = new System.Drawing.Point(132, 89);
    7679      this.partialSizeTextBox.Name = "partialSizeTextBox";
    7780      this.partialSizeTextBox.ReadOnly = true;
     
    8386      this.completeSizeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    8487            | System.Windows.Forms.AnchorStyles.Right)));
    85       this.completeSizeTextBox.Location = new System.Drawing.Point(132, 71);
     88      this.completeSizeTextBox.Location = new System.Drawing.Point(132, 121);
    8689      this.completeSizeTextBox.Name = "completeSizeTextBox";
    8790      this.completeSizeTextBox.ReadOnly = true;
     
    8992      this.completeSizeTextBox.TabIndex = 5;
    9093      //
     94      // toolStrip
     95      //
     96      this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
     97            this.analyzeToolStripButton});
     98      this.toolStrip.Location = new System.Drawing.Point(0, 0);
     99      this.toolStrip.Name = "toolStrip";
     100      this.toolStrip.Size = new System.Drawing.Size(486, 25);
     101      this.toolStrip.TabIndex = 6;
     102      //
     103      // analyzeToolStripButton
     104      //
     105      this.analyzeToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
     106      this.analyzeToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
     107      this.analyzeToolStripButton.Name = "analyzeToolStripButton";
     108      this.analyzeToolStripButton.Size = new System.Drawing.Size(61, 22);
     109      this.analyzeToolStripButton.Text = "Analyze";
     110      //
    91111      // PermutationSolutionDictionaryView
    92112      //
    93113      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    94114      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     115      this.Controls.Add(this.toolStrip);
    95116      this.Controls.Add(this.completeSizeTextBox);
    96117      this.Controls.Add(this.partialSizeTextBox);
     
    100121      this.Controls.Add(this.label1);
    101122      this.Name = "PermutationSolutionDictionaryView";
    102       this.Size = new System.Drawing.Size(486, 98);
     123      this.Size = new System.Drawing.Size(486, 175);
     124      this.toolStrip.ResumeLayout(false);
     125      this.toolStrip.PerformLayout();
    103126      this.ResumeLayout(false);
    104127      this.PerformLayout();
     
    114137    private System.Windows.Forms.TextBox partialSizeTextBox;
    115138    private System.Windows.Forms.TextBox completeSizeTextBox;
     139    private System.Windows.Forms.ToolStrip toolStrip;
     140    private System.Windows.Forms.ToolStripDropDownButton analyzeToolStripButton;
    116141  }
    117142}
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/PermutationSolutionDictionaryView.cs

    r9728 r9730  
    2020#endregion
    2121
     22using System;
     23using System.Linq;
    2224using System.Windows.Forms;
    2325using HeuristicLab.Core.Views;
    2426using HeuristicLab.MainForm;
     27using HeuristicLab.MainForm.WindowsForms;
    2528
    2629namespace HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views {
     
    4851        completeSizeTextBox.Text = Content.NumberOfCompleteSolutions().ToString();
    4952      }
    50     }                                                                             
     53    }
     54
     55    protected override void OnInitialized(EventArgs e) {
     56      base.OnInitialized(e);
     57      var viewTypes = MainFormManager.GetViewTypes(typeof(PermutationSolutionDictionary<PermutationWrapper, PermutationInformation>), true);
     58      foreach (Type viewType in viewTypes.OrderBy(x => ViewAttribute.GetViewName(x))) {
     59        if ((viewType != typeof(PermutationSolutionDictionaryView)) && (viewType != typeof(ViewHost))) {
     60          ToolStripMenuItem menuItem = new ToolStripMenuItem();
     61          menuItem.Text = ViewAttribute.GetViewName(viewType);
     62          menuItem.Tag = viewType;
     63          menuItem.Click += new EventHandler(menuItem_Click);
     64          analyzeToolStripButton.DropDownItems.Add(menuItem);
     65        }
     66      }
     67    }
     68
     69    private void menuItem_Click(object sender, EventArgs e) {
     70      ToolStripMenuItem menuItem = (ToolStripMenuItem)sender;
     71      Type viewType = (Type)menuItem.Tag;
     72      IContentView view = MainFormManager.MainForm.ShowContent(Content, viewType);
     73      if (view != null) {
     74        view.Locked = Locked;
     75        view.ReadOnly = ReadOnly;
     76      }
     77    }
    5178  }
    5279}
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/SolutionsCaching/PermutationSolutionDictionary.cs

    r9728 r9730  
    9292      return solutionDictionary.Where(x => x.Key.ElementType == ElementType.Complete).Count();
    9393    }
     94
     95    public List<PermutationWrapper> GetSolutionsFromGeneration(int generation) {
     96      return solutionDictionary.Where(x => x.Value.Where(y => y.Generation == generation).Count() != 0).Select(x => x.Key).ToList<PermutationWrapper>();
     97    }
    9498  }
    9599}
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.sln

    r9728 r9730  
    1515EndProject
    1616Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AlgorithmBehaviorUnitTests", "AlgorithmBehaviorUnitTests\AlgorithmBehaviorUnitTests.csproj", "{8EFDEA16-A348-401F-82FC-C7E08FDA1C5A}"
     17EndProject
     18Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MIConvexHull", "MIConvexHull\MIConvexHull.csproj", "{2337776D-7D0C-40AA-A439-C26C3CE24FAB}"
    1719EndProject
    1820Global
     
    6264    {8EFDEA16-A348-401F-82FC-C7E08FDA1C5A}.Release|x64.ActiveCfg = Release|Any CPU
    6365    {8EFDEA16-A348-401F-82FC-C7E08FDA1C5A}.Release|x86.ActiveCfg = Release|Any CPU
     66    {2337776D-7D0C-40AA-A439-C26C3CE24FAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     67    {2337776D-7D0C-40AA-A439-C26C3CE24FAB}.Debug|Any CPU.Build.0 = Debug|Any CPU
     68    {2337776D-7D0C-40AA-A439-C26C3CE24FAB}.Debug|x64.ActiveCfg = Debug|Any CPU
     69    {2337776D-7D0C-40AA-A439-C26C3CE24FAB}.Debug|x86.ActiveCfg = Debug|Any CPU
     70    {2337776D-7D0C-40AA-A439-C26C3CE24FAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
     71    {2337776D-7D0C-40AA-A439-C26C3CE24FAB}.Release|Any CPU.Build.0 = Release|Any CPU
     72    {2337776D-7D0C-40AA-A439-C26C3CE24FAB}.Release|x64.ActiveCfg = Release|Any CPU
     73    {2337776D-7D0C-40AA-A439-C26C3CE24FAB}.Release|x86.ActiveCfg = Release|Any CPU
    6474  EndGlobalSection
    6575  GlobalSection(SolutionProperties) = preSolution
Note: See TracChangeset for help on using the changeset viewer.