Borrar filtros
Borrar filtros

How does Matlab's simulannealbnd enforce bound constraints?

1 visualización (últimos 30 días)
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 comentario
John D'Errico
John D'Errico el 1 de Jun. de 2016
Editada: John D'Errico el 1 de Jun. de 2016
(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.

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 1 de Jun. de 2016
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 comentarios
Sepp
Sepp el 2 de Jun. de 2016
Editada: Sepp el 2 de Jun. de 2016
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 el 2 de Jun. de 2016
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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Simulated Annealing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by