Resolution of optimization variable in nonlinear optimization problem like simulannealbnd patternsearch

3 次查看(过去 30 天)
Hey,
I am doing a real time optimization problem. The cost function is not super sensitive to optimization variable. But I found that nonlinear optimization problem like simulannealbnd patternsearch keep repeating eveluation with very low resulution to get a better solution even though it see very small change in cost function. I even see sometime it keep reaping evaluation with the same value of optimization variable. But I don't care about the resolution much as long as I get a solution with ~1 resolution. I want to say the optimization method not to search a solution with very good resolution. Is there any option for nonlinear optimization problem like simulannealbnd patternsearch in Matlab? example: if the optimization technique already did an evaluation of the cost finction f(x) at x=1.5, I don't want it to try another evaluation within x= 1 and x =2.

回答(2 个)

Matt J
Matt J 2019-4-25
编辑:Matt J 2019-4-25
In ga, you can constrain certain variables x(i) to be integers using the IntCon input. Then, inside your objective, you can use a scale factor to change the minimum "resolution" as you call it to some possibly non-integer value:
function val=fitness(xInteger)
x=res*xInteger;
val=....something dependending on x ....
end

Alan Weiss
Alan Weiss 2019-4-29
编辑:Alan Weiss 2019-4-29
For patternsearch you can set the MeshTolerance option to 1/2 or something like that.If your objective function is very expensive, you can also set the Cache option to 'on'. You might also want to set the InitialMeshSize option to something larger than 1, maybe 4 or 32 or something.
Alan Weiss
MATLAB mathematical toolbox documentation

类别

Help CenterFile Exchange 中查找有关 Direct Search 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by