patternsearch returns result violates equality constraint

1 次查看(过去 30 天)
Dear All,
I am using patternsearch to do my optimization problem. I find the results sometimes violate the equality constraint. Do you why does that happen?
I let A=[1,1,1] and b=1, which means that the sum of the parameters should be equal to 1. But occasionally there the sum is equal to 1.001 or 0.995.
Cheers, Xueqi

回答(1 个)

Alan Weiss
Alan Weiss 2014-9-22
It is not clear to me whether you are using the A, b arguments or the Aeq, beq arguments. The latter are for the equality constraints.
In any case, when you have linear constraints I suggest that you use the GSSPositiveBasis2N or GSSPositiveBasisNp1 poll methods. They are slightly more efficient and robust for linear constraints than the default GPSPositiveBasis2N.
You can also try lowering the value of the TolBind option. The default 1e-3 might be too high for your problem. Please do not lower this option too much, try 1e-6 or so, or you can make the algorithm slow.
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