Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/18/15 10:54:32 (10 years ago)
Author:
bburlacu
Message:

#2276: Merged trunk changes.

Location:
branches/HeuristicLab.DatasetRefactor/sources
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DatasetRefactor/sources

  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.Instances.ElloumiCTAP/3.3/ElloumiCTAPDataDescriptor.cs

    r11171 r12031  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.Instances.ElloumiCTAP/3.3/ElloumiCTAPInstanceProvider.cs

    r11171 r12031  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2323using System.Collections.Generic;
    2424using System.IO;
     25using System.IO.Compression;
    2526using System.Linq;
    2627using System.Reflection;
    2728using System.Text.RegularExpressions;
    28 using ICSharpCode.SharpZipLib.Zip;
    2929
    3030namespace HeuristicLab.Problems.Instances.ElloumiCTAP {
     
    5656      var solutionsArchiveName = GetResourceName(FileName + @"\.sol\.zip");
    5757      if (!String.IsNullOrEmpty(solutionsArchiveName)) {
    58         using (var solutionsZipFile = new ZipInputStream(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName))) {
    59           foreach (var entry in GetZipContents(solutionsZipFile))
    60             solutions.Add(Path.GetFileNameWithoutExtension(entry) + ".dat", entry);
     58        using (var solutionsZipFile = new ZipArchive(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName), ZipArchiveMode.Read)) {
     59          foreach (var entry in solutionsZipFile.Entries)
     60            solutions.Add(Path.GetFileNameWithoutExtension(entry.Name) + ".dat", entry.Name);
    6161        }
    6262      }
     
    6464      if (String.IsNullOrEmpty(instanceArchiveName)) yield break;
    6565
    66       using (var instanceStream = new ZipInputStream(GetType().Assembly.GetManifestResourceStream(instanceArchiveName))) {
    67         foreach (var entry in GetZipContents(instanceStream).OrderBy(x => x)) {
     66      using (var instanceStream = new ZipArchive(GetType().Assembly.GetManifestResourceStream(instanceArchiveName), ZipArchiveMode.Read)) {
     67        foreach (var entry in instanceStream.Entries.Select(x => x.Name).OrderBy(x => x)) {
    6868          yield return new ElloumiCTAPDataDescriptor(Path.GetFileNameWithoutExtension(entry), GetDescription(), entry, solutions.ContainsKey(entry) ? solutions[entry] : String.Empty);
    6969        }
     
    7474      var descriptor = (ElloumiCTAPDataDescriptor)id;
    7575      var instanceArchiveName = GetResourceName(FileName + @"\.dat\.zip");
    76       using (var instancesZipFile = new ZipFile(GetType().Assembly.GetManifestResourceStream(instanceArchiveName))) {
     76      using (var instancesZipFile = new ZipArchive(GetType().Assembly.GetManifestResourceStream(instanceArchiveName), ZipArchiveMode.Read)) {
    7777        var entry = instancesZipFile.GetEntry(descriptor.InstanceIdentifier);
    78         using (var stream = instancesZipFile.GetInputStream(entry)) {
     78        using (var stream = entry.Open()) {
    7979          var parser = new ElloumiCTAPParser();
    8080          parser.Parse(stream);
     
    8686          if (!String.IsNullOrEmpty(descriptor.SolutionIdentifier)) {
    8787            var solutionsArchiveName = GetResourceName(FileName + @"\.sol\.zip");
    88             using (var solutionsZipFile = new ZipFile(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName))) {
     88            using (var solutionsZipFile = new ZipArchive(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName), ZipArchiveMode.Read)) {
    8989              entry = solutionsZipFile.GetEntry(descriptor.SolutionIdentifier);
    90               using (var solStream = solutionsZipFile.GetInputStream(entry)) {
     90              using (var solStream = entry.Open()) {
    9191                ElloumiCTAPSolutionParser slnParser = new ElloumiCTAPSolutionParser();
    9292                slnParser.Parse(solStream, instance.MemoryRequirements.Length);
     
    138138              .Where(x => Regex.Match(x, @".*\.Data\." + fileName).Success).SingleOrDefault();
    139139    }
    140 
    141     protected IEnumerable<string> GetZipContents(ZipInputStream zipFile) {
    142       ZipEntry entry;
    143       while ((entry = zipFile.GetNextEntry()) != null) {
    144         yield return entry.Name;
    145       }
    146     }
    147140  }
    148141}
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.Instances.ElloumiCTAP/3.3/ElloumiCTAPParser.cs

    r11171 r12031  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.Instances.ElloumiCTAP/3.3/ElloumiCTAPSolutionParser.cs

    r11171 r12031  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.Instances.ElloumiCTAP/3.3/HeuristicLab.Problems.Instances.ElloumiCTAP-3.3.csproj

    r8624 r12031  
    1111    <RootNamespace>HeuristicLab.Problems.Instances.ElloumiCTAP</RootNamespace>
    1212    <AssemblyName>HeuristicLab.Problems.Instances.ElloumiCTAP-3.3</AssemblyName>
    13     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     13    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    1414    <FileAlignment>512</FileAlignment>
     15    <TargetFrameworkProfile />
    1516  </PropertyGroup>
    1617  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     
    2223    <ErrorReport>prompt</ErrorReport>
    2324    <WarningLevel>4</WarningLevel>
     25    <Prefer32Bit>false</Prefer32Bit>
    2426  </PropertyGroup>
    2527  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     
    3032    <ErrorReport>prompt</ErrorReport>
    3133    <WarningLevel>4</WarningLevel>
     34    <Prefer32Bit>false</Prefer32Bit>
    3235  </PropertyGroup>
    3336  <PropertyGroup>
     
    5255    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
    5356    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
     57    <Prefer32Bit>false</Prefer32Bit>
    5458  </PropertyGroup>
    5559  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
     
    6872    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
    6973    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
     74    <Prefer32Bit>false</Prefer32Bit>
    7075  </PropertyGroup>
    7176  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
     
    8489    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
    8590    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
     91    <Prefer32Bit>false</Prefer32Bit>
    8692  </PropertyGroup>
    8793  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
     
    100106    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
    101107    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
     108    <Prefer32Bit>false</Prefer32Bit>
    102109  </PropertyGroup>
    103110  <ItemGroup>
    104     <Reference Include="ICSharpCode.SharpZipLib">
    105     <HintPath>..\..\HeuristicLab.PluginInfrastructure\3.3\ICSharpCode.SharpZipLib.dll</HintPath>
    106     <Private>False</Private>
    107   </Reference>
    108111    <Reference Include="System" />
    109112    <Reference Include="System.Core" />
    110113    <Reference Include="System.Data" />
     114    <Reference Include="System.IO.Compression" />
    111115  </ItemGroup>
    112116  <ItemGroup>
     
    144148  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    145149  <PropertyGroup>
    146    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
     150    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
    147151set ProjectDir=$(ProjectDir)
    148152set SolutionDir=$(SolutionDir)
     
    150154
    151155call PreBuildEvent.cmd</PreBuildEvent>
    152 <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
     156    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
    153157export ProjectDir=$(ProjectDir)
    154158export SolutionDir=$(SolutionDir)
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.Instances.ElloumiCTAP/3.3/Plugin.cs.frame

    r11174 r12031  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2323
    2424namespace HeuristicLab.Problems.Instances.ElloumiCTAP {
    25   [Plugin("HeuristicLab.Problems.Instances.ElloumiCTAP", "3.3.10.$WCREV$")]
     25  [Plugin("HeuristicLab.Problems.Instances.ElloumiCTAP", "3.3.11.$WCREV$")]
    2626  [PluginFile("HeuristicLab.Problems.Instances.ElloumiCTAP-3.3.dll", PluginFileType.Assembly)]
    2727  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
  • branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Problems.Instances.ElloumiCTAP/3.3/Properties/AssemblyInfo.cs.frame

    r11174 r12031  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2014 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3232[assembly: AssemblyCompany("HEAL")]
    3333[assembly: AssemblyProduct("HeuristicLab")]
    34 [assembly: AssemblyCopyright("(c) 2002-2014 HEAL")]
     34[assembly: AssemblyCopyright("(c) 2002-2015 HEAL")]
    3535[assembly: AssemblyTrademark("")]
    3636[assembly: AssemblyCulture("")]
     
    5555// [assembly: AssemblyVersion("1.0.*")]
    5656[assembly: AssemblyVersion("3.3.0.0")]
    57 [assembly: AssemblyFileVersion("3.3.10.$WCREV$")]
     57[assembly: AssemblyFileVersion("3.3.11.$WCREV$")]
Note: See TracChangeset for help on using the changeset viewer.