Copyright | (c) Masahiro Sakai 2011-2014 |
---|---|
License | BSD-style |
Maintainer | masahiro.sakai@gmail.com |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Mixed-Integer Programming Problems with some commmonly used extensions
- data Problem c = Problem {
- name :: Maybe Text
- objectiveFunction :: ObjectiveFunction c
- constraints :: [Constraint c]
- sosConstraints :: [SOSConstraint c]
- userCuts :: [Constraint c]
- varType :: Map Var VarType
- varBounds :: Map Var (Bounds c)
- type Label = Text
- type Var = InternedText
- toVar :: String -> Var
- fromVar :: Var -> String
- data VarType
- getVarType :: Problem c -> Var -> VarType
- type BoundExpr c = Extended c
- data Extended r :: * -> *
- type Bounds c = (BoundExpr c, BoundExpr c)
- defaultBounds :: Num c => Bounds c
- defaultLB :: Num c => BoundExpr c
- defaultUB :: BoundExpr c
- getBounds :: Num c => Problem c -> Var -> Bounds c
- variables :: Problem c -> Set Var
- integerVariables :: Problem c -> Set Var
- semiContinuousVariables :: Problem c -> Set Var
- semiIntegerVariables :: Problem c -> Set Var
- newtype Expr c = Expr [Term c]
- varExpr :: Num c => Var -> Expr c
- constExpr :: (Eq c, Num c) => c -> Expr c
- terms :: Expr c -> [Term c]
- data Term c = Term c [Var]
- data OptDir :: *
- data ObjectiveFunction c = ObjectiveFunction {}
- data Constraint c = Constraint {
- constrLabel :: Maybe Label
- constrIndicator :: Maybe (Var, c)
- constrExpr :: Expr c
- constrLB :: BoundExpr c
- constrUB :: BoundExpr c
- constrIsLazy :: Bool
- (.==.) :: Num c => Expr c -> Expr c -> Constraint c
- (.<=.) :: Num c => Expr c -> Expr c -> Constraint c
- (.>=.) :: Num c => Expr c -> Expr c -> Constraint c
- data RelOp
- data SOSType
- data SOSConstraint c = SOSConstraint {}
- data Solution r = Solution {
- solStatus :: Status
- solObjectiveValue :: Maybe r
- solVariables :: Map Var r
- data Status
- data FileOptions = FileOptions {}
- class Variables a where
- intersectBounds :: Ord c => Bounds c -> Bounds c -> Bounds c
The MIP Problem type
Problem
Problem | |
|
Variables
type Var = InternedText Source #
variable
Variable types
Variable bounds
Extended r
is an extension of r with positive/negative infinity (±∞).
Functor Extended | |
Bounded (Extended r) | |
Eq r => Eq (Extended r) | |
(Fractional r, Ord r) => Fractional (Extended r) | Note that |
Data r => Data (Extended r) | |
(Num r, Ord r) => Num (Extended r) | Note that
|
Ord r => Ord (Extended r) | |
Read r => Read (Extended r) | |
Show r => Show (Extended r) | |
NFData r => NFData (Extended r) | |
Hashable r => Hashable (Extended r) | |
type Bounds c = (BoundExpr c, BoundExpr c) Source #
type for representing lower/upper bound of variables
defaultBounds :: Num c => Bounds c Source #
default bounds
Variable getters
Expressions
expressions
terms
Objective function
The OptDir
type represents optimization directions.
data ObjectiveFunction c Source #
objective function
Functor ObjectiveFunction Source # | |
Eq c => Eq (ObjectiveFunction c) Source # | |
Ord c => Ord (ObjectiveFunction c) Source # | |
Show c => Show (ObjectiveFunction c) Source # | |
Default (ObjectiveFunction c) Source # | |
Variables (ObjectiveFunction c) Source # | |
Constraints
Linear (or Quadratic or Polynomial) constraints
data Constraint c Source #
constraint
Constraint | |
|
Functor Constraint Source # | |
Eq c => Eq (Constraint c) Source # | |
Ord c => Ord (Constraint c) Source # | |
Show c => Show (Constraint c) Source # | |
Default (Constraint c) Source # | |
Variables (Constraint c) Source # | |
relational operators
SOS constraints
types of SOS (special ordered sets) constraints
data SOSConstraint c Source #
SOS (special ordered sets) constraints
Functor SOSConstraint Source # | |
Eq c => Eq (SOSConstraint c) Source # | |
Ord c => Ord (SOSConstraint c) Source # | |
Show c => Show (SOSConstraint c) Source # | |
Variables (SOSConstraint c) Source # | |
Solutions
Solution | |
|
MIP status with the following partial order:
File I/O options
data FileOptions Source #