How to find maximum function in linear programming?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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)?
0 Kommentare
Antworten (1)
John D'Errico
am 10 Apr. 2015
Bearbeitet: John D'Errico
am 10 Apr. 2015
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.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Parallel Computing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!