Version 0.0-0 of comfort-glpk is deprecated.
The latest version of comfort-glpk is 0.1-1.

comfort-glpk

Version 0.0 revision 0 uploaded by HenningThielemann.

Package meta

Synopsis
Linear Programming using GLPK and comfort-array
Description

Simple interface to linear programming functions provided by GLPK using the flexible Array shape framework from comfort-array.

E.g. you can use Shape.Tuple to convert safely between nested tuples and arrays with the same number of elements.

type X = Shape.Element
type PairShape = Shape.NestedTuple Shape.TupleIndex (X,X)

case Shape.indexTupleFromShape (Shape.static :: PairShape) of
  (posIx,negIx) ->
    case mapSnd (mapSnd Array.toTuple) <$>
         LP.simplex [] [[1.*posIx, (-1).*negIx] ==. 314]
           (LP.Minimize,
            Array.fromTuple (23,42) :: Array PairShape Double)
      of
        (Right (LP.Optimal, (absol, (pos, neg)))) ->
          printf "absol %f,  pos %f, neg %f\n" absol pos neg
        _ -> fail "GLPK solver failed"

Alternatives: hmatrix-glpk, glpk-hs

Author
Henning Thielemann <haskell@henning-thielemann.de>
Bug reports
n/a
Category
Math
Copyright
n/a
Homepage
n/a
Maintainer
Henning Thielemann <haskell@henning-thielemann.de>
Package URL
n/a
Stability
n/a

Components