module Numeric.Limp.Program.Program where
import Numeric.Limp.Program.Bounds
import Numeric.Limp.Program.Constraint
import Numeric.Limp.Program.Linear
import Numeric.Limp.Program.ResultKind
import Numeric.Limp.Rep
data Direction
= Minimise
| Maximise
deriving Show
data Program z r c
= Program {
_direction :: Direction
, _objective :: Linear z r c 'KR
, _constraints :: Constraint z r c
, _bounds :: [Bounds z r c]
}
deriving instance (Show z, Show r, Show (Z c), Show (R c)) => (Show (Program z r c))
program :: Rep c => Direction -> Linear z r c k -> Constraint z r c -> [Bounds z r c] -> Program z r c
program dir obj constr bounds
= Program dir (toR obj) constr bounds
minimise :: Rep c => Linear z r c k -> Constraint z r c -> [Bounds z r c] -> Program z r c
minimise
= program Minimise
maximise :: Rep c => Linear z r c k -> Constraint z r c -> [Bounds z r c] -> Program z r c
maximise
= program Maximise