Changeset 14121
- Timestamp:
- 07/19/16 18:24:53 (8 years ago)
- Location:
- trunk/sources
- Files:
-
- 1 added
- 2 edited
- 6 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.TestFunctions.MultiObjective/3.3/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3.csproj
r14120 r14121 21 21 <DebugType>full</DebugType> 22 22 <Optimize>false</Optimize> 23 <OutputPath>..\..\ ..\..\trunk\sources\bin\</OutputPath>23 <OutputPath>..\..\bin\</OutputPath> 24 24 <DefineConstants>DEBUG;TRACE</DefineConstants> 25 25 <ErrorReport>prompt</ErrorReport> … … 30 30 <DebugType>pdbonly</DebugType> 31 31 <Optimize>true</Optimize> 32 <OutputPath>..\..\ ..\..\trunk\sources\bin\</OutputPath>32 <OutputPath>..\..\bin\</OutputPath> 33 33 <DefineConstants>TRACE</DefineConstants> 34 34 <ErrorReport>prompt</ErrorReport> -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/CrowdingTest.cs
r14111 r14121 20 20 #endregion 21 21 using System; 22 using HeuristicLab.Problems.TestFunctions.MultiObjective;23 22 using Microsoft.VisualStudio.TestTools.UnitTesting; 24 23 25 namespace MultiObjectiveTestfunctionTests {24 namespace HeuristicLab.Problems.TestFunctions.MultiObjective.Tests { 26 25 [TestClass] 27 26 public class CrowdingTest { … … 29 28 [TestMethod] 30 29 [ExpectedException(typeof(ArgumentException))] 31 [TestCategory("Problems.TestFunctions ")]30 [TestCategory("Problems.TestFunctions.MultiObjective")] 32 31 [TestProperty("Time", "short")] 33 public void EmptyFrontTest() {32 public void CrowdingTestEmptyFront() { 34 33 double[][] front = { }; 35 34 … … 38 37 39 38 [TestMethod] 40 [TestCategory("Problems.TestFunctions ")]39 [TestCategory("Problems.TestFunctions.MultiObjective")] 41 40 [TestProperty("Time", "short")] 42 public void SamePointTest() {41 public void CrowdingTestSamePoint() { 43 42 44 43 double[] point = new double[2]; … … 55 54 56 55 [TestMethod] 57 [TestCategory("Problems.TestFunctions ")]56 [TestCategory("Problems.TestFunctions.MultiObjective")] 58 57 [TestProperty("Time", "short")] 59 public void SinglePointTest() {58 public void CrowdingTestSinglePoint() { 60 59 double[] point = new double[2]; 61 60 point[0] = 0; … … 67 66 68 67 [TestMethod] 69 [TestCategory("Problems.TestFunctions ")]68 [TestCategory("Problems.TestFunctions.MultiObjective")] 70 69 [TestProperty("Time", "short")] 71 public void DiagonalTest() {70 public void CrowdingTestDiagonal() { 72 71 double[] point = new double[2]; 73 72 point[0] = 0; … … 86 85 87 86 [TestMethod] 88 [TestCategory("Problems.TestFunctions ")]87 [TestCategory("Problems.TestFunctions.MultiObjective")] 89 88 [TestProperty("Time", "short")] 90 public void DiamondTest() {89 public void CrowdingTestDiamond() { 91 90 double[] point = new double[2]; 92 91 point[0] = 0; … … 112 111 /// </summary> 113 112 [TestMethod] 114 [TestCategory("Problems.TestFunctions ")]113 [TestCategory("Problems.TestFunctions.MultiObjective")] 115 114 [TestProperty("Time", "short")] 116 public void DeltoidTest() {115 public void CrowdingTestDeltoid() { 117 116 double[] point = new double[2]; 118 117 point[0] = 0; -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/FastHyperVolumeTests.cs
r14111 r14121 20 20 #endregion 21 21 using System; 22 using System.Collections.Generic;23 using HeuristicLab.Problems.TestFunctions.MultiObjective;24 22 using Microsoft.VisualStudio.TestTools.UnitTesting; 25 23 26 namespace MultiObjectiveTestfunctionTests {24 namespace HeuristicLab.Problems.TestFunctions.MultiObjective.Tests { 27 25 [TestClass] 28 26 public class FastHypervolumeTest { … … 40 38 /// </summary> 41 39 [TestMethod] 42 [TestCategory("Problems.TestFunctions ")]40 [TestCategory("Problems.TestFunctions.MultiObjective")] 43 41 [TestProperty("Time", "short")] 44 public void SinglePointTest() {42 public void FastHypervolumeTestSinglePoint() { 45 43 double[] point = new double[] { 0.5, 0.5, 0.5 }; 46 44 double[][] front = { point }; … … 63 61 /// </summary> 64 62 [TestMethod] 65 [TestCategory("Problems.TestFunctions ")]63 [TestCategory("Problems.TestFunctions.MultiObjective")] 66 64 [TestProperty("Time", "short")] 67 public void RandomSinglePointTest() {65 public void FastHypervolumeTestRandomSinglePoint() { 68 66 //Front with a single Point 69 67 double[] point = new double[3]; 70 Random r = newRandom();68 var r = new System.Random(); 71 69 72 70 point[0] = r.NextDouble(); … … 100 98 /// Hypervolume should be 0.25 101 99 /// </summary> 102 //[TestMethod] 103 public void DiagonalPointTest() { 100 [TestMethod] 101 [TestCategory("Problems.TestFunctions.MultiObjective")] 102 [TestProperty("Time", "short")] 103 public void FastHypervolumeTestDiagonalPoint() { 104 104 //Front with three points 105 105 double[] point1 = new double[] { 1, 0, 0 }; … … 110 110 double[] referencePoint = new double[] { 1, 1, 1 }; 111 111 double hv = Hypervolume.Calculate(front, referencePoint, new bool[3]); 112 Assert.AreEqual(0. 25, hv);112 Assert.AreEqual(0.5, hv); 113 113 } 114 115 116 public void HypervolumeConsistencyTest() {117 double[] referencePoint = new double[] { 1, 1, 1 };118 bool[] maximization = new bool[3];119 List<double[]> points = new List<double[]>();120 Random r = new Random();121 for (int i = 0; i < 100; i++) {122 double[] p = new double[3];123 p[0] = r.NextDouble();124 p[1] = r.NextDouble();125 points.Add(p);126 }127 var front = NonDominatedSelect.SelectNonDominatedVectors(points, maximization, true);128 129 double dim3hv = Hypervolume.Calculate(front, referencePoint, new bool[3]);130 double dim2hv = Hypervolume.Calculate(front, referencePoint, maximization);131 132 133 134 135 }136 137 138 114 } 139 140 141 115 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/GenerationalDistanceTest.cs
r14111 r14121 20 20 #endregion 21 21 using System; 22 using HeuristicLab.Problems.TestFunctions.MultiObjective;23 22 using Microsoft.VisualStudio.TestTools.UnitTesting; 24 23 25 namespace MultiObjectiveTestfunctionTests {24 namespace HeuristicLab.Problems.TestFunctions.MultiObjective.Tests { 26 25 [TestClass] 27 26 public class GenerationalDistanceTest { … … 29 28 [TestMethod] 30 29 [ExpectedException(typeof(ArgumentException))] 31 [TestCategory("Problems.TestFunctions ")]30 [TestCategory("Problems.TestFunctions.MultiObjective")] 32 31 [TestProperty("Time", "short")] 33 public void EmptyOptimalFrontTest() {32 public void GenerationalDistanceTestEmptyOptimalFront() { 34 33 35 34 double[] point = new double[2]; … … 43 42 [TestMethod] 44 43 [ExpectedException(typeof(ArgumentException))] 45 [TestCategory("Problems.TestFunctions ")]44 [TestCategory("Problems.TestFunctions.MultiObjective")] 46 45 [TestProperty("Time", "short")] 47 public void EmptyFrontTest() {46 public void GenerationalDistanceTestEmptyFront() { 48 47 49 48 double[] point = new double[2]; … … 56 55 57 56 [TestMethod] 58 [TestCategory("Problems.TestFunctions ")]57 [TestCategory("Problems.TestFunctions.MultiObjective")] 59 58 [TestProperty("Time", "short")] 60 public void SamePointTest() {59 public void GenerationalDistanceTestSamePoint() { 61 60 62 61 double[] point = new double[2]; … … 73 72 74 73 [TestMethod] 75 [TestCategory("Problems.TestFunctions ")]74 [TestCategory("Problems.TestFunctions.MultiObjective")] 76 75 [TestProperty("Time", "short")] 77 public void SinglePointTest() {76 public void GenerationalDistanceTestSinglePoint() { 78 77 double[] point = new double[2]; 79 78 point[0] = 0; … … 89 88 90 89 [TestMethod] 91 [TestCategory("Problems.TestFunctions ")]90 [TestCategory("Problems.TestFunctions.MultiObjective")] 92 91 [TestProperty("Time", "short")] 93 public void DifferentSizesTest() {92 public void GenerationalDistanceTestDifferentSizes() { 94 93 double[] point = new double[2]; 95 94 point[0] = 0; … … 108 107 109 108 [TestMethod] 110 [TestCategory("Problems.TestFunctions ")]109 [TestCategory("Problems.TestFunctions.MultiObjective")] 111 110 [TestProperty("Time", "short")] 112 public void QuadraticTest() {111 public void GenerationalDistanceTestQuadratic() { 113 112 double[] point = new double[2]; 114 113 point[0] = 0; … … 128 127 Assert.AreEqual(1, dist); 129 128 } 130 131 132 133 129 } 134 135 136 130 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/HyperVolumeTests.cs
r14111 r14121 20 20 #endregion 21 21 using System; 22 using HeuristicLab.Problems.TestFunctions.MultiObjective;23 22 using Microsoft.VisualStudio.TestTools.UnitTesting; 24 23 25 namespace MultiObjectiveTestfunctionTests {24 namespace HeuristicLab.Problems.TestFunctions.MultiObjective.Tests { 26 25 [TestClass] 27 26 public class HypervolumeTest { … … 40 39 /// </summary> 41 40 [TestMethod] 42 [TestCategory("Problems.TestFunctions ")]43 [TestProperty("Time", "short")] 44 public void SinglePointTest() {41 [TestCategory("Problems.TestFunctions.MultiObjective")] 42 [TestProperty("Time", "short")] 43 public void HypervolumeTestSinglePoint() { 45 44 46 45 //Front with a single Point … … 97 96 /// </summary> 98 97 [TestMethod] 99 [TestCategory("Problems.TestFunctions ")]100 [TestProperty("Time", "short")] 101 public void RandomSinglePointTest() {102 //Front with a single Point 103 double[] point = new double[2]; 104 Random r = newRandom();98 [TestCategory("Problems.TestFunctions.MultiObjective")] 99 [TestProperty("Time", "short")] 100 public void HypervolumeTestRandomSinglePoint() { 101 //Front with a single Point 102 double[] point = new double[2]; 103 var r = new System.Random(); 105 104 106 105 point[0] = r.NextDouble(); … … 150 149 /// </summary> 151 150 [TestMethod] 152 [TestCategory("Problems.TestFunctions ")]153 [TestProperty("Time", "short")] 154 public void DiagonalPointTest() {151 [TestCategory("Problems.TestFunctions.MultiObjective")] 152 [TestProperty("Time", "short")] 153 public void HypervolumeTestDiagonalPoint() { 155 154 //Front with three points 156 155 double[] point1 = new double[2]; … … 200 199 [TestMethod()] 201 200 [ExpectedException(typeof(ArgumentException))] 202 [TestCategory("Problems.TestFunctions ")]203 [TestProperty("Time", "short")] 204 public void ReferencePointViolationNE() {205 //Front with a single Point 206 double[] point = new double[2]; 207 point[0] = 0.5; 208 point[1] = 0.5; 209 double[][] front = { point }; 210 211 double[] referencePoint = new double[2]; 212 bool[] maximization; 213 214 //Northeast 215 maximization = new bool[] { true, true }; 216 referencePoint[0] = 1; 217 referencePoint[1] = 1; 218 double ne = Hypervolume.Calculate(front, referencePoint, maximization); 219 } 220 221 [TestMethod()] 222 [ExpectedException(typeof(ArgumentException))] 223 [TestCategory("Problems.TestFunctions ")]224 [TestProperty("Time", "short")] 225 public void ReferencePointViolationNW() {201 [TestCategory("Problems.TestFunctions.MultiObjective")] 202 [TestProperty("Time", "short")] 203 public void HypervolumeTestReferencePointViolationNE() { 204 //Front with a single Point 205 double[] point = new double[2]; 206 point[0] = 0.5; 207 point[1] = 0.5; 208 double[][] front = { point }; 209 210 double[] referencePoint = new double[2]; 211 bool[] maximization; 212 213 //Northeast 214 maximization = new bool[] { true, true }; 215 referencePoint[0] = 1; 216 referencePoint[1] = 1; 217 double ne = Hypervolume.Calculate(front, referencePoint, maximization); 218 } 219 220 [TestMethod()] 221 [ExpectedException(typeof(ArgumentException))] 222 [TestCategory("Problems.TestFunctions.MultiObjective")] 223 [TestProperty("Time", "short")] 224 public void HypervolumeTestReferencePointViolationNW() { 226 225 //Front with a single Point 227 226 double[] point = new double[2]; … … 243 242 [TestMethod()] 244 243 [ExpectedException(typeof(ArgumentException))] 245 [TestCategory("Problems.TestFunctions ")]246 [TestProperty("Time", "short")] 247 public void ReferencePointViolationSW() {244 [TestCategory("Problems.TestFunctions.MultiObjective")] 245 [TestProperty("Time", "short")] 246 public void HypervolumeTestReferencePointViolationSW() { 248 247 //Front with a single Point 249 248 double[] point = new double[2]; … … 265 264 [TestMethod()] 266 265 [ExpectedException(typeof(ArgumentException))] 267 [TestCategory("Problems.TestFunctions ")]268 [TestProperty("Time", "short")] 269 public void ReferencePointViolationSE() {266 [TestCategory("Problems.TestFunctions.MultiObjective")] 267 [TestProperty("Time", "short")] 268 public void HypervolumeTestReferencePointViolationSE() { 270 269 //Front with a single Point 271 270 double[] point = new double[2]; … … 284 283 Assert.AreEqual(0.25, se); 285 284 } 286 287 285 } 288 289 290 286 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/InvertedGenerationalDistanceTest.cs
r14111 r14121 20 20 #endregion 21 21 using System; 22 using HeuristicLab.Problems.TestFunctions.MultiObjective;23 22 using Microsoft.VisualStudio.TestTools.UnitTesting; 24 23 25 namespace MultiObjectiveTestfunctionTests {24 namespace HeuristicLab.Problems.TestFunctions.MultiObjective.Tests { 26 25 [TestClass] 27 26 public class InvertedGenerationalDistanceTest { … … 29 28 [TestMethod] 30 29 [ExpectedException(typeof(ArgumentException))] 31 [TestCategory("Problems.TestFunctions ")]30 [TestCategory("Problems.TestFunctions.MultiObjective")] 32 31 [TestProperty("Time", "short")] 33 public void EmptyOptimalFrontTest() {32 public void InvertedGenerationalDistanceTestEmptyOptimalFront() { 34 33 35 34 double[] point = new double[2]; … … 43 42 [TestMethod] 44 43 [ExpectedException(typeof(ArgumentException))] 45 [TestCategory("Problems.TestFunctions ")]44 [TestCategory("Problems.TestFunctions.MultiObjective")] 46 45 [TestProperty("Time", "short")] 47 public void EmptyFrontTest() {46 public void InvertedGenerationalDistanceTestEmptyFront() { 48 47 49 48 double[] point = new double[2]; … … 56 55 57 56 [TestMethod] 58 [TestCategory("Problems.TestFunctions ")]57 [TestCategory("Problems.TestFunctions.MultiObjective")] 59 58 [TestProperty("Time", "short")] 60 public void SamePointTest() {59 public void InvertedGenerationalDistanceTestSamePoint() { 61 60 double[] point = new double[2]; 62 61 point[0] = 0.5; … … 72 71 73 72 [TestMethod] 74 [TestCategory("Problems.TestFunctions ")]73 [TestCategory("Problems.TestFunctions.MultiObjective")] 75 74 [TestProperty("Time", "short")] 76 public void SinglePointTest() {75 public void InvertedGenerationalDistanceTestSinglePoint() { 77 76 double[] point = new double[2]; 78 77 point[0] = 0; … … 88 87 89 88 [TestMethod] 90 [TestCategory("Problems.TestFunctions ")]89 [TestCategory("Problems.TestFunctions.MultiObjective")] 91 90 [TestProperty("Time", "short")] 92 public void DifferentSizesTest() {91 public void InvertedGenerationalDistanceTestDifferentSizes() { 93 92 double[] point = new double[2]; 94 93 point[0] = 0; … … 107 106 108 107 [TestMethod] 109 [TestCategory("Problems.TestFunctions ")]108 [TestCategory("Problems.TestFunctions.MultiObjective")] 110 109 [TestProperty("Time", "short")] 111 public void QuadraticTest() {110 public void InvertedGenerationalDistanceTestQuadratic() { 112 111 double[] point = new double[2]; 113 112 point[0] = 0; -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Problems.TestFunctions.MultiObjective-3.3/SpacingTest.cs
r14111 r14121 20 20 #endregion 21 21 using System; 22 using HeuristicLab.Problems.TestFunctions.MultiObjective;23 22 using Microsoft.VisualStudio.TestTools.UnitTesting; 24 23 25 namespace MultiObjectiveTestfunctionTests {24 namespace HeuristicLab.Problems.TestFunctions.MultiObjective.Tests { 26 25 [TestClass] 27 26 public class SpacingTest { 28 29 30 27 [TestMethod] 31 28 [ExpectedException(typeof(ArgumentException))] 32 [TestCategory("Problems.TestFunctions ")]29 [TestCategory("Problems.TestFunctions.MultiObjective")] 33 30 [TestProperty("Time", "short")] 34 public void EmptyFrontTest() {31 public void SpacingTestEmptyFront() { 35 32 double[][] front = { }; 36 33 … … 39 36 40 37 [TestMethod] 41 [TestCategory("Problems.TestFunctions ")]38 [TestCategory("Problems.TestFunctions.MultiObjective")] 42 39 [TestProperty("Time", "short")] 43 public void S amePointTest() {40 public void SpacingTestSamePoint() { 44 41 45 42 double[] point = new double[2]; … … 56 53 57 54 [TestMethod] 58 [TestCategory("Problems.TestFunctions ")]55 [TestCategory("Problems.TestFunctions.MultiObjective")] 59 56 [TestProperty("Time", "short")] 60 public void S inglePointTest() {57 public void SpacingTestSinglePoint() { 61 58 double[] point = new double[2]; 62 59 point[0] = 0; … … 68 65 69 66 [TestMethod] 70 [TestCategory("Problems.TestFunctions ")]67 [TestCategory("Problems.TestFunctions.MultiObjective")] 71 68 [TestProperty("Time", "short")] 72 public void QuadraticTest() {69 public void SpacingTestQuadratic() { 73 70 double[] point = new double[2]; 74 71 point[0] = 0; … … 90 87 91 88 [TestMethod] 92 [TestCategory("Problems.TestFunctions ")]89 [TestCategory("Problems.TestFunctions.MultiObjective")] 93 90 [TestProperty("Time", "short")] 94 public void RectangularTest() {91 public void SpacingTestRectangular() { 95 92 double[] point = new double[2]; 96 93 point[0] = 0; … … 117 114 /// </summary> 118 115 [TestMethod] 119 [TestCategory("Problems.TestFunctions ")]116 [TestCategory("Problems.TestFunctions.MultiObjective")] 120 117 [TestProperty("Time", "short")] 121 public void DeltoidTest() {118 public void SpacingTestDeltoid() { 122 119 double[] point = new double[2]; 123 120 point[0] = 0; … … 137 134 Assert.AreEqual(Math.Sqrt(3), dist); 138 135 } 139 140 141 136 } 142 143 144 137 } -
trunk/sources/HeuristicLab.Tests/HeuristicLab.Tests.csproj
r14024 r14121 385 385 <Reference Include="HeuristicLab.Problems.TestFunctions-3.3"> 386 386 <HintPath>..\bin\HeuristicLab.Problems.TestFunctions-3.3.dll</HintPath> 387 <Private>False</Private> 388 </Reference> 389 <Reference Include="HeuristicLab.Problems.TestFunctions.MultiObjective-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 390 <SpecificVersion>False</SpecificVersion> 391 <HintPath>..\bin\HeuristicLab.Problems.TestFunctions.MultiObjective-3.3.dll</HintPath> 387 392 <Private>False</Private> 388 393 </Reference> … … 594 599 <Compile Include="HeuristicLab.Problems.TestFunctions-3.3\SumSquaresEvaluatorTest.cs" /> 595 600 <Compile Include="HeuristicLab.Problems.TestFunctions-3.3\ZakharovEvaluatorTest.cs" /> 601 <Compile Include="HeuristicLab.Problems.TestFunctions.MultiObjective-3.3\CrowdingTest.cs" /> 602 <Compile Include="HeuristicLab.Problems.TestFunctions.MultiObjective-3.3\FastHyperVolumeTests.cs" /> 603 <Compile Include="HeuristicLab.Problems.TestFunctions.MultiObjective-3.3\GenerationalDistanceTest.cs" /> 604 <Compile Include="HeuristicLab.Problems.TestFunctions.MultiObjective-3.3\HyperVolumeTests.cs" /> 605 <Compile Include="HeuristicLab.Problems.TestFunctions.MultiObjective-3.3\InvertedGenerationalDistanceTest.cs" /> 606 <Compile Include="HeuristicLab.Problems.TestFunctions.MultiObjective-3.3\SpacingTest.cs" /> 596 607 <Compile Include="HeuristicLab.Problems.TravelingSalesman-3.3\TSPMoveEvaluatorTest.cs" /> 597 608 <Compile Include="HeuristicLab.Problems.LinearAssignment-3.3\LinearAssignmentProblemSolverTest.cs" />
Note: See TracChangeset
for help on using the changeset viewer.