필터 지우기
필터 지우기

How to impose multiple inequality constraints on fmincon?

조회 수: 5 (최근 30일)
Shahab
Shahab 2012년 9월 13일
How should I provide two inequality constraints as:
A1*x < b1
A2*x < b2
where the syntax is like this:
x = fmincon(fun,x0,A,b,Aeq,beq,lb,ub,nonlcon,options)
My mathematical constraint is this, actually:
-B < x(i+1)-x(i) < B

채택된 답변

Titus Edelhofer
Titus Edelhofer 2012년 9월 13일
Hi,
for the left hand side, you multiply by -1, i.e.,
-x(i+1) + x(i) <= B
And combining is easy:
A = [A1; A2];
b = [b1; b2];
Titus

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Nonlinear Optimization에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by