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!