math-programming-0.5.0: A library for formulating and solving math programs.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Math.Programming.Dsl

Synopsis

Documentation

minimize :: MonadLP v c o m => Expr v -> m o Source #

Create an objective to be minimized.

maximize :: MonadLP v c o m => Expr v -> m o Source #

Create an objective to be maximized.

evalExpr :: MonadLP v c o m => Expr v -> m Double Source #

Get the value of a linear expression in the current solution.

free :: MonadLP v c o m => m v Source #

Create a new free variable.

nonNeg :: MonadLP v c o m => m v Source #

Create a new non-negative variable.

nonPos :: MonadLP v c o m => m v Source #

Create a new non-positive variable.

bounded :: MonadLP v c o m => Double -> Double -> m v Source #

Create a new variable bounded between two values.

within :: MonadLP v c o m => m v -> Bounds -> m v Source #

Constrain a variable to take on certain values.

This function is designed to be used as an infix operator, e.g.

integer `within` 'Interval 3 7'

creates an integer variable that can take on values 3, 4, 5, 6, or 7.

integer :: MonadIP v c o m => m v Source #

Create an integer-valued variable.

binary :: MonadIP v c o m => m v Source #

Create a binary variable.

nonNegInteger :: MonadIP v c o m => m v Source #

Create an integer-value variable that takes on non-negative values.

nonPosInteger :: MonadIP v c o m => m v Source #

Create an integer-value variable that takes on non-positive values.

asKind :: MonadIP v c o m => m v -> Domain -> m v Source #

Set the type of a variable.

This function is designed to be used as an infix operator, e.g.

free `asKind` Binary

(.<=.) :: MonadLP v c o m => Expr v -> Expr v -> m c infix 4 Source #

A less-than or equal-to constraint

(<=.) :: MonadLP v c o m => Double -> Expr v -> m c infix 4 Source #

A less-than or equal-to constraint with a numeric left-hand side

(.<=) :: MonadLP v c o m => Expr v -> Double -> m c infix 4 Source #

A less-than or equal-to constraint with a numeric right-hand side

(.>=.) :: MonadLP v c o m => Expr v -> Expr v -> m c infix 4 Source #

A greater-than or equal-to constraint

(>=.) :: MonadLP v c o m => Double -> Expr v -> m c infix 4 Source #

A greater-than or equal-to constraint with a numeric left-hand side

(.>=) :: MonadLP v c o m => Expr v -> Double -> m c infix 4 Source #

A greater-than or equal-to constraint with a numeric right-hand side

(.==.) :: MonadLP v c o m => Expr v -> Expr v -> m c infix 4 Source #

An equality constraint

(==.) :: MonadLP v c o m => Double -> Expr v -> m c infix 4 Source #

An equality constraint with a numeric left-hand side

(.==) :: MonadLP v c o m => Expr v -> Double -> m c infix 4 Source #

An equality constraint with a numeric right-hand side

formatExpr :: MonadLP v c o m => Expr v -> m Text Source #

formatExpr' :: Monad m => (v -> m Text) -> Expr v -> m Text Source #

withVariableName :: MonadLP v c o m => m v -> Text -> m v Source #

withConstraintName :: MonadLP v c o m => m c -> Text -> m c Source #

withObjectiveName :: MonadLP v c o m => m o -> Text -> m o Source #