필터 지우기
필터 지우기

Minimize a function with equality, inequality, and product in constraints

조회 수: 4 (최근 30일)
Imanitxka imane
Imanitxka imane 2023년 2월 27일
이동: Torsten 2023년 2월 27일
Hello community, can anyone please help me to get the solution of this problem.
I have to minimize the following objective function:
OF= (x1+x2)*0.1– x3*0.3+ (x4+x5)*0.9-(x6+x7)*0.8
With respect to the following constraints:
X1+x2+x6= 10
X1+x3+x4=12
(x5+x2)*( x3+x7)= 0
0.1 <= (x5+x2)*10-(x3+x7)*0.9 <= 0.9
0<=x5+x2<=P3
0<=x3+x7<=P4
xLowerBound: [0 0 0 0 0 0 0]
xUpperBound: [12 4 4 12 4 10 4]
  댓글 수: 1
Askic V
Askic V 2023년 2월 27일
Please have a loook at this part of the documentation:
https://www.mathworks.com/help/optim/ug/nonlinear-constraints.html

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

답변 (1개)

Torsten
Torsten 2023년 2월 27일
이동: Torsten 2023년 2월 27일
x2,x3,x5 and x7 are all >= 0.
Thus the constraint (x5+x2)*(x3+x7) = 0 either gives x5=x2=0 or x3=x7=0.
Thus use "linprog" twice:
In the first run, optimize your function under the constraint x5=x2=0, in the second run, use the constraint x3=x7=0.
After these two runs, take the better of these two runs as solution.

Community Treasure Hunt

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

Start Hunting!

Translated by