lp :: Map.Map [Char] Double -> LP String Double
lp loadPattern = execLPM $ do 
                         -- Tell glpk we are minimizing no maximizing 
                          setDirection Min
                          -- pass the objective function/variable to minimize
                          setObjective (dailyCost loadPattern)

                          --First and second set of constraints
                          mapM (\(func, val) -> func `geqTo` val) (reservationConstraints loadPattern)
                          mapM (\(func, val) -> func `geqTo` val) (capacityConstraints loadPattern)
                          -- Positive values constraint
                          mapM (\var -> varGeq var 0.0) (allVariables loadPattern)
                          -- Integer values constraint. aws instances can't be
                          -- fractional
                          mapM (\var -> setVarKind var IntVar) (allVariables loadPattern)



--Finally, printing results
lp :: Map.Map [Char] Double -> LP String Double
lp loadPattern = execLPM $ do 
                         -- Tell glpk we are minimizing no maximizing 
                          setDirection Min
                          -- pass the objective function/variable to minimize
                          setObjective (dailyCost loadPattern)

                          --First and second set of constraints
                          mapM (\(func, val) -> func `geqTo` val) (reservationConstraints loadPattern)
                          mapM (\(func, val) -> func `geqTo` val) (capacityConstraints loadPattern)
                          -- Positive values constraint
                          mapM (\var -> varGeq var 0.0) (allVariables loadPattern)
                          -- Integer values constraint. aws instances can't be
                          -- fractional
                          mapM (\var -> setVarKind var IntVar) (allVariables loadPattern)



--Finally, printing results
lp loadPattern = execLPM $ do 
                         -- Tell glpk we are minimizing no maximizing 
                          setDirection Min
                          -- pass the objective function/variable to minimize
                          setObjective (dailyCost loadPattern)

                          --First and second set of constraints
                          mapM (\(func, val) -> func `geqTo` val) (reservationConstraints loadPattern)
                          mapM (\(func, val) -> func `geqTo` val) (capacityConstraints loadPattern)
                          -- Positive values constraint
                          mapM (\var -> varGeq var 0.0) (allVariables loadPattern)
                          -- Integer values constraint. aws instances can't be
                          -- fractional
                          mapM (\var -> setVarKind var IntVar) (allVariables loadPattern)



--Finally, printing results