Skip to content

Commit

Permalink
Merge pull request #19 from alexandre-lecoq/master
Browse files Browse the repository at this point in the history
Upgraded project to net standard 2.0
  • Loading branch information
pdrozdowski authored Oct 8, 2020
2 parents 7351b9a + 09c090a commit cbf3ca0
Show file tree
Hide file tree
Showing 12 changed files with 105 additions and 535 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ TestResults
*.suo
*.user
*.sln.docstates
.vs/

# Build results
[Dd]ebug/
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
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?

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

Expand Down
2 changes: 1 addition & 1 deletion TSPLIB95/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.

2 changes: 1 addition & 1 deletion TSPLIB95/tsp/dsj1000.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
279 changes: 0 additions & 279 deletions TspLibNet/NuGet/TSPLib.Net.nuspec

This file was deleted.

81 changes: 38 additions & 43 deletions TspLibNet/TspLibNet.sln
Original file line number Diff line number Diff line change
@@ -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
6 changes: 2 additions & 4 deletions TspLibNet/TspLibNet/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand All @@ -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")]
160 changes: 35 additions & 125 deletions TspLibNet/TspLibNet/TspLibNet.csproj
Original file line number Diff line number Diff line change
@@ -1,126 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{A5F17DFD-80C3-4F1F-B85F-F30E24E6F158}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>TspLibNet</RootNamespace>
<AssemblyName>TspLibNet</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<DocumentationFile>bin\Release\TspLibNet.XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DistanceFunctions\DistanceFunctionBase.cs" />
<Compile Include="Exceptions\TourInvalidException.cs" />
<Compile Include="Exceptions\GraphException.cs" />
<Compile Include="Graph\Demand\DictionaryBasedDemandProvider.cs" />
<Compile Include="Graph\Demand\IDemandProvider.cs" />
<Compile Include="Graph\Depots\IDepotsProvider.cs" />
<Compile Include="Graph\Depots\NodeListBasedDepotProvider.cs" />
<Compile Include="Graph\Edges\Edge.cs" />
<Compile Include="Graph\Edges\EdgeListBasedEdgeProvider.cs" />
<Compile Include="Graph\Edges\IEdgeProvider.cs" />
<Compile Include="Graph\Edges\WeightMatrixBasedEdgeProvider.cs" />
<Compile Include="Graph\Edges\NodeBasedEdgeProvider.cs" />
<Compile Include="Graph\Edges\WeightMatrixBasedEdgeProviderWithExclusions.cs" />
<Compile Include="Graph\EdgeWeights\FunctionBasedWeightProviderWithCaching.cs" />
<Compile Include="Graph\FixedEdges\EdgeListBasedFixedEdgesProvider.cs" />
<Compile Include="Graph\FixedEdges\IFixedEdgesProvider.cs" />
<Compile Include="Graph\Nodes\EdgeListBasedNodeProvider.cs" />
<Compile Include="Graph\Nodes\INodeProvider.cs" />
<Compile Include="Graph\Nodes\DimensionBasedNodeProvider.cs" />
<Compile Include="Graph\Nodes\NodeListBasedNodeProvider.cs" />
<Compile Include="IProblem.cs" />
<Compile Include="NodesFactory.cs" />
<Compile Include="TspLib95.cs" />
<Compile Include="TspLib95Item.cs" />
<Compile Include="TSP\TspFileDataExtractor.cs" />
<Compile Include="Graph\EdgeWeights\NodeAdjacencyBasedWeightProvider.cs" />
<Compile Include="Graph\Edges\EdgesCollection.cs" />
<Compile Include="Graph\Nodes\Node.cs" />
<Compile Include="Graph\Nodes\NodesCollection.cs" />
<Compile Include="CapacitatedVehicleRoutingProblem.cs" />
<Compile Include="HamiltonianCycleProblem.cs" />
<Compile Include="ProblemBase.cs" />
<Compile Include="SequentialOrderingProblem.cs" />
<Compile Include="TravelingSalesmanProblem.cs" />
<Compile Include="Tours\ITour.cs" />
<Compile Include="Tours\Tour.cs" />
<Compile Include="DistanceFunctions\IDistanceFunction.cs" />
<Compile Include="Graph\Edges\IEdge.cs" />
<Compile Include="Graph\Nodes\INode.cs" />
<Compile Include="Graph\EdgeWeights\IEdgeWeightsProvider.cs" />
<Compile Include="Graph\EdgeWeights\FunctionBasedWeightProvider.cs" />
<Compile Include="Graph\EdgeWeights\MatrixBasedWeightProvider.cs" />
<Compile Include="Graph\EdgeWeights\MatrixBuilder.cs" />
<Compile Include="TSP\Defines\DisplayDataType.cs" />
<Compile Include="TSP\Defines\EdgeDataFormat.cs" />
<Compile Include="TSP\Defines\EdgeWeightFormat.cs" />
<Compile Include="TSP\Defines\EdgeWeightType.cs" />
<Compile Include="TSP\Defines\FileType.cs" />
<Compile Include="Graph\Nodes\Node3D.cs" />
<Compile Include="DistanceFunctions\Euclidean.cs" />
<Compile Include="DistanceFunctions\EuclideanCeiled.cs" />
<Compile Include="DistanceFunctions\Geographical.cs" />
<Compile Include="DistanceFunctions\Manhattan.cs" />
<Compile Include="DistanceFunctions\Maximum.cs" />
<Compile Include="DistanceFunctions\PseudoEuclidean.cs" />
<Compile Include="DistanceFunctions\GeoLocation.cs" />
<Compile Include="Extensions\MathExtensions.cs" />
<Compile Include="TSP\Defines\NodeCoordinatesType.cs" />
<Compile Include="TSP\TspFile.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TSP\TspFileLoader.cs" />
<Compile Include="Graph\Nodes\Node2D.cs" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DocumentationFile>bin\Release\TspLibNet.XML</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile></AssemblyOriginatorKeyFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<PackageLicenseExpression></PackageLicenseExpression>
<PackageId>TSPLib.Net</PackageId>
<Version>1.1.6</Version>
<Authors>Pawel Drozdowski, William Hallatt</Authors>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageProjectUrl>https://github.com/pdrozdowski/TSPLib.Net</PackageProjectUrl>
<PackageReleaseNotes>Migrated to .net core.</PackageReleaseNotes>
<PackageTags>TSP, traveling salesman problem</PackageTags>
<RepositoryUrl>https://github.com/pdrozdowski/TSPLib.Net</RepositoryUrl>
</PropertyGroup>
<ItemGroup>
<None Include="..\..\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\README.md">
<Pack>true</Pack>
<PackagePath>\</PackagePath>
</Content>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion TspLibNet/TspLibNetTests/TspDistanceCalculationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace TspLibNetTests
[TestClass]
public class TspDistanceCalculationTests
{
private const string RootDir = @"..\..\..\..\TSPLIB95";
private const string RootDir = @"..\..\..\..\..\TSPLIB95";

[TestMethod]
public void VerifyPcb442CanonicalTsp()
Expand Down
2 changes: 1 addition & 1 deletion TspLibNet/TspLibNetTests/TspFileLoaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace TspLibNetTests
[TestClass]
public class TspFileLoaderTests
{
private const string RootDir = @"..\..\..\..\TSPLIB95";
private const string RootDir = @"..\..\..\..\..\TSPLIB95";

[TestMethod]
public void LoadBerlin52Problem()
Expand Down
2 changes: 1 addition & 1 deletion TspLibNet/TspLibNetTests/TspLib95Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace TspLibNetTests
[TestClass]
public class TspLib95Tests
{
private const string RootDir = @"..\..\..\..\TSPLIB95";
private const string RootDir = @"..\..\..\..\..\TSPLIB95";

[TestMethod]
public void TspLibPathValid()
Expand Down
Loading

0 comments on commit cbf3ca0

Please sign in to comment.