How to find maximum function in linear programming?

조회 수: 10 (최근 30일)
Raziur Rahman
Raziur Rahman 2015년 4월 10일
편집: John D'Errico 2015년 4월 10일
I have a programming form like f=Ab, here f and b are column vector and A matrix. Now constrains are like this, b(i)>0 and sum(b(i))=1 and prod(f(i)) need to be maximum. How to find the values of b(i)?

답변 (1개)

John D'Errico
John D'Errico 2015년 4월 10일
편집: John D'Errico 2015년 4월 10일
I'm confused. I could swear you said LINEAR programming. The last time I checked, prod(f) would be nonlinear. That new math changes all the time though, so I might be wrong. :)
Use fmincon instead, because the problem is nonlinear, i.e., NOT linear. It is a minimization tool, as are all of those tools. So minimize -prod(f) instead.
And, since that product will almost surely end up having numerical problems, you will find yourself needing to minimize -sum(log(f)), but a minimizer of one is a minimizer of the other.
Finally, expect that to have numerical problems too, since some of those elements might occasionally go slightly negative, whereby the log of a negative number will be a problem. It would be a problem in the product anyway, since a sign change in the product will still be a problem.
So, expect this to be difficult to solve.

카테고리

Help CenterFile Exchange에서 Parallel Computing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by