| Copyright | (c) Masahiro Sakai 2011-2014 |
|---|---|
| License | BSD-style |
| Maintainer | masahiro.sakai@gmail.com |
| Stability | provisional |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
| Extensions |
|
Numeric.Optimization.MIP.LPFile
Description
A CPLEX .lp format parser library.
References:
Synopsis
- parseString :: (Stream s, Token s ~ Char, IsString (Tokens s)) => FileOptions -> String -> s -> Either (ParseError s) (Problem Scientific)
- parseFile :: FileOptions -> FilePath -> IO (Problem Scientific)
- type ParseError s = ParseErrorBundle s Void
- parser :: (MonadParsec e s m, Token s ~ Char, IsString (Tokens s)) => m (Problem Scientific)
- render :: FileOptions -> Problem Scientific -> Either String Text
Documentation
parseString :: (Stream s, Token s ~ Char, IsString (Tokens s)) => FileOptions -> String -> s -> Either (ParseError s) (Problem Scientific) Source #
Parse a string containing LP file data. The source name is only used in error messages and may be the empty string.
parseFile :: FileOptions -> FilePath -> IO (Problem Scientific) Source #
Parse a file containing LP file data.
type ParseError s = ParseErrorBundle s Void Source #
Error type for parsing.
The definition is slightly different based on the megaparsec version.
parser :: (MonadParsec e s m, Token s ~ Char, IsString (Tokens s)) => m (Problem Scientific) Source #
LP file parser
render :: FileOptions -> Problem Scientific -> Either String Text Source #
Render a problem into a Text containing LP file data.