Archived

This topic is now archived and is closed to further replies.

free linear programming libraries?

This topic is 5106 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Linear programming comes under math, it''s like genetic programming, but the algorithm searches in linear iterations.

here this might give you some idea. And I found out some libraries on that page too.

Share this post


Link to post
Share on other sites
it''s programming techniques for matrix inversion

MTL is the matrix template library
ITL is the iterative template library (by the same guys), which has a number of techniques for inversion.
boost uBLAS performs the Basic Linear Algebra SubPrograms.

I would normally put the links in but it shouldn''t take you more than a few seconds to google for these.

Share this post


Link to post
Share on other sites
Linear programming is used to search the optimum (min or max) of a problem where you have constraints (inequations) and a linear cost function.

And I don''t know any free libraries to do this. And I won''t even try to google for it. Real men code those libraries themselves if they have to, on a TI-89 (much more practical for the exams) ;-)

Frankly, the whole method is just a bunch of tests and small operations on matrices. Once you have a matrix class and a fairly good grasp of how the algorithm works (easy with a few hand-made samples), there isn''t anything left to do.

Is it real or integer linear programming ?

Share this post


Link to post
Share on other sites
"I would normally put the links in but it shouldn''t take you more than a few seconds to google for these."

google also returns crappy links. It''s not easy to pick good ones from 100000+ results. I''m not sure which are good libraries for this programming. because this is my first experience with linear programming.

MTL, ITL, and boost uBLAS looks promising, I''ll try those. Thanks!

Share this post


Link to post
Share on other sites
quote:

Is it real or integer linear programming ?


It needs both options. I don't know simplex method, so building my own algorithm is out of question.



[edited by - Eric_B on December 15, 2003 3:38:28 PM]

Share this post


Link to post
Share on other sites
I was asleep when I posted the above. Yes Linear Programming is for max/min constraints.

boost has the graph library which is useful for simplex method etc.


I found this by searching for ''boost BGL simplex'' which returned 7 results.

Share this post


Link to post
Share on other sites
quote:
Original post by Eric_B
It needs both options. I don''t know simplex method, so building my own algorithm is out of question.



You don''t know the simplex method and yet you have to solve a linear optimization problem ? Well IF it''s school-related, you surely have weird teacher ! Maybe you could us give more details on what you''re trying to achieve.

Anyway I googled a bit and found the GNU Linear Programming Kit which provides the simplex method and is still under development. It could therefore be a good tool for your needs. However I can''t tell it for sure, since I never used it.

Share this post


Link to post
Share on other sites
Thanks petewood and overnhet

quote:
Original post by overnhet
You don''t know the simplex method and yet you have to solve a linear optimization problem ? Well IF it''s school-related, you surely have weird teacher ! Maybe you could us give more details on what you''re trying to achieve.



The teacher gave us a portfolio of 300 stocks and we have to minimize the overall risk. Standard solver in excel can''t handle 300 stocks, but some bought premium solver and some got pirated copy.

Share this post


Link to post
Share on other sites
That''s indeed a pretty tough problem

I don''t know that much about financial mathematics but there are heaps of cases where you can''t express risk / gain formulae with simple linear functions. However I guess your teacher gave you a problem where linear is the way to go, unless he belongs to the sadistic kind

300 variables shouldn''t be an issue with a straightforward simplex implementation. Did you gave a look at the GNU Linear Programming Kit I mentionned (I can''t download it at the moment) ?

Share this post


Link to post
Share on other sites
quote:
Original post by overnhet
Did you gave a look at the GNU Linear Programming Kit I mentionned (I can't download it at the moment) ?


Oh yes! Without it I had not been able to complete my project. It comes with a stand alone solver and it's free

thanks a million!



[edited by - Eric_B on December 23, 2003 6:59:29 AM]

Share this post


Link to post
Share on other sites