https://github.com/ussserrr/delivery-route-helper
C# .NET Core project showing the concept of forming the complete connected delivery route from the set of scattered segments
https://github.com/ussserrr/delivery-route-helper
Last synced: 1 day ago
JSON representation
C# .NET Core project showing the concept of forming the complete connected delivery route from the set of scattered segments
- Host: GitHub
- URL: https://github.com/ussserrr/delivery-route-helper
- Owner: ussserrr
- License: mit
- Created: 2019-03-28T16:31:39.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-28T16:33:56.000Z (about 7 years ago)
- Last Synced: 2025-02-26T02:29:14.097Z (over 1 year ago)
- Language: C#
- Homepage:
- Size: 62.5 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DeliveryRoute
## Overview
C# .NET Core project showing the concept of forming the complete connected delivery route from the set of scattered segments. For example, let's say we have the following input data:
| Segment | Start | End |
|---------|-----------|---------------|
| 3 | Queens | The Bronx |
| 1 | Manhattan | Brooklyn |
| 4 | The Bronx | Staten Island |
| 2 | Brooklyn | Queens |
So the output should looks like this:
| Segment | Start | End |
|---------|-----------|---------------|
| 1 | Manhattan | Brooklyn |
| 2 | Brooklyn | Queens |
| 3 | Queens | The Bronx |
| 4 | The Bronx | Staten Island |
## Approach
To describe and solve the task we introduce following entities:
- `Point` - class representing a single point of delivery. Here we use simple `string` to identify the `Point`
- `Segment` - class representing a directed set of 2 `Point`s so it has the defined `Start` and the `End`
- `Route` - class encapsulating input and output data structures with arranging and reversing methods as well
## Project structure
3 projects are combined into single Visual Studio Solution.
### DeliveryRouteHelper
Project containing the library itself and some utility functions.
Dependencies:
- *[Optional]* DocFX - generates fancy documentation
### DeliveryRoute
Example project showing the library features and usage.
Dependencies:
- NLog - prints logs instead of `Console.WriteLine()`s
### DeliveryRouteHelper.Tests
Unit tests for the `DeliveryRouteHelper` library.
Dependencies:
- xUnit - modern testing framework
## Build & Run
### Windows, macOS
Use Visual Studio as all-in-one solution to build, run, test and generate docs (make sure you have NuGet, dotnet, .NET Core Build Tools installed).
### Linux
Configuration was tested on Ubuntu 18.10 under `dotnet` CLI. Prerequisites:
- .NET Core 2 - refer to official Microsoft documentation to add custom package sources and install `dotnet` from `apt`
- Mono 5 - also refer to official Mono documentation to add custom package sources and install latest complete Mono framework (including MSBuild)