Forum

Greedy heuristic in...
 
Notifications
Clear all

Greedy heuristic in VBA

2 Posts
2 Users
0 Reactions
135 Views
(@Anonymous)
Posts: 0
New Member Guest
 

Hi everybody.
Can anyone help me with a simple greedy/nearest neighbour heuristic in VBA?
I have a distance matrix of 36x36 where 1 is the "starting point". I need to go from index 1 to the nearest point (column) in the matrix. I need to update an array called used() to make sure that I don't revisit any indexes where I have already been.

Finally, I need to print the visiting sequence in a row.

I have been stuck with this for quite a while, and I figured that somebody in might be able for come up with some code for this quickly.

In advance, thank you so much!

 
Posted : 14/06/2022 6:59 am
(@catalinb)
Posts: 1937
Member Admin
 

Hi Endros,

Can you come with a more detailed description?
Hard to imagine what you're after without a sample and a proper description.

 
Posted : 16/06/2022 10:55 am
Share: