Changeset 14678 for branches/PerformanceComparison
- Timestamp:
- 02/17/17 12:51:44 (8 years ago)
- Location:
- branches/PerformanceComparison
- Files:
-
- 12 added
- 12 edited
- 2 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/PerformanceComparison/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLab.Algorithms.DataAnalysis-3.4.csproj
r14518 r14678 54 54 <DebugType>pdbonly</DebugType> 55 55 <Optimize>true</Optimize> 56 <OutputPath> $(SolutionDir)\bin\</OutputPath>56 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 57 57 <DefineConstants>TRACE</DefineConstants> 58 58 <ErrorReport>prompt</ErrorReport> … … 65 65 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> 66 66 <DebugSymbols>true</DebugSymbols> 67 <OutputPath> $(SolutionDir)\bin\</OutputPath>67 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 68 68 <DefineConstants>DEBUG;TRACE</DefineConstants> 69 69 <DebugType>full</DebugType> … … 74 74 </PropertyGroup> 75 75 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> 76 <OutputPath> $(SolutionDir)\bin\</OutputPath>76 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 77 77 <DefineConstants>TRACE</DefineConstants> 78 78 <DocumentationFile> … … 87 87 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> 88 88 <DebugSymbols>true</DebugSymbols> 89 <OutputPath> $(SolutionDir)\bin\</OutputPath>89 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 90 90 <DefineConstants>DEBUG;TRACE</DefineConstants> 91 91 <DebugType>full</DebugType> … … 96 96 </PropertyGroup> 97 97 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> 98 <OutputPath> $(SolutionDir)\bin\</OutputPath>98 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 99 99 <DefineConstants>TRACE</DefineConstants> 100 100 <DocumentationFile> … … 109 109 <ItemGroup> 110 110 <Reference Include="ALGLIB-3.7.0, Version=3.7.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 111 <HintPath>..\..\ bin\ALGLIB-3.7.0.dll</HintPath>111 <HintPath>..\..\..\..\trunk\sources\bin\ALGLIB-3.7.0.dll</HintPath> 112 112 <Private>False</Private> 113 113 </Reference> … … 115 115 <SpecificVersion>False</SpecificVersion> 116 116 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.GradientDescent-3.3.dll</HintPath> 117 <Private>False</Private> 117 118 </Reference> 118 119 <Reference Include="HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 119 120 <SpecificVersion>False</SpecificVersion> 120 121 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.dll</HintPath> 121 </Reference> 122 <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 123 <SpecificVersion>False</SpecificVersion> 124 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Analysis-3.3.dll</HintPath> 122 <Private>False</Private> 125 123 </Reference> 126 124 <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 127 125 <SpecificVersion>False</SpecificVersion> 128 126 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath> 127 <Private>False</Private> 129 128 </Reference> 130 129 <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 131 130 <SpecificVersion>False</SpecificVersion> 132 131 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath> 132 <Private>False</Private> 133 133 </Reference> 134 134 <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 135 135 <SpecificVersion>False</SpecificVersion> 136 136 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath> 137 <Private>False</Private> 137 138 </Reference> 138 139 <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 139 140 <SpecificVersion>False</SpecificVersion> 140 141 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath> 142 <Private>False</Private> 141 143 </Reference> 142 144 <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 143 145 <SpecificVersion>False</SpecificVersion> 144 146 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath> 147 <Private>False</Private> 145 148 </Reference> 146 149 <Reference Include="HeuristicLab.Encodings.RealVectorEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 147 150 <SpecificVersion>False</SpecificVersion> 148 151 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.RealVectorEncoding-3.3.dll</HintPath> 152 <Private>False</Private> 149 153 </Reference> 150 154 <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 151 155 <SpecificVersion>False</SpecificVersion> 152 156 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll</HintPath> 157 <Private>False</Private> 153 158 </Reference> 154 159 <Reference Include="HeuristicLab.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 155 160 <SpecificVersion>False</SpecificVersion> 156 161 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath> 157 </Reference> 158 <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 159 <SpecificVersion>False</SpecificVersion> 160 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath> 162 <Private>False</Private> 161 163 </Reference> 162 164 <Reference Include="HeuristicLab.Parameters-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 163 165 <SpecificVersion>False</SpecificVersion> 164 166 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath> 167 <Private>False</Private> 165 168 </Reference> 166 169 <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 167 170 <SpecificVersion>False</SpecificVersion> 168 171 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath> 172 <Private>False</Private> 169 173 </Reference> 170 174 <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 171 175 <SpecificVersion>False</SpecificVersion> 172 176 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 177 <Private>False</Private> 173 178 </Reference> 174 179 <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 175 180 <SpecificVersion>False</SpecificVersion> 176 181 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath> 182 <Private>False</Private> 177 183 </Reference> 178 184 <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 179 185 <SpecificVersion>False</SpecificVersion> 180 186 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.dll</HintPath> 187 <Private>False</Private> 181 188 </Reference> 182 189 <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 183 190 <SpecificVersion>False</SpecificVersion> 184 191 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.dll</HintPath> 192 <Private>False</Private> 185 193 </Reference> 186 194 <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 187 195 <SpecificVersion>False</SpecificVersion> 188 196 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.dll</HintPath> 197 <Private>False</Private> 189 198 </Reference> 190 199 <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 191 200 <SpecificVersion>False</SpecificVersion> 192 201 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4.dll</HintPath> 202 <Private>False</Private> 193 203 </Reference> 194 204 <Reference Include="HeuristicLab.Problems.Instances-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 195 205 <SpecificVersion>False</SpecificVersion> 196 206 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath> 207 <Private>False</Private> 197 208 </Reference> 198 209 <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 199 210 <SpecificVersion>False</SpecificVersion> 200 211 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath> 212 <Private>False</Private> 201 213 </Reference> 202 214 <Reference Include="HeuristicLab.Selection-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 203 215 <SpecificVersion>False</SpecificVersion> 204 216 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Selection-3.3.dll</HintPath> 217 <Private>False</Private> 205 218 </Reference> 206 219 <Reference Include="LibSVM-3.12, Version=3.12.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 207 <HintPath>..\..\ bin\LibSVM-3.12.dll</HintPath>220 <HintPath>..\..\..\..\trunk\sources\bin\LibSVM-3.12.dll</HintPath> 208 221 <Private>False</Private> 209 222 </Reference> … … 457 470 </BootstrapperPackage> 458 471 </ItemGroup> 472 <ItemGroup> 473 <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj"> 474 <Project>{887425b4-4348-49ed-a457-b7d2c26ddbf9}</Project> 475 <Name>HeuristicLab.Analysis-3.3</Name> 476 <Private>False</Private> 477 </ProjectReference> 478 <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj"> 479 <Project>{14ab8d24-25bc-400c-a846-4627aa945192}</Project> 480 <Name>HeuristicLab.Optimization-3.3</Name> 481 <Private>False</Private> 482 </ProjectReference> 483 </ItemGroup> 459 484 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> 460 485 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
branches/PerformanceComparison/HeuristicLab.Algorithms.MemPR/3.3/HeuristicLab.Algorithms.MemPR-3.3.csproj
r14666 r14678 192 192 </ItemGroup> 193 193 <ItemGroup> 194 <ProjectReference Include="..\..\HeuristicLab.Analysis.FitnessLandscape\3.3\HeuristicLab.Analysis.FitnessLandscape-3.3.csproj"> 195 <Project>{5fbdcd4a-3c2a-4ec6-83ce-34b29f43621a}</Project> 196 <Name>HeuristicLab.Analysis.FitnessLandscape-3.3</Name> 197 <Private>False</Private> 198 </ProjectReference> 194 199 <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj"> 195 200 <Project>{887425b4-4348-49ed-a457-b7d2c26ddbf9}</Project> -
branches/PerformanceComparison/HeuristicLab.Algorithms.MemPR/3.3/MemPRContext.cs
r14666 r14678 25 25 using System.Runtime.CompilerServices; 26 26 using System.Threading; 27 using HeuristicLab.Algorithms.DataAnalysis;28 27 using HeuristicLab.Algorithms.MemPR.Interfaces; 29 using HeuristicLab.Analysis ;28 using HeuristicLab.Analysis.FitnessLandscape; 30 29 using HeuristicLab.Common; 31 30 using HeuristicLab.Core; … … 34 33 using HeuristicLab.Parameters; 35 34 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 36 using HeuristicLab.Problems.DataAnalysis;37 35 using HeuristicLab.Random; 38 36 using ExecutionContext = HeuristicLab.Core.ExecutionContext; … … 167 165 168 166 [Storable] 167 private IValueParameter<DirectedPath<TSolution>> relinkedPaths; 168 public DirectedPath<TSolution> RelinkedPaths { 169 get { return relinkedPaths.Value; } 170 set { relinkedPaths.Value = value; } 171 } 172 173 [Storable] 169 174 private IValueParameter<IRandom> random; 170 175 public IRandom Random { … … 221 226 public IEnumerable<Tuple<double, double>> AdaptivewalkingStat { 222 227 get { return adaptivewalkingStat; } 228 } 229 230 public double AverageQuality { 231 get { 232 return Problem.Parameters.ContainsKey("AverageQuality") 233 ? ((IValueParameter<DoubleValue>)Problem.Parameters["AverageQuality"]).Value.Value 234 : double.NaN; 235 } 236 } 237 238 public double LowerBound { 239 get { 240 return Problem.Parameters.ContainsKey("LowerBound") 241 ? ((IValueParameter<DoubleValue>)Problem.Parameters["LowerBound"]).Value.Value 242 : double.NaN; 243 } 223 244 } 224 245 … … 245 266 byHillclimbing = cloner.Clone(original.byHillclimbing); 246 267 byAdaptivewalking = cloner.Clone(original.byAdaptivewalking); 268 relinkedPaths = cloner.Clone(original.relinkedPaths); 247 269 random = cloner.Clone(original.random); 248 270 breedingStat = original.breedingStat.Select(x => Tuple.Create(x.Item1, x.Item2, x.Item3, x.Item4)).ToList(); … … 273 295 Parameters.Add(byHillclimbing = new ValueParameter<IntValue>("ByHillclimbing", new IntValue(0))); 274 296 Parameters.Add(byAdaptivewalking = new ValueParameter<IntValue>("ByAdaptivewalking", new IntValue(0))); 297 Parameters.Add(relinkedPaths = new ValueParameter<DirectedPath<TSolution>>("RelinkedPaths", new DirectedPath<TSolution>())); 275 298 Parameters.Add(random = new ValueParameter<IRandom>("Random", new MersenneTwister())); 276 299 -
branches/PerformanceComparison/HeuristicLab.Algorithms.MemPR/3.3/Permutation/PermutationMemPR.cs
r14563 r14678 534 534 var evaluations = 0; 535 535 var child = (Encodings.PermutationEncoding.Permutation)p1.Clone(); 536 536 var childF = eval(child, token); 537 evaluations++; 538 539 var thisPath = new List<Tuple<Encodings.PermutationEncoding.Permutation, double>>() { 540 Tuple.Create((Encodings.PermutationEncoding.Permutation)child.Clone(), (childF - Context.LowerBound) / (Context.AverageQuality - Context.LowerBound)) 541 }; 537 542 best = double.NaN; 538 543 Encodings.PermutationEncoding.Permutation bestChild = null; … … 566 571 var idx2 = invChild[p2[idx1]]; 567 572 Swap(child, idx1, idx2); 573 thisPath.Add(Tuple.Create((Encodings.PermutationEncoding.Permutation)child.Clone(), (bestChange - Context.LowerBound) / (Context.AverageQuality - Context.LowerBound))); 568 574 invChild[child[idx1]] = idx1; 569 575 invChild[child[idx2]] = idx2; … … 582 588 } 583 589 Context.IncrementEvaluatedSolutions(evaluations); 590 if (thisPath.Count > 5) 591 Context.RelinkedPaths.AddPath(thisPath); 584 592 585 593 if (VALIDATE && bestChild != null && !bestChild.Validate()) throw new ArgumentException("Relinking produced invalid child"); -
branches/PerformanceComparison/HeuristicLab.Analysis.FitnessLandscape/3.3/Analysis/InformationAnalysis.cs
r13583 r14678 212 212 private string asString; 213 213 public override string ToString() { 214 return asString ?? (asString = string.Join("", slopes.Select(s => (s == Slope.Down ? " v" : (s == Slope.Up ? "^" : "-")))));214 return asString ?? (asString = string.Join("", slopes.Select(s => (s == Slope.Down ? "\\" : (s == Slope.Up ? "/" : "-"))))); 215 215 } 216 216 } 217 217 218 218 private static IEnumerable<Slope> Slopes(double eps, IEnumerable<double> differences) { 219 return differences.Select(d => (d > eps ? Slope.Up : (d < -eps ? Slope.Down : 0)));219 return differences.Select(d => (d > eps ? Slope.Up : (d < -eps ? Slope.Down : Slope.Flat))); 220 220 } 221 221 -
branches/PerformanceComparison/HeuristicLab.Analysis.FitnessLandscape/3.3/HeuristicLab.Analysis.FitnessLandscape-3.3.csproj
r13668 r14678 152 152 <Private>False</Private> 153 153 </Reference> 154 <Reference Include="HeuristicLab.Problems.Instances-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 155 <SpecificVersion>False</SpecificVersion> 156 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath> 157 <Private>False</Private> 158 </Reference> 159 <Reference Include="HeuristicLab.Problems.QuadraticAssignment-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 160 <SpecificVersion>False</SpecificVersion> 161 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.QuadraticAssignment-3.3.dll</HintPath> 162 <Private>False</Private> 163 </Reference> 154 164 <Reference Include="HeuristicLab.Random-3.3"> 155 165 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath> … … 196 206 <Compile Include="CharacteristicCalculator\UpDownWalkCalculator.cs" /> 197 207 <Compile Include="CharacteristicCalculator\RandomWalkCalculator.cs" /> 208 <Compile Include="ProblemCharacteristicAnalysis\CharacteristicCalculator.cs" /> 209 <Compile Include="ProblemCharacteristicAnalysis\DoubleMatrixCharacteristicCalculator.cs" /> 210 <Compile Include="ProblemCharacteristicAnalysis\QAP\QAPCharacteristicCalculator.cs" /> 211 <Compile Include="ProblemCharacteristicAnalysis\QAP\QAPDirectedWalk.cs" /> 212 <Compile Include="ProblemInstanceAnalysis\DirectedPath.cs" /> 213 <Compile Include="ProblemInstanceAnalysis\ProblemInstanceAnalyzer.cs" /> 214 <Compile Include="ProblemInstanceAnalysis\PRProblemInstanceAnalyzer.cs" /> 215 <Compile Include="ProblemInstanceAnalysis\QAPPRProblemInstanceAnalyzer.cs" /> 198 216 <Compile Include="UpDownSelector.cs" /> 199 217 <Compile Include="DistanceCalculators\RealVectorDistanceCalculator.cs" /> -
branches/PerformanceComparison/HeuristicLab.Analysis.FitnessLandscape/3.3/ProblemCharacteristicAnalysis/CharacteristicCalculator.cs
r13667 r14678 27 27 using System.Collections.Generic; 28 28 29 namespace HeuristicLab. Problems.CharacteristicAnalysis{29 namespace HeuristicLab.Analysis.FitnessLandscape { 30 30 [Item("Characteristic Calculator", "")] 31 31 [StorableClass] -
branches/PerformanceComparison/HeuristicLab.Analysis.FitnessLandscape/3.3/ProblemCharacteristicAnalysis/DoubleMatrixCharacteristicCalculator.cs
r13667 r14678 25 25 using System.Linq; 26 26 27 namespace HeuristicLab. Problems.CharacteristicAnalysis{27 namespace HeuristicLab.Analysis.FitnessLandscape { 28 28 public static class DoubleMatrixCharacteristicCalculator { 29 29 public static double CoeffVariation(DoubleMatrix m) { -
branches/PerformanceComparison/HeuristicLab.Analysis.FitnessLandscape/3.3/ProblemCharacteristicAnalysis/QAP/QAPCharacteristicCalculator.cs
r13667 r14678 30 30 using System.Linq; 31 31 32 namespace HeuristicLab. Problems.CharacteristicAnalysis.QAP{32 namespace HeuristicLab.Analysis.FitnessLandscape { 33 33 [Item("QAP Characteristic Calculator", "")] 34 34 [StorableClass] -
branches/PerformanceComparison/HeuristicLab.Analysis.FitnessLandscape/3.3/ProblemCharacteristicAnalysis/QAP/QAPDirectedWalk.cs
r14429 r14678 33 33 using System.Linq; 34 34 35 namespace HeuristicLab. Problems.CharacteristicAnalysis.QAP{35 namespace HeuristicLab.Analysis.FitnessLandscape { 36 36 [Item("Directed Walk (QAP-specific)", "")] 37 37 [StorableClass] … … 110 110 } 111 111 112 public static IEnumerable<IResult> Calculate(List<List<Tuple<Permutation, double>>> trajectories) { 113 var firstDerivatives = trajectories.Select(path => ApproximateDerivative(path).ToList()).ToList(); 114 var secondDerivatives = firstDerivatives.Select(d1 => ApproximateDerivative(d1).ToList()).ToList(); 115 116 var props = GetCharacteristics(trajectories, firstDerivatives, secondDerivatives).ToDictionary(x => x.Item1, x => x.Item2); 117 yield return new Result("Swap2.Sharpness", new DoubleValue(props["Sharpness"])); 118 yield return new Result("Swap2.Bumpiness", new DoubleValue(props["Bumpiness"])); 119 yield return new Result("Swap2.Flatness", new DoubleValue(props["Flatness"])); 120 yield return new Result("Swap2.Steadiness", new DoubleValue(props["Steadiness"])); 121 } 122 112 123 public static IEnumerable<List<Tuple<Permutation, double>>> Run(IRandom random, QuadraticAssignmentProblem qap, IEnumerable<Permutation> permutations, bool bestImprovement = true) { 113 124 var iter = permutations.GetEnumerator(); 114 125 if (!iter.MoveNext()) yield break; 115 126 127 var min = qap.LowerBound.Value; 128 var max = qap.AverageQuality.Value; 129 116 130 var start = iter.Current; 117 131 while (iter.MoveNext()) { … … 119 133 120 134 var walk = (bestImprovement ? BestDirectedWalk(qap, start, end) : FirstDirectedWalk(random, qap, start, end)).ToList(); 121 var max = walk.Max(x => x.Item2); 122 var min = walk.Min(x => x.Item2); 123 if (max > min) 124 yield return walk.Select(x => Tuple.Create(x.Item1, (x.Item2 - min) / (max - min))).ToList(); 125 else yield return walk.Select(x => Tuple.Create(x.Item1, 0.0)).ToList(); 135 yield return walk.Select(x => Tuple.Create(x.Item1, (x.Item2 - min) / (max - min))).ToList(); 126 136 start = end; 127 137 } // end paths 128 138 } 129 139 130 private IEnumerable<Tuple<string, double>> GetCharacteristics(List<List<Tuple<Permutation, double>>> f, List<List<Tuple<Permutation, double>>> f1, List<List<Tuple<Permutation, double>>> f2) {140 private static IEnumerable<Tuple<string, double>> GetCharacteristics(List<List<Tuple<Permutation, double>>> f, List<List<Tuple<Permutation, double>>> f1, List<List<Tuple<Permutation, double>>> f2) { 131 141 var sharpness = f2.Average(x => Area(x)); 132 142 var bumpiness = 0.0; -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem.Common/3.3/HeuristicLab.OptimizationExpertSystem.Common-3.3.csproj
r14429 r14678 78 78 <Private>False</Private> 79 79 </Reference> 80 <Reference Include="HeuristicLab.Algorithms.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">81 <SpecificVersion>False</SpecificVersion>82 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.DataAnalysis-3.4.dll</HintPath>83 <Private>False</Private>84 </Reference>85 80 <Reference Include="HeuristicLab.Clients.OKB-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 86 81 <SpecificVersion>False</SpecificVersion> … … 140 135 <SpecificVersion>False</SpecificVersion> 141 136 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath> 142 <Private>False</Private>143 </Reference>144 <Reference Include="HeuristicLab.Problems.QuadraticAssignment-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">145 <SpecificVersion>False</SpecificVersion>146 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.QuadraticAssignment-3.3.dll</HintPath>147 137 <Private>False</Private> 148 138 </Reference> … … 164 154 <ItemGroup> 165 155 <Compile Include="Interfaces\IRecommendationModel.cs" /> 166 <Compile Include="ProblemCharacteristicAnalysis\QAP\QAPDirectedWalk.cs" />167 156 <Compile Include="Recommenders\KNearestNeighborModel.cs" /> 168 157 <Compile Include="Recommenders\OverallBestRecommender.cs" /> … … 174 163 <Compile Include="Recommenders\FixedRankModel.cs" /> 175 164 <None Include="Properties\AssemblyInfo.cs.frame" /> 176 <Compile Include="ProblemCharacteristicAnalysis\CharacteristicCalculator.cs" />177 <Compile Include="ProblemCharacteristicAnalysis\DoubleMatrixCharacteristicCalculator.cs" />178 <Compile Include="ProblemCharacteristicAnalysis\QAP\QAPCharacteristicCalculator.cs" />179 165 <Compile Include="Properties\AssemblyInfo.cs" /> 180 166 </ItemGroup> … … 184 170 </ItemGroup> 185 171 <ItemGroup> 172 <ProjectReference Include="..\..\HeuristicLab.Algorithms.DataAnalysis\3.4\HeuristicLab.Algorithms.DataAnalysis-3.4.csproj"> 173 <Project>{2e782078-fa81-4b70-b56f-74ce38dac6c8}</Project> 174 <Name>HeuristicLab.Algorithms.DataAnalysis-3.4</Name> 175 <Private>False</Private> 176 </ProjectReference> 186 177 <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj"> 187 178 <Project>{887425b4-4348-49ed-a457-b7d2c26ddbf9}</Project> -
branches/PerformanceComparison/PerformanceComparison.sln
r14666 r14678 21 21 EndProject 22 22 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.MemPR-3.3", "HeuristicLab.Algorithms.MemPR\3.3\HeuristicLab.Algorithms.MemPR-3.3.csproj", "{9D274421-6332-4FBC-AAE4-467ACE27C368}" 23 EndProject 24 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProblemInstanceIdentifier", "ProblemInstanceIdentifier\ProblemInstanceIdentifier.csproj", "{F4E90652-1539-4B4E-93C5-4CCD95156DF3}" 25 EndProject 26 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.DataAnalysis-3.4", "HeuristicLab.Algorithms.DataAnalysis\3.4\HeuristicLab.Algorithms.DataAnalysis-3.4.csproj", "{2E782078-FA81-4B70-B56F-74CE38DAC6C8}" 23 27 EndProject 24 28 Global … … 140 144 {9D274421-6332-4FBC-AAE4-467ACE27C368}.Release|x86.ActiveCfg = Release|x86 141 145 {9D274421-6332-4FBC-AAE4-467ACE27C368}.Release|x86.Build.0 = Release|x86 146 {F4E90652-1539-4B4E-93C5-4CCD95156DF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 147 {F4E90652-1539-4B4E-93C5-4CCD95156DF3}.Debug|Any CPU.Build.0 = Debug|Any CPU 148 {F4E90652-1539-4B4E-93C5-4CCD95156DF3}.Debug|x64.ActiveCfg = Debug|Any CPU 149 {F4E90652-1539-4B4E-93C5-4CCD95156DF3}.Debug|x64.Build.0 = Debug|Any CPU 150 {F4E90652-1539-4B4E-93C5-4CCD95156DF3}.Debug|x86.ActiveCfg = Debug|Any CPU 151 {F4E90652-1539-4B4E-93C5-4CCD95156DF3}.Debug|x86.Build.0 = Debug|Any CPU 152 {F4E90652-1539-4B4E-93C5-4CCD95156DF3}.Release|Any CPU.ActiveCfg = Release|Any CPU 153 {F4E90652-1539-4B4E-93C5-4CCD95156DF3}.Release|Any CPU.Build.0 = Release|Any CPU 154 {F4E90652-1539-4B4E-93C5-4CCD95156DF3}.Release|x64.ActiveCfg = Release|Any CPU 155 {F4E90652-1539-4B4E-93C5-4CCD95156DF3}.Release|x64.Build.0 = Release|Any CPU 156 {F4E90652-1539-4B4E-93C5-4CCD95156DF3}.Release|x86.ActiveCfg = Release|Any CPU 157 {F4E90652-1539-4B4E-93C5-4CCD95156DF3}.Release|x86.Build.0 = Release|Any CPU 158 {2E782078-FA81-4B70-B56F-74CE38DAC6C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 159 {2E782078-FA81-4B70-B56F-74CE38DAC6C8}.Debug|Any CPU.Build.0 = Debug|Any CPU 160 {2E782078-FA81-4B70-B56F-74CE38DAC6C8}.Debug|x64.ActiveCfg = Debug|x64 161 {2E782078-FA81-4B70-B56F-74CE38DAC6C8}.Debug|x64.Build.0 = Debug|x64 162 {2E782078-FA81-4B70-B56F-74CE38DAC6C8}.Debug|x86.ActiveCfg = Debug|x86 163 {2E782078-FA81-4B70-B56F-74CE38DAC6C8}.Debug|x86.Build.0 = Debug|x86 164 {2E782078-FA81-4B70-B56F-74CE38DAC6C8}.Release|Any CPU.ActiveCfg = Release|Any CPU 165 {2E782078-FA81-4B70-B56F-74CE38DAC6C8}.Release|Any CPU.Build.0 = Release|Any CPU 166 {2E782078-FA81-4B70-B56F-74CE38DAC6C8}.Release|x64.ActiveCfg = Release|x64 167 {2E782078-FA81-4B70-B56F-74CE38DAC6C8}.Release|x64.Build.0 = Release|x64 168 {2E782078-FA81-4B70-B56F-74CE38DAC6C8}.Release|x86.ActiveCfg = Release|x86 169 {2E782078-FA81-4B70-B56F-74CE38DAC6C8}.Release|x86.Build.0 = Release|x86 142 170 EndGlobalSection 143 171 GlobalSection(SolutionProperties) = preSolution
Note: See TracChangeset
for help on using the changeset viewer.