Back to portfolio

Traveling Salesman Problem Solver

Desktop educational application for solving the Traveling Salesman Problem with matrix input, route visualization, and step-by-step algorithm output.

Educational/student-oriented project. Screenshots and implementation details are publicly shareable.

Category

Desktop Apps

Date

2026-05

Status

Completed

Role

Architecture, implementation, UI development

Technologies

C#, .NET 8, WPF

Tags

C#, WPF, Algorithms, Optimization, Educational Software

Overview

Traveling Salesman Problem Solver is a desktop educational application designed for solving and visualizing the Traveling Salesman Problem (TSP).

The application combines optimization algorithms, matrix-based input, graphical route visualization, and explanatory textual output inside a standalone Windows desktop interface.

The project was created as an educational and demonstration-oriented utility focused on algorithm visualization, validation, and readability of the solving process.


Context

The goal of the project was to create a desktop utility capable of:

  • solving Traveling Salesman Problem scenarios;
  • validating matrix-based distance data;
  • visualizing calculated routes;
  • demonstrating optimization algorithms;
  • providing readable educational explanations of the solving process.

The application was intended for coursework, algorithm demonstrations, and educational scenarios related to optimization and graph-based problems.


Responsibilities

My responsibilities included:

  • application architecture;
  • implementation of TSP algorithms;
  • GUI development;
  • matrix handling logic;
  • validation system;
  • route visualization;
  • formatted educational output;
  • optimization workflow design.

Solution

The solution was implemented as a WPF desktop application using .NET 8 and standard platform libraries.

The application allows users to:

  • generate and edit distance matrices;
  • select a starting city;
  • calculate optimized routes;
  • visualize the resulting path;
  • review intermediate algorithm steps and calculations.

The system supports both:

  • brute-force search for smaller datasets;
  • heuristic nearest-neighbor approach for larger city counts.

The interface was designed to remain educational and visually understandable while handling matrix-based optimization tasks.


Technical Details

Stack

  • C#
  • .NET 8
  • WPF
  • System.Data

Architecture

The project separates:

  • matrix parsing and validation;
  • optimization algorithms;
  • route visualization;
  • result formatting;
  • GUI interaction logic.

Dedicated models are used for:

  • problem definition;
  • result representation;
  • solver isolation from the UI layer.

Functionality

Implemented functionality includes:

  • editable distance matrices;
  • symmetric random demo matrix generation;
  • validation of matrix correctness;
  • brute-force TSP solving for smaller datasets;
  • nearest-neighbor heuristic solving for larger datasets;
  • route length calculation;
  • textual step-by-step logs;
  • circular route visualization using Canvas rendering.

The visualization layer illustrates the calculated route between cities and helps users understand algorithm behavior.


Challenges

The main challenges included:

  • balancing algorithmic complexity with desktop application responsiveness;
  • validating large matrix datasets safely;
  • visualizing routes inside a lightweight educational interface;
  • separating exact and heuristic solving approaches clearly for users;
  • keeping the UI readable while presenting optimization logs and visual output simultaneously.

Result

The final application successfully demonstrated:

  • structured WPF desktop application architecture;
  • implementation of optimization and graph algorithms;
  • matrix-based data processing;
  • graphical route visualization;
  • educational presentation of algorithm workflows;
  • separation of computational logic and UI components.

The project also served as a reusable example of combining optimization algorithms, visualization, and desktop GUI development in .NET.


Media

The gallery contains:

  • matrix input examples;
  • route visualization previews;
  • optimization result logs and algorithm output.

Notes

  • Educational/demo-oriented project.
  • Ukrainian-language interface.
  • Uses brute-force and heuristic approaches depending on dataset size.
  • Implemented without third-party dependencies.

Gallery

Video

Video walkthrough is not published yet.

Links

External link is not available for this case.