Skip to content

The travelling salesman problem asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?" It is an NP-hard problem in combinatorial optimization, important in theoretical computer science and operation…

Notifications You must be signed in to change notification settings

BrendonHenrique/Travelling-Salesman-Problem-With-Nodejs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Problema do caixeiro viajante ( TSP )

Resolvido com Brute-force (Algoritimo exato) ou Christofides (Algoritimo aproximativo)

Universidade federal de pelotas (UFPEL)

Algoritimo e estrutura de dados 3

Tarefa: Algoritimos aproximativos para TSP (Travelling Salesman Problem)

Setup para rodar o projeto

Esse projeto foi criado usando Javascript + NodeJS Para rodar o rojeto você deve instalar o NodeJS

  • Site Nodejs
    https://nodejs.org/en/download/

Como funciona

As instâncias do caixeiro viajante estão armazenadas na pasta /data, Serão precisos alguns passos para executar.

1 - Instalar dependências: Dentro da pasta do projeto execute no terminal

  • Instalar dependências
    npm install

2 - Agora basta executar o projeto ainda dentro da pasta

  • Executar
    npm run start

3 - Dois menus irão aparecer:

Selecione o tipo de algoritimo que tu deseja utilizar (Use arrow keys)

exato aproximativo

Selecione a instância do caixeiro viajante que tu deseja resolver (Use arrow keys)

tsp1_253.txt tsp2_1248.txt tsp3_1194.txt tsp4_7013.txt tsp5_27603.txt

About

The travelling salesman problem asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?" It is an NP-hard problem in combinatorial optimization, important in theoretical computer science and operation…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published