patternsearch returns result violates equality constraint
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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
0 Kommentare
Antworten (1)
Alan Weiss
am 22 Sep. 2014
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
0 Kommentare
Siehe auch
Kategorien
Mehr zu Direct Search finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!