Skip to content

Tabu search solution for capacitive vehicle routing problem

License

Notifications You must be signed in to change notification settings

ivanchoff/TS_CVRP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

This repos contain some programs for solve CVRP (Capacitated Vehicle Routing Problem) specifically for "Collectors garbage trucks" using sweep algorithm and Tabu Search in C++ with C++11 standard.

table of contents

#sweep.cc sweep algorithm

This program recieve from standar input the number of nodes, after that read info of each node as follows:

r Θ C id

where:

r is the radial coordinate (double)

Θ is the angular coordinate (double)

C is the capacity of each node (for this problem is the weight of garbage) (double)

id is an unique id of each node.

the input info is on file sweep_input.

for compile

g++ sweep.cc -o sweep

for run

 ./sweep < sweep_input

for save solution of sweep algorithm as input of Tabu Search

./sweep < sweep_input > TS_init_sol_input

#TS.cc

This program requires these files:

demand: matriz with nodes demand (double)

costs: matriz with costs between all nodes (double)

TS_init_sol_input: init solution for algorithm

for compile:

g++ TS.cc -o TS -std=c++11

for run:

./TS < TS_init_sol_input

for run and save solution in file:

./TS < TS_init_sol_input > readSol_input

#readSol.cc

This program only show data solution more friendly so readSol.cc requires these files:

costs matriz of nodes costs

readSol_input output solution vector of TS.cc

demand matriz of nodes demand

tiempos.txt matriz of nodes times

for compile

g++ readSol.cc -o readSol

for run

./readSol < readSol_input

#runing example

for runing example execute run.sh in a terminal.

About

Tabu search solution for capacitive vehicle routing problem

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published