Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/17/17 12:51:44 (8 years ago)
Author:
abeham
Message:

#2457: worked on problem instance detection

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  
    5454    <DebugType>pdbonly</DebugType>
    5555    <Optimize>true</Optimize>
    56     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     56    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    5757    <DefineConstants>TRACE</DefineConstants>
    5858    <ErrorReport>prompt</ErrorReport>
     
    6565  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    6666    <DebugSymbols>true</DebugSymbols>
    67     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     67    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    6868    <DefineConstants>DEBUG;TRACE</DefineConstants>
    6969    <DebugType>full</DebugType>
     
    7474  </PropertyGroup>
    7575  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    76     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     76    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    7777    <DefineConstants>TRACE</DefineConstants>
    7878    <DocumentationFile>
     
    8787  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
    8888    <DebugSymbols>true</DebugSymbols>
    89     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     89    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    9090    <DefineConstants>DEBUG;TRACE</DefineConstants>
    9191    <DebugType>full</DebugType>
     
    9696  </PropertyGroup>
    9797  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
    98     <OutputPath>$(SolutionDir)\bin\</OutputPath>
     98    <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath>
    9999    <DefineConstants>TRACE</DefineConstants>
    100100    <DocumentationFile>
     
    109109  <ItemGroup>
    110110    <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>
    112112      <Private>False</Private>
    113113    </Reference>
     
    115115      <SpecificVersion>False</SpecificVersion>
    116116      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Algorithms.GradientDescent-3.3.dll</HintPath>
     117      <Private>False</Private>
    117118    </Reference>
    118119    <Reference Include="HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    119120      <SpecificVersion>False</SpecificVersion>
    120121      <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>
    125123    </Reference>
    126124    <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    127125      <SpecificVersion>False</SpecificVersion>
    128126      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath>
     127      <Private>False</Private>
    129128    </Reference>
    130129    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    131130      <SpecificVersion>False</SpecificVersion>
    132131      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath>
     132      <Private>False</Private>
    133133    </Reference>
    134134    <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    135135      <SpecificVersion>False</SpecificVersion>
    136136      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath>
     137      <Private>False</Private>
    137138    </Reference>
    138139    <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    139140      <SpecificVersion>False</SpecificVersion>
    140141      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath>
     142      <Private>False</Private>
    141143    </Reference>
    142144    <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    143145      <SpecificVersion>False</SpecificVersion>
    144146      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
     147      <Private>False</Private>
    145148    </Reference>
    146149    <Reference Include="HeuristicLab.Encodings.RealVectorEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    147150      <SpecificVersion>False</SpecificVersion>
    148151      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.RealVectorEncoding-3.3.dll</HintPath>
     152      <Private>False</Private>
    149153    </Reference>
    150154    <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    151155      <SpecificVersion>False</SpecificVersion>
    152156      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll</HintPath>
     157      <Private>False</Private>
    153158    </Reference>
    154159    <Reference Include="HeuristicLab.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    155160      <SpecificVersion>False</SpecificVersion>
    156161      <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>
    161163    </Reference>
    162164    <Reference Include="HeuristicLab.Parameters-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    163165      <SpecificVersion>False</SpecificVersion>
    164166      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath>
     167      <Private>False</Private>
    165168    </Reference>
    166169    <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    167170      <SpecificVersion>False</SpecificVersion>
    168171      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath>
     172      <Private>False</Private>
    169173    </Reference>
    170174    <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    171175      <SpecificVersion>False</SpecificVersion>
    172176      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     177      <Private>False</Private>
    173178    </Reference>
    174179    <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    175180      <SpecificVersion>False</SpecificVersion>
    176181      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath>
     182      <Private>False</Private>
    177183    </Reference>
    178184    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    179185      <SpecificVersion>False</SpecificVersion>
    180186      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.dll</HintPath>
     187      <Private>False</Private>
    181188    </Reference>
    182189    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    183190      <SpecificVersion>False</SpecificVersion>
    184191      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic.Classification-3.4.dll</HintPath>
     192      <Private>False</Private>
    185193    </Reference>
    186194    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    187195      <SpecificVersion>False</SpecificVersion>
    188196      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.dll</HintPath>
     197      <Private>False</Private>
    189198    </Reference>
    190199    <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    191200      <SpecificVersion>False</SpecificVersion>
    192201      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4.dll</HintPath>
     202      <Private>False</Private>
    193203    </Reference>
    194204    <Reference Include="HeuristicLab.Problems.Instances-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    195205      <SpecificVersion>False</SpecificVersion>
    196206      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath>
     207      <Private>False</Private>
    197208    </Reference>
    198209    <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    199210      <SpecificVersion>False</SpecificVersion>
    200211      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath>
     212      <Private>False</Private>
    201213    </Reference>
    202214    <Reference Include="HeuristicLab.Selection-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    203215      <SpecificVersion>False</SpecificVersion>
    204216      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Selection-3.3.dll</HintPath>
     217      <Private>False</Private>
    205218    </Reference>
    206219    <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>
    208221      <Private>False</Private>
    209222    </Reference>
     
    457470    </BootstrapperPackage>
    458471  </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>
    459484  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
    460485  <!-- 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  
    192192  </ItemGroup>
    193193  <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>
    194199    <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
    195200      <Project>{887425b4-4348-49ed-a457-b7d2c26ddbf9}</Project>
  • branches/PerformanceComparison/HeuristicLab.Algorithms.MemPR/3.3/MemPRContext.cs

    r14666 r14678  
    2525using System.Runtime.CompilerServices;
    2626using System.Threading;
    27 using HeuristicLab.Algorithms.DataAnalysis;
    2827using HeuristicLab.Algorithms.MemPR.Interfaces;
    29 using HeuristicLab.Analysis;
     28using HeuristicLab.Analysis.FitnessLandscape;
    3029using HeuristicLab.Common;
    3130using HeuristicLab.Core;
     
    3433using HeuristicLab.Parameters;
    3534using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    36 using HeuristicLab.Problems.DataAnalysis;
    3735using HeuristicLab.Random;
    3836using ExecutionContext = HeuristicLab.Core.ExecutionContext;
     
    167165
    168166    [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]
    169174    private IValueParameter<IRandom> random;
    170175    public IRandom Random {
     
    221226    public IEnumerable<Tuple<double, double>> AdaptivewalkingStat {
    222227      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      }
    223244    }
    224245
     
    245266      byHillclimbing = cloner.Clone(original.byHillclimbing);
    246267      byAdaptivewalking = cloner.Clone(original.byAdaptivewalking);
     268      relinkedPaths = cloner.Clone(original.relinkedPaths);
    247269      random = cloner.Clone(original.random);
    248270      breedingStat = original.breedingStat.Select(x => Tuple.Create(x.Item1, x.Item2, x.Item3, x.Item4)).ToList();
     
    273295      Parameters.Add(byHillclimbing = new ValueParameter<IntValue>("ByHillclimbing", new IntValue(0)));
    274296      Parameters.Add(byAdaptivewalking = new ValueParameter<IntValue>("ByAdaptivewalking", new IntValue(0)));
     297      Parameters.Add(relinkedPaths = new ValueParameter<DirectedPath<TSolution>>("RelinkedPaths", new DirectedPath<TSolution>()));
    275298      Parameters.Add(random = new ValueParameter<IRandom>("Random", new MersenneTwister()));
    276299
  • branches/PerformanceComparison/HeuristicLab.Algorithms.MemPR/3.3/Permutation/PermutationMemPR.cs

    r14563 r14678  
    534534      var evaluations = 0;
    535535      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      };
    537542      best = double.NaN;
    538543      Encodings.PermutationEncoding.Permutation bestChild = null;
     
    566571          var idx2 = invChild[p2[idx1]];
    567572          Swap(child, idx1, idx2);
     573          thisPath.Add(Tuple.Create((Encodings.PermutationEncoding.Permutation)child.Clone(), (bestChange - Context.LowerBound) / (Context.AverageQuality - Context.LowerBound)));
    568574          invChild[child[idx1]] = idx1;
    569575          invChild[child[idx2]] = idx2;
     
    582588      }
    583589      Context.IncrementEvaluatedSolutions(evaluations);
     590      if (thisPath.Count > 5)
     591        Context.RelinkedPaths.AddPath(thisPath);
    584592
    585593      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  
    212212      private string asString;
    213213      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 ? "/" : "-")))));
    215215      }
    216216    }
    217217
    218218    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)));
    220220    }
    221221
  • branches/PerformanceComparison/HeuristicLab.Analysis.FitnessLandscape/3.3/HeuristicLab.Analysis.FitnessLandscape-3.3.csproj

    r13668 r14678  
    152152      <Private>False</Private>
    153153    </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>
    154164    <Reference Include="HeuristicLab.Random-3.3">
    155165      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath>
     
    196206    <Compile Include="CharacteristicCalculator\UpDownWalkCalculator.cs" />
    197207    <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" />
    198216    <Compile Include="UpDownSelector.cs" />
    199217    <Compile Include="DistanceCalculators\RealVectorDistanceCalculator.cs" />
  • branches/PerformanceComparison/HeuristicLab.Analysis.FitnessLandscape/3.3/ProblemCharacteristicAnalysis/CharacteristicCalculator.cs

    r13667 r14678  
    2727using System.Collections.Generic;
    2828
    29 namespace HeuristicLab.Problems.CharacteristicAnalysis {
     29namespace HeuristicLab.Analysis.FitnessLandscape {
    3030  [Item("Characteristic Calculator", "")]
    3131  [StorableClass]
  • branches/PerformanceComparison/HeuristicLab.Analysis.FitnessLandscape/3.3/ProblemCharacteristicAnalysis/DoubleMatrixCharacteristicCalculator.cs

    r13667 r14678  
    2525using System.Linq;
    2626
    27 namespace HeuristicLab.Problems.CharacteristicAnalysis {
     27namespace HeuristicLab.Analysis.FitnessLandscape {
    2828  public static class DoubleMatrixCharacteristicCalculator {
    2929    public static double CoeffVariation(DoubleMatrix m) {
  • branches/PerformanceComparison/HeuristicLab.Analysis.FitnessLandscape/3.3/ProblemCharacteristicAnalysis/QAP/QAPCharacteristicCalculator.cs

    r13667 r14678  
    3030using System.Linq;
    3131
    32 namespace HeuristicLab.Problems.CharacteristicAnalysis.QAP {
     32namespace HeuristicLab.Analysis.FitnessLandscape {
    3333  [Item("QAP Characteristic Calculator", "")]
    3434  [StorableClass]
  • branches/PerformanceComparison/HeuristicLab.Analysis.FitnessLandscape/3.3/ProblemCharacteristicAnalysis/QAP/QAPDirectedWalk.cs

    r14429 r14678  
    3333using System.Linq;
    3434
    35 namespace HeuristicLab.Problems.CharacteristicAnalysis.QAP {
     35namespace HeuristicLab.Analysis.FitnessLandscape {
    3636  [Item("Directed Walk (QAP-specific)", "")]
    3737  [StorableClass]
     
    110110    }
    111111
     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
    112123    public static IEnumerable<List<Tuple<Permutation, double>>> Run(IRandom random, QuadraticAssignmentProblem qap, IEnumerable<Permutation> permutations, bool bestImprovement = true) {
    113124      var iter = permutations.GetEnumerator();
    114125      if (!iter.MoveNext()) yield break;
    115126
     127      var min = qap.LowerBound.Value;
     128      var max = qap.AverageQuality.Value;
     129
    116130      var start = iter.Current;
    117131      while (iter.MoveNext()) {
     
    119133
    120134        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();
    126136        start = end;
    127137      } // end paths
    128138    }
    129139
    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) {
    131141      var sharpness = f2.Average(x => Area(x));
    132142      var bumpiness = 0.0;
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem.Common/3.3/HeuristicLab.OptimizationExpertSystem.Common-3.3.csproj

    r14429 r14678  
    7878      <Private>False</Private>
    7979    </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>
    8580    <Reference Include="HeuristicLab.Clients.OKB-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    8681      <SpecificVersion>False</SpecificVersion>
     
    140135      <SpecificVersion>False</SpecificVersion>
    141136      <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>
    147137      <Private>False</Private>
    148138    </Reference>
     
    164154  <ItemGroup>
    165155    <Compile Include="Interfaces\IRecommendationModel.cs" />
    166     <Compile Include="ProblemCharacteristicAnalysis\QAP\QAPDirectedWalk.cs" />
    167156    <Compile Include="Recommenders\KNearestNeighborModel.cs" />
    168157    <Compile Include="Recommenders\OverallBestRecommender.cs" />
     
    174163    <Compile Include="Recommenders\FixedRankModel.cs" />
    175164    <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" />
    179165    <Compile Include="Properties\AssemblyInfo.cs" />
    180166  </ItemGroup>
     
    184170  </ItemGroup>
    185171  <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>
    186177    <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">
    187178      <Project>{887425b4-4348-49ed-a457-b7d2c26ddbf9}</Project>
  • branches/PerformanceComparison/PerformanceComparison.sln

    r14666 r14678  
    2121EndProject
    2222Project("{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}"
     23EndProject
     24Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProblemInstanceIdentifier", "ProblemInstanceIdentifier\ProblemInstanceIdentifier.csproj", "{F4E90652-1539-4B4E-93C5-4CCD95156DF3}"
     25EndProject
     26Project("{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}"
    2327EndProject
    2428Global
     
    140144    {9D274421-6332-4FBC-AAE4-467ACE27C368}.Release|x86.ActiveCfg = Release|x86
    141145    {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
    142170  EndGlobalSection
    143171  GlobalSection(SolutionProperties) = preSolution
Note: See TracChangeset for help on using the changeset viewer.