[Haskell-cafe] Linear programming in Haskell

Alberto Ruiz aruiz at um.es
Wed Feb 24 05:07:08 EST 2010


I have uploaded to hackage an interface to the simplex algorithm based 
on GLPK. It is a very early version, it will probably have lots of 
problems. In the future I would like to add support for integer 
variables (MIP). Any suggestion is welcome.

This is an example taken from "glpk-utils":

http://code.haskell.org/hmatrix/packages/glpk/examples/simplex3.hs

Documentation: http://perception.inf.um.es/~aruiz/hmatrix-glpk/

Installation:

$ sudo apt-get install libglpk-dev
$ cabal update
$ cabal install hmatrix-glpk

If hmatrix is not installed we also need

$ sudo apt-get install libgsl0-dev liblapack-dev

I hope it is useful,
Alberto



Erik de Castro Lopo wrote:
> Alberto Ruiz wrote:
> 
>> I think that GSL does not include linear programming solvers, but in the 
>> GSL home page there is a reference to the GLPK package:
>>
>> http://www.gnu.org/software/glpk/glpk.html
>>
>> I have not used it, but it would be very nice to have a simple Haskell 
>> interface to GLPK (or other similar library) in hmatrix or as a separate 
>> package. I will take a look at this.
> 
> I used GLPK many years ago and I found it excellent.
> 
> Erik



More information about the Haskell-Cafe mailing list