Writing a custom annealing function

3 ビュー (過去 30 日間)
ch
ch 2019 年 10 月 16 日
回答済み: Rushil 2025 年 4 月 30 日
I'm trying to write my own 'AnnealingFcn' for simulannealbnd, right now I have:
options = optimoptions(@simulannealbnd,'Display','iter','MaxIter',10000,'InitialTemperature',500,'AnnealingFcn',@annealingboltz);
Instead of @annealingboltz, which chooses a direction uniformly at random, I want to write my own function which uses a gaussian with the standard deviation being some function of the temperature. Can anyone point me in the right direction about how to implement this?

回答 (1 件)

Rushil
Rushil 2025 年 4 月 30 日
Hello
I see that you wish to write a custom annealing function from “simulannealbnd”. This can be accomplished by modifying the options parameters for algorithm settings, as shown at the documentation link below:
Following the documentation, a custom objective function can be written by modifying the "saannealingfcntemplate.m" file. To keep all iterates within bounds, the custom annealing function should call sahonorbounds as the final command.
Hope it helps

カテゴリ

Help Center および File ExchangeSimulated Annealing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by