Changeset 15281 for branches/Async/HeuristicLab.Problems.Instances.TSPLIB
- Timestamp:
- 07/23/17 11:17:18 (7 years ago)
- Location:
- branches/Async
- Files:
-
- 15 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/Async
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/Async/HeuristicLab.Problems.Instances.TSPLIB/3.3/HeuristicLab.Problems.Instances.TSPLIB-3.3.csproj
r15280 r15281 130 130 <EmbeddedResource Include="Data\tsp.opt.tour.zip" /> 131 131 <EmbeddedResource Include="Data\vrp.zip" /> 132 <EmbeddedResource Include="Data\tsp.qual" /> 133 <EmbeddedResource Include="Data\atsp.qual" /> 132 134 <None Include="Plugin.cs.frame" /> 133 135 <Compile Include="Plugin.cs" /> -
branches/Async/HeuristicLab.Problems.Instances.TSPLIB/3.3/Plugin.cs.frame
r13321 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 24 24 namespace HeuristicLab.Problems.Instances.TSPLIB { 25 [Plugin("HeuristicLab.Problems.Instances.TSPLIB", "3.3.1 3.$WCREV$")]25 [Plugin("HeuristicLab.Problems.Instances.TSPLIB", "3.3.14.$WCREV$")] 26 26 [PluginFile("HeuristicLab.Problems.Instances.TSPLIB-3.3.dll", PluginFileType.Assembly)] 27 27 [PluginDependency("HeuristicLab.Problems.Instances", "3.3")] -
branches/Async/HeuristicLab.Problems.Instances.TSPLIB/3.3/Properties/AssemblyInfo.cs.frame
r13321 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 32 32 [assembly: AssemblyCompany("HEAL")] 33 33 [assembly: AssemblyProduct("HeuristicLab")] 34 [assembly: AssemblyCopyright("(c) 2002-201 5HEAL")]34 [assembly: AssemblyCopyright("(c) 2002-2016 HEAL")] 35 35 [assembly: AssemblyTrademark("")] 36 36 [assembly: AssemblyCulture("")] … … 55 55 // [assembly: AssemblyVersion("1.0.*")] 56 56 [assembly: AssemblyVersion("3.3.0.0")] 57 [assembly: AssemblyFileVersion("3.3.1 3.$WCREV$")]57 [assembly: AssemblyFileVersion("3.3.14.$WCREV$")] -
branches/Async/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBATSPInstanceProvider.cs
r15280 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 56 56 instance.BestKnownTour = parser.Tour.FirstOrDefault(); 57 57 } 58 59 protected override void LoadQuality(double? bestQuality, ATSPData instance) { 60 instance.BestKnownQuality = bestQuality; 61 } 58 62 } 59 63 } -
branches/Async/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBCVRPInstanceProvider.cs
r15280 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 78 78 instance.BestKnownTour = parser.Tour; 79 79 } 80 81 protected override void LoadQuality(double? bestQuality, CVRPData instance) { 82 instance.BestKnownQuality = bestQuality; 83 } 80 84 } 81 85 } -
branches/Async/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBDataDescriptor.cs
r12012 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 27 27 internal string InstanceIdentifier { get; set; } 28 28 internal string SolutionIdentifier { get; set; } 29 internal double? BestQuality { get; set; } 29 30 30 internal TSPLIBDataDescriptor(string name, string description, string instanceIdentifier, string solutionIdentifier ) {31 internal TSPLIBDataDescriptor(string name, string description, string instanceIdentifier, string solutionIdentifier, double? bestQuality) { 31 32 this.Name = name; 32 33 this.Description = description; 33 34 this.InstanceIdentifier = instanceIdentifier; 34 35 this.SolutionIdentifier = solutionIdentifier; 36 this.BestQuality = bestQuality; 35 37 } 36 38 } -
branches/Async/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBHeterogeneousPTSPDataDescriptor.cs
r15280 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 26 26 27 27 internal TSPLIBHeterogeneousPTSPDataDescriptor(string name, string description, string instanceIdentifier, string solutionIdentifier, int seed) 28 : base(name, description, instanceIdentifier, solutionIdentifier ) {28 : base(name, description, instanceIdentifier, solutionIdentifier, null) { 29 29 this.Name = name; 30 30 this.Description = description; -
branches/Async/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBHeterogeneousPTSPInstanceProvider.cs
r15280 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/Async/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBHomogeneousPTSPDataDescriptor.cs
r15280 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 25 25 26 26 internal TSPLIBHomogeneousPTSPDataDescriptor(string name, string description, string instanceIdentifier, string solutionIdentifier, double probability) 27 : base(name, description, instanceIdentifier, solutionIdentifier ) {27 : base(name, description, instanceIdentifier, solutionIdentifier, null) { 28 28 this.Name = name; 29 29 this.Description = description; -
branches/Async/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBHomogeneousPTSPInstanceProvider.cs
r15280 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/Async/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBInstanceProvider.cs
r15280 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 47 47 protected abstract T LoadInstance(TSPLIBParser parser, IDataDescriptor descriptor = null); 48 48 protected abstract void LoadSolution(TSPLIBParser parser, T instance); 49 protected abstract void LoadQuality(double? bestQuality, T instance); 49 50 50 51 public override IEnumerable<IDataDescriptor> GetDataDescriptors() { … … 57 58 } 58 59 } 60 61 Dictionary<string, double> qualities = new Dictionary<string, double>(); 62 var qualitiesArchiveName = GetResourceName(FileExtension + @"\.qual"); 63 if (!String.IsNullOrEmpty(qualitiesArchiveName)) { 64 using (var qualitiesReader = new StreamReader(GetType().Assembly.GetManifestResourceStream(qualitiesArchiveName))) { 65 while (!qualitiesReader.EndOfStream) { 66 var line = qualitiesReader.ReadLine().Split(';'); 67 qualities.Add(line[0] + "." + FileExtension, double.Parse(line[1])); 68 } 69 } 70 } 71 59 72 var instanceArchiveName = GetResourceName(FileExtension + @"\.zip"); 60 73 if (String.IsNullOrEmpty(instanceArchiveName)) yield break; … … 62 75 using (var instanceStream = new ZipArchive(GetType().Assembly.GetManifestResourceStream(instanceArchiveName), ZipArchiveMode.Read)) { 63 76 foreach (var entry in instanceStream.Entries.Select(x => x.Name).OrderBy(x => x)) { 64 yield return new TSPLIBDataDescriptor(Path.GetFileNameWithoutExtension(entry), GetInstanceDescription(), entry, solutions.ContainsKey(entry) ? solutions[entry] : String.Empty); 77 yield return new TSPLIBDataDescriptor(Path.GetFileNameWithoutExtension(entry), 78 GetInstanceDescription(), 79 entry, 80 solutions.ContainsKey(entry) ? solutions[entry] : String.Empty, 81 qualities.ContainsKey(entry) ? (double?)qualities[entry] : null); 65 82 } 66 83 } … … 75 92 var parser = new TSPLIBParser(stream); 76 93 var instance = LoadInstance(parser, id); 94 LoadQuality(descriptor.BestQuality, instance); 77 95 78 96 if (!String.IsNullOrEmpty(descriptor.SolutionIdentifier)) { -
branches/Async/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBPTSPInstanceProvider.cs
r15280 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 81 81 } 82 82 83 protected override void LoadQuality(double? bestQuality, PTSPData instance) { 84 instance.BestKnownQuality = bestQuality; 85 } 86 83 87 public PTSPData LoadData(string tspFile, string tourFile, double? bestQuality) { 84 88 var data = LoadInstance(new TSPLIBParser(tspFile)); -
branches/Async/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBParser.cs
r12012 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/Async/HeuristicLab.Problems.Instances.TSPLIB/3.3/TSPLIBTSPInstanceProvider.cs
r15280 r15281 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 81 81 } 82 82 83 protected override void LoadQuality(double? bestQuality, TSPData instance) { 84 instance.BestKnownQuality = bestQuality; 85 } 86 83 87 public TSPData LoadData(string tspFile, string tourFile, double? bestQuality) { 84 88 var data = LoadInstance(new TSPLIBParser(tspFile));
Note: See TracChangeset
for help on using the changeset viewer.