Completed

Macro en Vba - Implementación Algoritmo Colonia de Hormigas

Published on the October 30, 2016 in IT & Programming

About this project

Open

Desarrollar una macro en Excel en VBA para implementar el Algoritmo de Colonia de Hormigas.

El objetivo es resolver el problema del agente viajero con ventanas de tiempo. Para ello tengo una muestra de prueba con las rutas asignadas a 40 vehículos, de 30 a 80 puntos por vehículo.

Adjunto un paper del autor Chi-Bin Cheng titulado "A modified ant colony system for solving the travelling salesman problem with time windows". Este paper contiene todas las formulas y el paso a paso que se requiere para desarrollar el algoritmo de Colonia de Hormigas.  Al final de esta descripción esta el paso a paso que encuentra en el paper.


Adicionalmente, adjunto 3 artículos de apoyo que implementaron el Algoritmo de Colonia de Hormigas, no son tan detallados como el primero pero pueden contener información útil para entender el algoritmo. 

Adjunto muestra de 5 rutas con horarios de puntos a visitar y horarios de vehículos.

Adjunto también un ejemplo, el cual consiste en una macro que yo desarrolle hace varios años que implementa la colonia de hormigas pero solo resuelve el problema del agente viajero sin ventanas de tiempo y para un solo vehículo.

Finalmente dos aspectos importantes:
Plazo: 5 dias calendario
Presupuesto: 200.000 a 400.000 COP


Step 0. Initialization
Set t = 0
Set initial value i j (t) for all (i, j) 2 A
Place m ants at the depot
Set i j (t) = 0 for all (i, j) 2 A
Step 1. Route Construction
For i = 0 to n do {n is the number of nodes; i = 0 denotes the depot}
For every ant k = 1 to m do
If Ni not empty
Step 1.1 Local heuristics
Calculate gi j and hi j from Eqs.
(11) and (12), respectively, 8 j 2 Ni
If gi j = 0, 8 j 2 Ni , then give up the tour and go to next k {no more feasible paths}
Step 1.2 Move
Choose the node j to move to in accordance with the rules given in Eqs. (9) and (10)
Remove j from Ni
Step 2. Memorize the best tour found up to now, T , and its travel time, L
Step 3.
Reset Ni = N for all ants
Step 4. Local Updating
For all (i, j) 2 A do
Pheromone updating by Eq. (7)
Step 5.
Global Updating
For all (i, j) 2 T  do
Pheromone updating by Eq. (6)
Step 6. Stop Criterion
If the stop criterion is satisfied then stop, otherwise
Go to Step 1

Category IT & Programming
Subcategory Desktop apps
What is the scope of the project? Create a new app
Is this a project or a position? Project
I currently have I have specifications
Required availability As needed
Experience in this type of projects Yes (I have managed this kind of project before)
Required platforms Windows

Delivery term: November 04, 2016

Skills needed

VBA