- x — Current point
- fval — Objective function value at x
- bestx — Best point found so far
- bestfval — Objective function value at best point
Output function for Simulated Anealing
7 次查看(过去 30 天)
显示 更早的评论
Hello,
I am using Simulated anealing as my optimization solver. Unfortunately, I am unable to get what I want. When I look at the 'optimValues' (see bellow)I do not see 2 VERY IMPORTANT piece of information: 1) the current best solution x 2) The objective value of the current best solution. I believe you agree with me that these 2 pieces of information are the most important information any user needs (or wants) to know.
I do not know what to do with this??? !!!
Any idea?
Thanks for your kind help, in advance!
Babak
Default properties:
AcceptanceFcn: @acceptancesa
AnnealingFcn: @annealingfast
DataType: 'double'
Display: 'iter'
FunctionTolerance: 1.0000e-06
HybridFcn: []
InitialTemperature: [8×1 double]
MaxFunctionEvaluations: 1.7977e+308
MaxIterations: 200
MaxStallIterations: 4000
MaxTime: Inf
ObjectiveLimit: -Inf
OutputFcn: {@(optimValues,options,flag)myoutput_SA_Parametric(optimValues,options,flag,Max_iter)}
PlotFcn: []
ReannealInterval: 100
TemperatureFcn: @temperatureexp
0 个评论
回答(2 个)
Sarthak
2023-3-24
Hi Mohammad,
As per my understanding, the optimValues structure does contain
Attaching a documentation link for your reference as well.
0 个评论
Alan Weiss
2023-3-24
You have mistaken the output of optimoptions for the optimvalues structure in simulate annealing.
opts = optimoptions("simulannealbnd")
When you create an output function for simulated annealing you can obtain the information from the optimvalues structure as described in Output Function Options. For an example showing how to use an output function for ga, which has a different syntax, see Custom Output Function for Genetic Algorithm. Be careful to use the syntax for simulannealbnd, not the syntax for ga, in your custom output function.
Alan Weiss
MATLAB mathematical toolbox documentation
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!