필터 지우기
필터 지우기

patternsearch returns result violates equality constraint

조회 수: 1 (최근 30일)
xueqi
xueqi 2014년 9월 22일
답변: Alan Weiss 2014년 9월 22일
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