Best Tour := NIL
repeat
Randomly place M ants on N cities
each ant constructs a tour in a greedy stochastic manner
update best_tour
Each ant deposits pheromone on tour edges*
Until a termination criteria is met
return best_tour
*In the real world, ant keeps on depositing pheromone
/* cycle */
/* compute number of times a patient has visited*/
/* initialize pheromone and data structure and initialize solution with N hospitals using nearest neighbour heuristic*/
for each ant k:
construct a solution ๐k
insert(INj)
new_ant()
/*update for best solution if it is improved*/
if visited_patients(๐k) > visited_patients(๐ACS-VEI)
๐ACS-VEI := ๐k
/* if feasible, send for VRPTW */
/* perform update on both ๐k and ๐ACS-VEI */
ฯij = (1-ฯ)ฯij +ฯ/Jk
ฯij = (1-ฯ)ฯij +ฯ/JACS-VEI
until a stopping condition is met