フィルターのクリア

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