How to create simulated annealing objective function?
Ältere Kommentare anzeigen
Hello!
I want to create a objective function for Travelling salesman problem using simulated annealing with global optimization toolbox.
Does anyone have idea how to make these?
Thank you for help
3 Kommentare
Walter Roberson
am 28 Mai 2015
Bearbeitet: Walter Roberson
am 28 Mai 2015
See http://uk.mathworks.com/matlabcentral/answers/64840-can-anyone-suggest-me-to-write-a-correct-and-working-code-for-traveling-salesman-problem-using-simul for one approach
You might also find it useful to look at the Traveling Salesman GA demo. I cannot look at it myself as I do not have the appropriate license, but the link is said to be http://www.mathworks.com/products/global-optimization/demos.html?file=/products/demos/shipping/globaloptim/traveling_salesman_demo.html
jan grlica
am 28 Mai 2015
jan grlica
am 28 Mai 2015
Bearbeitet: Walter Roberson
am 28 Mai 2015
Antworten (2)
Alan Weiss
am 28 Mai 2015
Bearbeitet: Alan Weiss
am 28 Mai 2015
0 Stimmen
The simulated annealing solver is based on continuous variables by default. Perhaps you could make it work for a custom data type, similar to the genetic algorithm solution. But travelling salesman problems are most easily formulated for integer variables. For solutions, see this MILP example which uses Optimization Toolbox, or this genetic algorithm example using Global Optimization Toolbox and a custom data type.
Alan Weiss
MATLAB mathematical toolbox documentation
1 Kommentar
jan grlica
am 28 Mai 2015
Walter Roberson
am 28 Mai 2015
0 Stimmen
See my discussion in http://uk.mathworks.com/matlabcentral/answers/220440-simulated-annealing-how-to-solve-this-error as to what the problem is here (the code has exactly the same basic problem here), and as to why it is hard to fix.
The short summary: you can use Simulated Annealing techniques with Traveling Salesperson, but using simulannealbnd() itself for the problem is going to be difficult.
Kategorien
Mehr zu Simulated Annealing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!