Solving an optimization problem using fmincon

조회 수: 27 (최근 30일)
Behzad Eydiyoon
Behzad Eydiyoon 2021년 8월 22일
댓글: Behzad Eydiyoon 2021년 8월 23일
Can anyone help me to solve this? I do not know how to use the contraint on C3 and how to implement ri in it!

채택된 답변

Alan Weiss
Alan Weiss 2021년 8월 22일
I think that this is a straightforward problem is you use the problem-based optimization workflow, which requires a relatively recent version of Optimization Toolbox™.
Alan Weiss
MATLAB mathematical toolbox documentation
  댓글 수: 3
Alan Weiss
Alan Weiss 2021년 8월 23일
So you were able to program it. Good for you!
Now let's look at your constraints:
cons1 = sum(x) <= 10;
cons2 = sum(r.*x) >= 10;
The r variable has all entries between 0 and 1, and the x variable is nonnegative. Therefore, for any x satisfying cons1, the value of sum(r.*x) is smaller. Therefore your constraints are inconsistent.
Alan Weiss
MATLAB mathematical toolbox documentation
Behzad Eydiyoon
Behzad Eydiyoon 2021년 8월 23일
you are right!
thank you a lot.

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

추가 답변 (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