If we have non-linear constraint can we use "quadprog"

조회 수: 7 (최근 30일)
RAHUL KUMAR
RAHUL KUMAR 2019년 9월 19일
댓글: Matt J 2019년 9월 19일
I have non-linear function and linear constraint so we can use "quadprog" algorithm.so my question is if i have non-linear objective function and no-linear constraint function ,can we use "quadprog" algorithm if not then which algorithm use

채택된 답변

John D'Errico
John D'Errico 2019년 9월 19일
편집: John D'Errico 2019년 9월 19일
No. Quadprog is only able to accept LINEAR constraints. (equality, inequality, as well as bound constraints on the parameters. But they are all linear.)
Anyway, if your function is itself generally nonlinear, as opposed to a quadratic form, then you still cannot use quadprog.
You can use fmincon though, as it does accept nonlinear constrints.
  댓글 수: 2
Matt J
Matt J 2019년 9월 19일
편집: Matt J 2019년 9월 19일
(x-2)^2+(y-3)^2+6=0 and x^2+6=0
Thes constraints are infeasible. They have no real-valued solutions. Did you mean perhaps,
(x-2)^2+(y-3)^2 - 6 = 0 and
x^2 - 6 = 0
If you don't want to use fmincon, it would be best for you to tell us why and in what way the alternative needs to be better.
Matt J
Matt J 2019년 9월 19일
fmincon

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Quadratic Programming and Cone Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by