Changeset 10060 for branches/HeuristicLab.Analysis.AlgorithmBehavior
- Timestamp:
- 10/17/13 16:34:53 (11 years ago)
- Location:
- branches/HeuristicLab.Analysis.AlgorithmBehavior
- Files:
-
- 6 added
- 8 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Analysis.AlgorithmBehavior/AlgorithmBehaviorUnitTests/AlgorithmBehaviorUnitTests.csproj
r10026 r10060 76 76 </Choose> 77 77 <ItemGroup> 78 <Compile Include="UnitTest2.cs" /> 78 <Compile Include="LPConvexHullSortingTest.cs" /> 79 <Compile Include="LPConvexHullTest.cs" /> 80 <Compile Include="PermutationCacheTest.cs" /> 81 <Compile Include="DistanceMatrixToPointsTest.cs" /> 79 82 <Compile Include="Properties\AssemblyInfo.cs" /> 80 83 <Compile Include="ConvexHullTest.cs" /> -
branches/HeuristicLab.Analysis.AlgorithmBehavior/AlgorithmBehaviorUnitTests/PermutationCacheTest.cs
r10048 r10060 1 using System.Linq; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System.Linq; 2 23 using HeuristicLab.Analysis.SolutionCaching; 3 24 using HeuristicLab.Analysis.SolutionCaching.PermutationEncoding; … … 7 28 namespace AlgorithmBehaviorUnitTests { 8 29 [TestClass] 9 public class UnitTest2{30 public class PermutationCacheTest { 10 31 [TestMethod] 11 32 public void TestPermutationSolutionDictionary() { -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/ConvexHullView.Designer.cs
r10027 r10060 40 40 // resultsTextBox 41 41 // 42 this.resultsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 43 | System.Windows.Forms.AnchorStyles.Left) 42 this.resultsTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 43 | System.Windows.Forms.AnchorStyles.Left) 44 44 | System.Windows.Forms.AnchorStyles.Right))); 45 45 this.resultsTextBox.Location = new System.Drawing.Point(3, 33); … … 64 64 #endregion 65 65 66 pr ivateSystem.Windows.Forms.Button testConvexHullButton;67 pr ivateSystem.Windows.Forms.TextBox resultsTextBox;66 protected System.Windows.Forms.Button testConvexHullButton; 67 protected System.Windows.Forms.TextBox resultsTextBox; 68 68 69 69 } -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/ConvexHullView.cs
r10027 r10060 42 42 } 43 43 44 protected v oid testConvexHullButton_Click(object sender, System.EventArgs e) {44 protected virtual void testConvexHullButton_Click(object sender, System.EventArgs e) { 45 45 for (int i = 0; i < 20; i++) { 46 46 var sols = Content.GetSolutionsFromGeneration(i); -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views-3.3.csproj
r10027 r10060 93 93 <Private>False</Private> 94 94 </Reference> 95 <Reference Include="HeuristicLab.Optimization.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 96 <SpecificVersion>False</SpecificVersion> 97 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath> 98 <Private>False</Private> 99 </Reference> 95 100 <Reference Include="HeuristicLab.Optimization.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 96 101 <Private>False</Private> … … 117 122 <SpecificVersion>False</SpecificVersion> 118 123 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath> 124 <Private>False</Private> 125 </Reference> 126 <Reference Include="HeuristicLab.Problems.TravelingSalesman-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 127 <SpecificVersion>False</SpecificVersion> 128 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.TravelingSalesman-3.3.dll</HintPath> 119 129 <Private>False</Private> 120 130 </Reference> -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views/3.3/PermutationConvexHullView.cs
r10027 r10060 20 20 #endregion 21 21 22 using System; 22 23 using System.Linq; 23 24 using HeuristicLab.Analysis.SolutionCaching.PermutationEncoding; 24 25 using HeuristicLab.Encodings.PermutationEncoding; 25 26 using HeuristicLab.MainForm; 27 using HeuristicLab.Problems.TravelingSalesman; 26 28 27 29 namespace HeuristicLab.Analysis.AlgorithmBehavior.Analyzers.Views { … … 34 36 return vertex; 35 37 } 38 39 protected override void testConvexHullButton_Click(object sender, System.EventArgs e) { 40 for (int i = 0; i < 20; i++) { 41 var sols = Content.GetSolutionsFromGeneration(i); 42 //double[][] pop = sols.Select(x => ConvertPermutationToVertex(x)).ToArray(); 43 //TODO: simCalculators should be somehow be selected based on problem 44 45 double[][] dm = new double[sols.Count][]; 46 for (int j = 0; j < sols.Count; j++) { 47 dm[j] = new double[sols.Count]; 48 } 49 50 for (int j = 0; j < sols.Count; j++) { 51 for (int k = 0; k < sols.Count; k++) { 52 dm[j][k] = TSPSimilarityCalculator.CalculateSimilarity(sols[j], sols[k]); 53 } 54 } 55 56 double[][] popPoints = DistanceMatrixToPoints.ConvertDistanceMatrixToPoints(dm); 57 58 var convexHull = HyperHull.CalculateUsingSMO(popPoints); 59 resultsTextBox.Text += "Nr. of Points in Generation " + i + ": " + convexHull.Count + Environment.NewLine; 60 resultsTextBox.Text += "Volume of Convex Hull in Generation " + i + " is: " + 61 ConvexHullMeasures.CalculateVolume(convexHull) + Environment.NewLine; 62 } 63 } 36 64 } 37 65 } -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/ConvexHullMeasures.cs
r10008 r10060 51 51 } 52 52 53 //calculate inner pointfor boundary triangulation (slowwwww.....)53 //calculate center for boundary triangulation (slowwwww.....) 54 54 private static double[] CalculateInnerPoint(List<double[]> hyperHull) { 55 55 double[] result = new double[hyperHull[0].Count()]; 56 56 57 57 for (int i = 0; i < hyperHull[0].Count(); i++) { 58 result[i] = hyperHull.Max(x => x[i]) - hyperHull.Min(x => x[i]);58 result[i] = (hyperHull.Max(x => x[i]) + hyperHull.Min(x => x[i])) / 2.0; 59 59 } 60 60 -
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers/3.3/HeuristicLab.Analysis.AlgorithmBehavior.Analyzers-3.3.csproj
r10026 r10060 118 118 </ItemGroup> 119 119 <ItemGroup> 120 <Compile Include="DistanceMatrixToPoints.cs" /> 121 <Compile Include="VertexComparer.cs" /> 120 122 <Compile Include="CombinedOperator.cs" /> 121 123 <Compile Include="AlgorithmBehaviorHelpers.cs" /> … … 133 135 <Compile Include="ConvexHullMeasures.cs" /> 134 136 <Compile Include="IntegerExtensions.cs" /> 137 <Compile Include="LPHull.cs" /> 135 138 <Compile Include="SelectionPressureAnalyzer.cs" /> 136 139 <Compile Include="SVM.cs" /> -
branches/HeuristicLab.Analysis.AlgorithmBehavior/MIConvexHull/MIConvexHull.csproj
r9730 r10060 30 30 <DebugType>full</DebugType> 31 31 <Optimize>false</Optimize> 32 <OutputPath>..\..\..\ ..\trunk\sources\bin\</OutputPath>32 <OutputPath>..\..\..\trunk\sources\bin\</OutputPath> 33 33 <DefineConstants>DEBUG;TRACE</DefineConstants> 34 34 <ErrorReport>prompt</ErrorReport> … … 38 38 <DebugType>pdbonly</DebugType> 39 39 <Optimize>true</Optimize> 40 <OutputPath>..\..\..\ ..\trunk\sources\bin\</OutputPath>40 <OutputPath>..\..\..\trunk\sources\bin\</OutputPath> 41 41 <DefineConstants>TRACE</DefineConstants> 42 42 <ErrorReport>prompt</ErrorReport>
Note: See TracChangeset
for help on using the changeset viewer.