Simulated annealing for optimization
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello everyone,
i have a question to simulated annealing. I want to use it to solve a quadratic asignment problem (QAP) because it is very large and it takes to long to solve it with an exact algorithm. Is it possible to solve a QAP with simulated annealing ?
And how can I solve it with constraints like
or
. I can just give the algorithm a start value and a lower bound / upper bound.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/220626/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/220627/image.png)
Can please someone help me ?
Best regards !
0 Kommentare
Antworten (1)
Walter Roberson
am 22 Mai 2019
Generally speaking, simulated annealing can be used to solve QAP, but it would likely be much much slower than a routine designed for solving QAP.
simulannealbnd supports bounds constraints, but no other kinds of constraints, and it does not support anything like event functions that might provide constraints. You would therefore need to code the constraints as a penalty, which is always risky because the routines do not know to avoid penalty areas.
Simulated Annealing is a slow process. You would probably be better off with patternsearch()
4 Kommentare
Walter Roberson
am 23 Mai 2019
I already told you that it is not possible to set constraints with simmulannealbnd . All you can do is add a penalty when the constraint is violated. However when you use penalties, you have to plan them carefully. For example if you return 1000000 when the constraint is violated, then SA would be happy to try to search for a location that returned only 999999.99999 instead of understanding that the area is to be denied.
Siehe auch
Kategorien
Mehr zu Optimization Toolbox finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!