Change in computational time
1 view (last 30 days)
Show older comments
Hi,
I wrote a code for TSP using nearest neighbor search and improved the generated tour using 2-opt pairwise exchange, the number of cities were 401. The first time it ran the code MATLAB said elapsed time 8.1 hr (using tic-toc), however, I ran it a few times after that and the elapsed time always stays between 7-8 seconds, the final answer and plot are the same. I was wondering how this is possible, as a reduction from 8 hr to 8 sec is pretty large, does MATLAB retain memory of the previous result somehow?
Thank You, Rithul
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!