Borrar filtros
Borrar filtros

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

4 visualizaciones (últimos 30 días)
Imanitxka imane
Imanitxka imane el 27 de Feb. de 2023
Movida: Torsten el 27 de Feb. de 2023
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 comentario
Askic V
Askic V el 27 de Feb. de 2023
Please have a loook at this part of the documentation:
https://www.mathworks.com/help/optim/ug/nonlinear-constraints.html

Iniciar sesión para comentar.

Respuestas (1)

Torsten
Torsten el 27 de Feb. de 2023
Movida: Torsten el 27 de Feb. de 2023
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