Minimizing a multivariable function in several variables in MATLAB
2 次查看(过去 30 天)
显示 更早的评论
I need to minimize a nonlinear function subject to constraints, where everything is a parameter - no numbers.
Does anyone know if this is possible in MATLAB?
Here are the details:
Find the minimum of
(2A-MB)G(F+H+J+K+L)+A(B+C+D)(E+F)-(MC-A)^2 with A,B,C,D,E,F,G,H,J,K,L > 0.
Thanks for any help.
1 个评论
James
2014-7-2
I'm not sure what your independent variables and coefficients are - how many dimensions does this function have? Also, are you looking for a numerical minimum over defined numerical ranges? Without more constraints, this problem may not be solvable.
回答(1 个)
John D'Errico
2014-7-2
编辑:John D'Errico
2014-7-2
So you have a function of 14 unknowns, some of which are bounded, but not all of them.
I'm sorry, but it is unbounded. There is no minimum value. Here is your expression. (Personally, I think you should use * in there to denote multiplies, as there is an ambiguity. Is MC a single parameter, or the product of two parameters, M*C?) When you ask a question try not to leave ambiguities in there.
(2A-MB)G(F+H+J+K+L)+A(B+C+D)(E+F)-(MC-A)^2
See that some of the parameters enter linearly, B for example. But B is unbounded. If we write this expression as
B*stuff1 + stuff2
then clearly, if stuff1 is a positive value, then we can see the expression is unbounded from below by making B as large and negative as we wish. If stuff1 is negative, then we see the function is unbounded from below by making B large and positive.
And if it turns out (in a very rare case) that stuff1 was EXACTLY zero, then the function has no unique minimum as a function of B. There might then be infinitely many solutions, depending on what happened in stuff2, or it could still be unbounded by the same reasoning as above.
Your objective has the same issues with G.
It gets worse though.
How about A? Expand this, then write it as a function of A. It will look like
-A^2 + A*stuff3 + stuff4
Quadratic in A, with a NEGATIVE coefficient on A^2. And A has no bounds at all.
So, NO. There is affirmatively no solution.
1 个评论
John D'Errico
2014-7-2
编辑:John D'Errico
2014-7-2
You are not reading the answer I just wrote! Even if ALL of the variables are positive, no minimum will exist.
Again (why must I repeat what I just wrote?) we can write your function as
-A^2 + A*stuff3 + stuff4
Even if A is bounded only from below (i.e., it is positive), A is not bounded from above. Therefore -A^2 can still be made as large and negative as we wish.
NO MINIMUM EXISTS! THE FUNCTION CAN BE MADE AS SMALL AS YOU WISH TO MAKE IT. IT IS UNBOUNDED. PERIOD.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Least Squares 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!