Safe Haskell | None |
---|---|
Language | Haskell98 |
The monadic interface to GLPK allows to optimize with respect to multiple objectives, successively.
Synopsis
- data T sh a
- run :: (Indexed sh, Index sh ~ ix) => sh -> Bounds ix -> T sh a -> a
- simplex :: (Eq sh, Indexed sh, Index sh ~ ix) => Constraints ix -> (Direction, Objective sh) -> T sh (Solution sh)
- exact :: (Eq sh, Indexed sh, Index sh ~ ix) => Constraints ix -> (Direction, Objective sh) -> T sh (Solution sh)
- data Direction
Documentation
simplex :: (Eq sh, Indexed sh, Index sh ~ ix) => Constraints ix -> (Direction, Objective sh) -> T sh (Solution sh) Source #
Add new constraints to an existing problem and solve with a new direction and objective.
>>>
case Shape.indexTupleFromShape tripletShape of (x,y,z) -> mapSnd (mapSnd Array.toTuple) <$> LP.run tripletShape [] (LP.simplex [[2.*x, 1.*y] <=. 10, [1.*y, (5::Double).*z] <=. 20] (LP.Maximize, Array.fromTuple (4,-3,2) :: Array.Array TripletShape Double))
Right (Optimal,(28.0,(5.0,0.0,4.0)))
exact :: (Eq sh, Indexed sh, Index sh ~ ix) => Constraints ix -> (Direction, Objective sh) -> T sh (Solution sh) Source #
Instances
Bounded Direction Source # | |
Enum Direction Source # | |
Defined in Numeric.GLPK.Private succ :: Direction -> Direction # pred :: Direction -> Direction # fromEnum :: Direction -> Int # enumFrom :: Direction -> [Direction] # enumFromThen :: Direction -> Direction -> [Direction] # enumFromTo :: Direction -> Direction -> [Direction] # enumFromThenTo :: Direction -> Direction -> Direction -> [Direction] # | |
Eq Direction Source # | |
Show Direction Source # | |