Portability | portable |
---|---|
Stability | provisional |
Maintainer | masahiro.sakai@gmail.com |
Safe Haskell | None |
A CPLEX .lp format parser library.
References:
- data LP = LP {
- variables :: Set Var
- dir :: OptDir
- objectiveFunction :: ObjectiveFunction
- constraints :: [Constraint]
- varInfo :: Map Var VarInfo
- sos :: [SOS]
- type Expr = [Term]
- data Term = Term Rational [Var]
- data OptDir
- type ObjectiveFunction = (Maybe Label, Expr)
- data ConstraintType
- data Constraint = Constraint {
- constrType :: ConstraintType
- constrLabel :: Maybe Label
- constrIndicator :: Maybe (Var, Rational)
- constrBody :: (Expr, RelOp, Rational)
- type Bounds = (BoundExpr, BoundExpr)
- type Label = String
- type Var = String
- data VarType
- data VarInfo = VarInfo {}
- data BoundExpr
- data RelOp
- data SOSType
- type SOS = (Maybe Label, SOSType, [(Var, Rational)])
- defaultBounds :: Bounds
- defaultLB :: BoundExpr
- defaultUB :: BoundExpr
- getVarInfo :: LP -> Var -> VarInfo
- getVarType :: LP -> Var -> VarType
- getBounds :: LP -> Var -> Bounds
- integerVariables :: LP -> Set Var
- semiContinuousVariables :: LP -> Set Var
- parseString :: SourceName -> String -> Either ParseError LP
- parseFile :: FilePath -> IO (Either ParseError LP)
- render :: LP -> Maybe String
Documentation
Problem
LP | |
|
type ObjectiveFunction = (Maybe Label, Expr)Source
objective function
data ConstraintType Source
data Constraint Source
constraint
Constraint | |
|
type for representing lower/upper bound of variables
types of SOS (special ordered sets) constraints
default bounds
getVarInfo :: LP -> Var -> VarInfoSource
looking up attributes for a variable
getVarType :: LP -> Var -> VarTypeSource
looking up bounds for a variable
integerVariables :: LP -> Set VarSource
parseString :: SourceName -> String -> Either ParseError LPSource
Parse a string containing LP file data. The source name is only | used in error messages and may be the empty string.