Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Solve Travelling Salesman Problem in oF (primarily by brute force)

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 ofxTSP-RouteFinderExample
Octocat-spinner-32 ofxTSP-example
Octocat-spinner-32 ofxTSPLib
Octocat-spinner-32 src
Octocat-spinner-32 .gitignore
Octocat-spinner-32 readme.md
Octocat-spinner-32 screenshot.png
readme.md

Introduction

The Travelling Salesman Problem is a computational problem of finding the 'shortest route' between a set of nodes

Usage

Define your problem with the class ofxTSP::Problem :

    struct Problem {
        int destinationCount;
        map<Journey, float> distance;
    };

wherein an ofxTSP::Journey is defined as:

    struct Journey {
        uint16_t start;
        uint16_t end;
    };

Then apply a ofxTSP::Solver using the function:

vector<int> solve(const Problem & problem)

The returned vector<int> has ordered elements which define the route

Currently the only available solver is ofxTSP::BruteForce as i've got a pretty simple problem here. Others will come later as necessary.

Something went wrong with that request. Please try again.