How does Matlab's simulannealbnd enforce bound constraints?

1 次查看(过去 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
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
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 个评论
Sepp
Sepp 2016-6-2
编辑:Sepp 2016-6-2
Ich habe nun die Erklärung in der Dokumentation gelesen, welche erklärt wie Simulate Annealing funktioniert ( http://ch.mathworks.com/help/gads/how-simulated-annealing-works.html ). Zwei Punkte sind mir da allerdings unklar:
Step 2: Ein schlechterer Punkt (als der zur Zeit beste Punkt) kann mit einer gewissen Wahrscheinlichkeit akzeptiert werden. Wenn man @acceptancesa verwendet bekommt man eine Wahrscheinlichkeit zwischen 0 and 0.5 (gemäss Dokumentation). Wann wird nun genau der neue Punkt akzeptiert? Also wenn z.B. die probability of acceptance 0.3 ist, muss man ja noch entscheiden, ob jetzt der Punkt akzeptiert wird oder nicht.
Step 4: Reannealing. Hier wird der parameter sj wie folgt beschrieben: «Gradient of objective in direction i times difference in bounds in direction i». Wie wird dieser Gradient berechnet? Ich gebe ja nur die objective function an. Mit der difference in bound nehme ich an, dass upper bound – lower bound gemeint ist.
Walter Roberson
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 CenterFile Exchange 中查找有关 Simulated Annealing 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by