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