From e0ccbfbf783d02e89ea5f9786d9175a2ffdfdbae Mon Sep 17 00:00:00 2001 From: Alexandre Lecoq Date: Fri, 2 Oct 2020 13:20:25 +0200 Subject: [PATCH 1/2] Updated TSPLIB95 data from http://comopt.ifi.uni-heidelberg.de/software/TSPLIB95/index.html --- README.md | 2 +- TSPLIB95/readme.txt | 2 +- TSPLIB95/tsp/dsj1000.tsp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5d44151..f3f186b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ TSPLib.Net ========== -TSPLib.Net is a C# .Net wrapper library for [TSPLIB](http://comopt.ifi.uni-heidelberg.de/software/TSPLIB95/) (a library of sample instances for the TSP and related problems from various sources and of various types collected by Heidelberg university) that provides complete access to all the information provided in TSPLIB95 as at 12 Jan 2014. +TSPLib.Net is a C# .Net wrapper library for [TSPLIB](http://comopt.ifi.uni-heidelberg.de/software/TSPLIB95/) (a library of sample instances for the TSP and related problems from various sources and of various types collected by Heidelberg university) that provides complete access to all the information provided in TSPLIB95 as of October the 2nd, 2020. ### How do I get it? diff --git a/TSPLIB95/readme.txt b/TSPLIB95/readme.txt index fc7a943..1989756 100644 --- a/TSPLIB95/readme.txt +++ b/TSPLIB95/readme.txt @@ -21,6 +21,6 @@ Capacitated vehicle routing problem (CVRP) ========================================== We are given n-1 nodes, one depot and distances from the nodes to the depot, as well as between nodes. All nodes have demands which can be satisfied by the depot. For delivery to the nodes, trucks with identical capacities are available. The problem is to find tours for the trucks of minimal total length that satisfy the node demands without violating truck capacity constraint. The number of trucks is not specified. Each tour visits a subset of the nodes and starts and terminates at the depot. (Remark: In some data files a collection of alternate depots is given. A CVRP is then given by selecting one of these depots.) -All files version from 12th Jan 2014 +All files version from October the 2nd, 2020. Check DOC.PS or DOC.PDF for original description of problems, used functions and file formats. diff --git a/TSPLIB95/tsp/dsj1000.tsp b/TSPLIB95/tsp/dsj1000.tsp index 3680832..41943c9 100644 --- a/TSPLIB95/tsp/dsj1000.tsp +++ b/TSPLIB95/tsp/dsj1000.tsp @@ -2,7 +2,7 @@ NAME : dsj1000 COMMENT : Clustered random problem (Johnson) TYPE : TSP DIMENSION : 1000 -EDGE_WEIGHT_TYPE : EUC_2D +EDGE_WEIGHT_TYPE : CEIL_2D NODE_COORD_SECTION 1 981036 508139 2 534120 -42453 From 09c090ab7a9225bdf9b9f6e60a2f09c40a08ec41 Mon Sep 17 00:00:00 2001 From: Alexandre Lecoq Date: Fri, 2 Oct 2020 21:00:21 +0200 Subject: [PATCH 2/2] Migrated to .net standard and updated README.md. --- .gitignore | 1 + README.md | 2 + TspLibNet/NuGet/TSPLib.Net.nuspec | 279 ------------------ TspLibNet/TspLibNet.sln | 81 +++-- .../TspLibNet/Properties/AssemblyInfo.cs | 6 +- TspLibNet/TspLibNet/TspLibNet.csproj | 160 +++------- .../TspDistanceCalculationTests.cs | 2 +- .../TspLibNetTests/TspFileLoaderTests.cs | 2 +- TspLibNet/TspLibNetTests/TspLib95Tests.cs | 2 +- .../TspLibNetTests/TspLibNetTests.csproj | 99 ++----- 10 files changed, 102 insertions(+), 532 deletions(-) delete mode 100644 TspLibNet/NuGet/TSPLib.Net.nuspec diff --git a/.gitignore b/.gitignore index bdc3535..22ab1aa 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ TestResults *.suo *.user *.sln.docstates +.vs/ # Build results [Dd]ebug/ diff --git a/README.md b/README.md index f3f186b..0690a51 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ TSPLib.Net is a C# .Net wrapper library for [TSPLIB](http://comopt.ifi.uni-heide ### How do I get it? Install it from [NuGet](https://www.nuget.org/packages/TSPLib.Net/), or download from [releases](https://github.com/goblincoding/TSPLib.Net/releases). +The nuget package only contains the library. Nuget packages cannot copy contents to target projects. +Thus, the TSPLIB95 directory must be copied to your solution directory manualy. ### TSPLIB95 diff --git a/TspLibNet/NuGet/TSPLib.Net.nuspec b/TspLibNet/NuGet/TSPLib.Net.nuspec deleted file mode 100644 index e2be56a..0000000 --- a/TspLibNet/NuGet/TSPLib.Net.nuspec +++ /dev/null @@ -1,279 +0,0 @@ - - - - TSPLib.Net - 1.1.5 - Pawel Drozdowski,William Hallatt - Pawel Drozdowski,William Hallatt - https://github.com/pdrozdowski/TSPLib.Net/blob/master/LICENSE - https://github.com/pdrozdowski/TSPLib.Net - true - TSPLib.Net is a C# .Net wrapper library for TSPLIB (http://comopt.ifi.uni-heidelberg.de/software/TSPLIB95, a library of sample instances for the TSP and related problems from various sources and of various types collected by Heidelberg university) that provides complete access to all the information provided in TSPLIB95 as at 12 Jan 2014. - TSPLib.Net is a C# .Net wrapper library for TSPLIB (http://comopt.ifi.uni-heidelberg.de/software/TSPLIB95) - Applied fix for ceiled euclidean distance function, added optimal tour for pla33810 tsp problem. - - en-US - TSP, traveling salesman problem - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/TspLibNet/TspLibNet.sln b/TspLibNet/TspLibNet.sln index 9332393..54721ec 100644 --- a/TspLibNet/TspLibNet.sln +++ b/TspLibNet/TspLibNet.sln @@ -1,43 +1,38 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.24720.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TspLibNet", "TspLibNet\TspLibNet.csproj", "{A5F17DFD-80C3-4F1F-B85F-F30E24E6F158}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TspLibNetTests", "TspLibNetTests\TspLibNetTests.csproj", "{452F80AC-536C-4E55-A2DC-D78AA0E9EF66}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{986E4312-63AB-4356-9340-D31AE28DD4E2}" - ProjectSection(SolutionItems) = preProject - Local.testsettings = Local.testsettings - TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings - TspLibNet.vsmdi = TspLibNet.vsmdi - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{C6161D34-B3DA-4941-A2CB-0A92160B890B}" - ProjectSection(SolutionItems) = preProject - NuGet\TSPLib.Net.nuspec = NuGet\TSPLib.Net.nuspec - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A5F17DFD-80C3-4F1F-B85F-F30E24E6F158}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A5F17DFD-80C3-4F1F-B85F-F30E24E6F158}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A5F17DFD-80C3-4F1F-B85F-F30E24E6F158}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A5F17DFD-80C3-4F1F-B85F-F30E24E6F158}.Release|Any CPU.Build.0 = Release|Any CPU - {452F80AC-536C-4E55-A2DC-D78AA0E9EF66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {452F80AC-536C-4E55-A2DC-D78AA0E9EF66}.Debug|Any CPU.Build.0 = Debug|Any CPU - {452F80AC-536C-4E55-A2DC-D78AA0E9EF66}.Release|Any CPU.ActiveCfg = Release|Any CPU - {452F80AC-536C-4E55-A2DC-D78AA0E9EF66}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(TestCaseManagementSettings) = postSolution - CategoryFile = TspLibNet.vsmdi - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.24720.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TspLibNet", "TspLibNet\TspLibNet.csproj", "{A5F17DFD-80C3-4F1F-B85F-F30E24E6F158}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TspLibNetTests", "TspLibNetTests\TspLibNetTests.csproj", "{452F80AC-536C-4E55-A2DC-D78AA0E9EF66}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{986E4312-63AB-4356-9340-D31AE28DD4E2}" + ProjectSection(SolutionItems) = preProject + Local.testsettings = Local.testsettings + TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings + TspLibNet.vsmdi = TspLibNet.vsmdi + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A5F17DFD-80C3-4F1F-B85F-F30E24E6F158}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A5F17DFD-80C3-4F1F-B85F-F30E24E6F158}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A5F17DFD-80C3-4F1F-B85F-F30E24E6F158}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A5F17DFD-80C3-4F1F-B85F-F30E24E6F158}.Release|Any CPU.Build.0 = Release|Any CPU + {452F80AC-536C-4E55-A2DC-D78AA0E9EF66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {452F80AC-536C-4E55-A2DC-D78AA0E9EF66}.Debug|Any CPU.Build.0 = Debug|Any CPU + {452F80AC-536C-4E55-A2DC-D78AA0E9EF66}.Release|Any CPU.ActiveCfg = Release|Any CPU + {452F80AC-536C-4E55-A2DC-D78AA0E9EF66}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(TestCaseManagementSettings) = postSolution + CategoryFile = TspLibNet.vsmdi + EndGlobalSection +EndGlobal diff --git a/TspLibNet/TspLibNet/Properties/AssemblyInfo.cs b/TspLibNet/TspLibNet/Properties/AssemblyInfo.cs index cb2c042..6be9986 100644 --- a/TspLibNet/TspLibNet/Properties/AssemblyInfo.cs +++ b/TspLibNet/TspLibNet/Properties/AssemblyInfo.cs @@ -26,7 +26,7 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("TspLibNet")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyDescription("TSPLib.Net is a C# .Net wrapper library for TSPLIB (http://comopt.ifi.uni-heidelberg.de/software/TSPLIB95, a library of sample instances for the TSP and related problems from various sources and of various types collected by Heidelberg university) that provides complete access to all the information provided in TSPLIB95 as of October the 2nd, 2020.")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("TspLibNet")] @@ -51,6 +51,4 @@ // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.*")] -//[assembly: AssemblyVersion("1.0.0.0")] -//[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("1.1.6.0")] diff --git a/TspLibNet/TspLibNet/TspLibNet.csproj b/TspLibNet/TspLibNet/TspLibNet.csproj index 27fd001..8d40f46 100644 --- a/TspLibNet/TspLibNet/TspLibNet.csproj +++ b/TspLibNet/TspLibNet/TspLibNet.csproj @@ -1,126 +1,36 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {A5F17DFD-80C3-4F1F-B85F-F30E24E6F158} - Library - Properties - TspLibNet - TspLibNet - v4.5.1 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - bin\Release\TspLibNet.XML - - - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + netstandard2.0 + Library + false + + + bin\Release\TspLibNet.XML + + + + true + true + + TSPLib.Net + 1.1.6 + Pawel Drozdowski, William Hallatt + LICENSE.txt + https://github.com/pdrozdowski/TSPLib.Net + Migrated to .net core. + TSP, traveling salesman problem + https://github.com/pdrozdowski/TSPLib.Net + + + + True + + + + + + true + \ + + \ No newline at end of file diff --git a/TspLibNet/TspLibNetTests/TspDistanceCalculationTests.cs b/TspLibNet/TspLibNetTests/TspDistanceCalculationTests.cs index a864ded..6db27ce 100644 --- a/TspLibNet/TspLibNetTests/TspDistanceCalculationTests.cs +++ b/TspLibNet/TspLibNetTests/TspDistanceCalculationTests.cs @@ -30,7 +30,7 @@ namespace TspLibNetTests [TestClass] public class TspDistanceCalculationTests { - private const string RootDir = @"..\..\..\..\TSPLIB95"; + private const string RootDir = @"..\..\..\..\..\TSPLIB95"; [TestMethod] public void VerifyPcb442CanonicalTsp() diff --git a/TspLibNet/TspLibNetTests/TspFileLoaderTests.cs b/TspLibNet/TspLibNetTests/TspFileLoaderTests.cs index af5a1f4..8848949 100644 --- a/TspLibNet/TspLibNetTests/TspFileLoaderTests.cs +++ b/TspLibNet/TspLibNetTests/TspFileLoaderTests.cs @@ -34,7 +34,7 @@ namespace TspLibNetTests [TestClass] public class TspFileLoaderTests { - private const string RootDir = @"..\..\..\..\TSPLIB95"; + private const string RootDir = @"..\..\..\..\..\TSPLIB95"; [TestMethod] public void LoadBerlin52Problem() diff --git a/TspLibNet/TspLibNetTests/TspLib95Tests.cs b/TspLibNet/TspLibNetTests/TspLib95Tests.cs index cc8a75c..685d762 100644 --- a/TspLibNet/TspLibNetTests/TspLib95Tests.cs +++ b/TspLibNet/TspLibNetTests/TspLib95Tests.cs @@ -9,7 +9,7 @@ namespace TspLibNetTests [TestClass] public class TspLib95Tests { - private const string RootDir = @"..\..\..\..\TSPLIB95"; + private const string RootDir = @"..\..\..\..\..\TSPLIB95"; [TestMethod] public void TspLibPathValid() diff --git a/TspLibNet/TspLibNetTests/TspLibNetTests.csproj b/TspLibNet/TspLibNetTests/TspLibNetTests.csproj index 6ccc375..9dcc689 100644 --- a/TspLibNet/TspLibNetTests/TspLibNetTests.csproj +++ b/TspLibNet/TspLibNetTests/TspLibNetTests.csproj @@ -1,79 +1,22 @@ - - - - Debug - AnyCPU - - - 2.0 - {452F80AC-536C-4E55-A2DC-D78AA0E9EF66} - Library - Properties - TspLibNetTests - TspLibNetTests - v4.5.1 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - - False - - - - 3.5 - - - - - False - - - - - - - - - - - - - - - {A5F17DFD-80C3-4F1F-B85F-F30E24E6F158} - TspLibNet - - - - - - - + + + netcoreapp3.1 + false + false + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + \ No newline at end of file