How to create simulated annealing objective function?
显示 更早的评论
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 个评论
Walter Roberson
2015-5-28
编辑:Walter Roberson
2015-5-28
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
2015-5-28
jan grlica
2015-5-28
编辑:Walter Roberson
2015-5-28
回答(2 个)
Alan Weiss
2015-5-28
编辑:Alan Weiss
2015-5-28
0 个投票
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
Walter Roberson
2015-5-28
0 个投票
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Simulated Annealing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!