How does Matlab's simulannealbnd enforce bound constraints?
2 次查看(过去 30 天)
显示 更早的评论
Hello
I'm using the simulannealbnd Function of Matlab for finding the minimum of a function using simulated annealing. As arguments one can pass lower and upper bounds of the variables. In the documentation it is described how simulated annealing works but there is nothing about how the bound constraints are enforced.
Does somebody know (or can imagine) how this is done in this case?
1 个评论
John D'Errico
2016-6-1
编辑:John D'Errico
2016-6-1
(As the author of fminsearchbnd) I can think of (or even imagine) several ways. Bound constraints are pretty easy. I have no idea how it actually accomplishes the job though, at least without looking at the code, when it would become pretty clear. Since I doubt the code is compiled, just read through it.
采纳的回答
Walter Roberson
2016-6-1
The AnnealingFcn that you designate is responsible for ensuring that the constraints are honoured. The standard annealingfast routine calls sahonorbounds for this purpose. The code there projects randomly a portion of the way between the current point and the bound when a bound would be violated. See toolbox/globaloptim/globaloptim/private/sahonorbounds.m
2 个评论
Walter Roberson
2016-6-2
Approximate translation:
I have now read the disclaimer in the documentation that explains how Simulate Annealing work (<http://ch.mathworks.com/help/gads/how-simulated-annealing-works.html)>. Two points are to me as unclear:
Step 2: A poorer point (as the currently best point) can be accepted with a certain probability. @acceptancesa If you use gets you a probability between 0 and 0.5 (according to documentation). When the new point is now just accepted? So if, for example, the probability of acceptance is 0.3, you have to decide if now the point is accepted or not still.
Step 4: reannealing. Here is the parameter sj described as follows: "gradient of objective in direction i times difference in bounds in direction i». How is this gradient? I admit yes only the objective function. With the difference in bound I suppose that upper bound - lower bound is meant.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulated Annealing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!