Free cookie consent management tool by TermsFeed Policy Generator

Changeset 7232


Ignore:
Timestamp:
12/22/11 16:23:01 (13 years ago)
Author:
epitzer
Message:

#1696: Updated build configuration and simplified thread handling and removed hard coded paths

Location:
branches/FitnessLandscapeAnalysis
Files:
153 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/FitnessLandscapeAnalysis/HeuristicLab.Analysis.FitnessLandscape.sln

    r7231 r7232  
    8484    {67CDB1E2-B0EE-4986-92AD-F320EBAF9088}.Release|x86.ActiveCfg = Release|x86
    8585    {67CDB1E2-B0EE-4986-92AD-F320EBAF9088}.Release|x86.Build.0 = Release|x86
    86     {683C29F1-9A43-4998-B58A-C477B86B7A64}.Debug|Any CPU.ActiveCfg = Debug|x86
    87     {683C29F1-9A43-4998-B58A-C477B86B7A64}.Debug|x64.ActiveCfg = Debug|x86
     86    {683C29F1-9A43-4998-B58A-C477B86B7A64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
     87    {683C29F1-9A43-4998-B58A-C477B86B7A64}.Debug|Any CPU.Build.0 = Debug|Any CPU
     88    {683C29F1-9A43-4998-B58A-C477B86B7A64}.Debug|x64.ActiveCfg = Debug|x64
     89    {683C29F1-9A43-4998-B58A-C477B86B7A64}.Debug|x64.Build.0 = Debug|x64
    8890    {683C29F1-9A43-4998-B58A-C477B86B7A64}.Debug|x86.ActiveCfg = Debug|x86
    8991    {683C29F1-9A43-4998-B58A-C477B86B7A64}.Debug|x86.Build.0 = Debug|x86
    90     {683C29F1-9A43-4998-B58A-C477B86B7A64}.Release|Any CPU.ActiveCfg = Release|x86
    91     {683C29F1-9A43-4998-B58A-C477B86B7A64}.Release|x64.ActiveCfg = Release|x86
     92    {683C29F1-9A43-4998-B58A-C477B86B7A64}.Release|Any CPU.ActiveCfg = Release|Any CPU
     93    {683C29F1-9A43-4998-B58A-C477B86B7A64}.Release|Any CPU.Build.0 = Release|Any CPU
     94    {683C29F1-9A43-4998-B58A-C477B86B7A64}.Release|x64.ActiveCfg = Release|x64
     95    {683C29F1-9A43-4998-B58A-C477B86B7A64}.Release|x64.Build.0 = Release|x64
    9296    {683C29F1-9A43-4998-B58A-C477B86B7A64}.Release|x86.ActiveCfg = Release|x86
    9397    {683C29F1-9A43-4998-B58A-C477B86B7A64}.Release|x86.Build.0 = Release|x86
  • branches/FitnessLandscapeAnalysis/VRPProblemAnalyzer/KMeansClustering.cs

    r7231 r7232  
    2323        double[,] centers = null;
    2424        int[] xyc = null;
    25         bool aborted = false;
    2625
    2726
     
    2928          alglib.kmeansgenerate(vertices, vertices.Length / 2, 2, k, restarts + 1, out info, out centers, out xyc);
    3029        });
    31 
    3230        t.Start();
    33         Stopwatch sw = new Stopwatch();
    34         sw.Start();
    35         while (t.ThreadState == System.Threading.ThreadState.Running && sw.ElapsedMilliseconds < 1000) {
    36           Thread.Sleep(10);
     31        if (!t.Join(1000)) {
     32          t.Abort();
     33          continue;
    3734        }
    38         sw.Stop();
    39 
    40         if (t.ThreadState == System.Threading.ThreadState.Running) {
    41           aborted = true;
    42           t.Abort();
    43         }
    4435
    4536        if (info == -3)
    4637          return new List<Cluster>();
    47         else if (info == 1 && !aborted) {
     38        else if (info == 1) {
    4839          List<Cluster> result = new List<Cluster>();
    4940          int count = centers.Length / 2;
  • branches/FitnessLandscapeAnalysis/VRPProblemAnalyzer/Program.cs

    r7231 r7232  
    1515 
    1616  class Program {
    17     private static string InstancePath = @"C:\Users\svonolfen\Desktop\Instances\Augerat";
    1817
    1918    private static double GetDistance(double[,] vertices, int source, int target) {
     
    226225
    227226    static void Main(string[] args) {
    228       using (StreamWriter sw = new StreamWriter(InstancePath + Path.DirectorySeparatorChar + "analysis.csv")) {
     227      if (args.Length < 1) {
     228        Console.Error.WriteLine("Not enough arguments, please specify directory with VRP instances.");
     229        Environment.Exit(-1);
     230      }
     231      var path = args[0];
     232      using (StreamWriter sw = new StreamWriter(Path.Combine(path, "analysis.csv"))) {
    229233        sw.WriteLine("Instance;Customers;Clustering;DistanceAvg;DistanceStdev;DemandAvg;DemandStdev");
    230234       
    231         string[] instances = Directory.GetFiles(InstancePath, "*.vrp", SearchOption.AllDirectories);
     235        string[] instances = Directory.GetFiles(path, "*.vrp", SearchOption.AllDirectories);
    232236        foreach (string instance in instances) {
    233237          TSPLIBParser parser = new TSPLIBParser(instance);
  • branches/FitnessLandscapeAnalysis/VRPProblemAnalyzer/VRPProblemAnalyzer.csproj

    r7231 r7232  
    2020    <DebugType>full</DebugType>
    2121    <Optimize>false</Optimize>
    22     <OutputPath>bin\Debug\</OutputPath>
     22    <OutputPath>bin\x86\Debug\</OutputPath>
    2323    <DefineConstants>DEBUG;TRACE</DefineConstants>
    2424    <ErrorReport>prompt</ErrorReport>
     
    2929    <DebugType>pdbonly</DebugType>
    3030    <Optimize>true</Optimize>
    31     <OutputPath>bin\Release\</OutputPath>
     31    <OutputPath>bin\x86\Release\</OutputPath>
    3232    <DefineConstants>TRACE</DefineConstants>
    3333    <ErrorReport>prompt</ErrorReport>
    3434    <WarningLevel>4</WarningLevel>
     35  </PropertyGroup>
     36  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
     37    <DebugSymbols>true</DebugSymbols>
     38    <OutputPath>bin\Debug\</OutputPath>
     39    <DefineConstants>DEBUG;TRACE</DefineConstants>
     40    <DebugType>full</DebugType>
     41    <PlatformTarget>AnyCPU</PlatformTarget>
     42    <CodeAnalysisLogFile>bin\Debug\VRPProblemAnalyzer.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
     43    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
     44    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
     45    <ErrorReport>prompt</ErrorReport>
     46    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     47    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
     48    <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
     49    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
     50    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
     51  </PropertyGroup>
     52  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
     53    <OutputPath>bin\Release\</OutputPath>
     54    <DefineConstants>TRACE</DefineConstants>
     55    <Optimize>true</Optimize>
     56    <DebugType>pdbonly</DebugType>
     57    <PlatformTarget>AnyCPU</PlatformTarget>
     58    <CodeAnalysisLogFile>bin\Release\VRPProblemAnalyzer.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
     59    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
     60    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
     61    <ErrorReport>prompt</ErrorReport>
     62    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     63    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
     64    <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
     65    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
     66    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
     67  </PropertyGroup>
     68  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
     69    <DebugSymbols>true</DebugSymbols>
     70    <OutputPath>bin\x64\Debug\</OutputPath>
     71    <DefineConstants>DEBUG;TRACE</DefineConstants>
     72    <DebugType>full</DebugType>
     73    <PlatformTarget>x64</PlatformTarget>
     74    <CodeAnalysisLogFile>bin\Debug\VRPProblemAnalyzer.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
     75    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
     76    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
     77    <ErrorReport>prompt</ErrorReport>
     78    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     79    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
     80    <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
     81    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
     82    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
     83  </PropertyGroup>
     84  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
     85    <OutputPath>bin\x64\Release\</OutputPath>
     86    <DefineConstants>TRACE</DefineConstants>
     87    <Optimize>true</Optimize>
     88    <DebugType>pdbonly</DebugType>
     89    <PlatformTarget>x64</PlatformTarget>
     90    <CodeAnalysisLogFile>bin\Release\VRPProblemAnalyzer.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
     91    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
     92    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
     93    <ErrorReport>prompt</ErrorReport>
     94    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     95    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
     96    <CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
     97    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
     98    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
    3599  </PropertyGroup>
    36100  <ItemGroup>
Note: See TracChangeset for help on using the changeset viewer.